[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4586: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4588: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4589: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4590: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
AI Challenge Forums • View topic - Runs great locally but wrong on server

It is currently Mon Jul 23, 2018 1:49 pm Advanced search

Runs great locally but wrong on server

Topics about starter packages, visualizer or any other third party tools.
Please submit new language requests in the Language Request Forum.

Re: Runs great locally but wrong on server

Postby analyst74 » Sat Dec 03, 2011 4:36 am

analyst74
Major
 
Posts: 39
Joined: Wed Feb 17, 2010 7:45 pm

Re: Runs great locally but wrong on server

Postby KonaEarth » Sat Dec 03, 2011 5:25 am

Frustrated, yes. Pissed, no. When explaining my experiences I did not intend for it to sound like I was pissed. A bit frustrated at the lack of ability to debug my own code is all. I've certainly dealt with such situations before. Still, that doesn't make them any less frustrating.

I have learned something very important with all this. Nothing about debugging or timeval, that's all old knowledge and minor stuff. What I learned is that Microsoft is losing market share faster than I realized. I am fascinated to find that the latest crop of programmers uses Windows so little. It used to be unavoidable but now it is more of a liability. Not that Unix is anything new, quite the contrary, I just hadn't realized how common the Linux environment has become. Good. It's about time.
KonaEarth
Major
 
Posts: 33
Joined: Thu Nov 25, 2010 1:51 am

Re: Runs great locally but wrong on server

Postby McLeopold » Sat Dec 03, 2011 7:21 pm

Sorry for not paying attention to this issue.

I think if we turn on more warnings and capture them when compiling, it might help.

I had to change the visualizer.php page so that admins can see the stderr, but you should have been able to see it the whole time for your games.

If I had responded in a timely manner, I would have said, "I don't know, I don't see errors in your stderr output."
McLeopold
Contest Organizer
 
Posts: 262
Joined: Sun Sep 19, 2010 3:31 am

Re: Runs great locally but wrong on server

Postby KonaEarth » Sat Dec 03, 2011 7:49 pm

Thanks for the reply. Better late than never. Of course the bug was in my code and easy to fix once I found it. Turning on more warnings might help but even with every warning in the world enabled, there will still be plenty of bugs that require server-side debugging. I could not replicate the bug because on my machine int and long int are both 64-bit while on the server int is 32-bit while long int is 64-bit. That's one particular bug though and does not get at the larger issue.

> I had to change the visualizer.php page so that admins can see the stderr, but you should have been able to see it the whole time for your games.

I understand what the visualizer is but I don't understand how I can use it to see stderr. Is there documentation for this somewhere that I haven't found?
KonaEarth
Major
 
Posts: 33
Joined: Thu Nov 25, 2010 1:51 am

Re: Runs great locally but wrong on server

Postby McLeopold » Sun Dec 04, 2011 7:05 am

No documentation. If you are logged into the website and you have the &user_id=## in the url, we will show you any errors we've captured for your bot for a game.
McLeopold
Contest Organizer
 
Posts: 262
Joined: Sun Sep 19, 2010 3:31 am

Re: Runs great locally but wrong on server

Postby KonaEarth » Sun Dec 04, 2011 8:25 am

KonaEarth
Major
 
Posts: 33
Joined: Thu Nov 25, 2010 1:51 am

Re: Runs great locally but wrong on server

Postby Scryer » Sun Dec 04, 2011 7:10 pm

I too would like to see my stderr output -- I spew a line of timing data per turn to stderr. How do you "show me" the captured output?

If I'm sitting there logged in while it says "Playing in a game right now", should I see a button or something that has my stderr capture when the game is over (or while it's running)?
Scryer
Colonel
 
Posts: 72
Joined: Wed Nov 09, 2011 5:40 pm

Re: Runs great locally but wrong on server

Postby McLeopold » Sun Dec 04, 2011 9:46 pm

After the game is finished, you can go to your profile game, then click the link. If you are logged in you should see your stderr output. You must also make sure your bot color is white, meaning you have been selected as the highlighted player.
McLeopold
Contest Organizer
 
Posts: 262
Joined: Sun Sep 19, 2010 3:31 am

Re: Runs great locally but wrong on server

Postby Scryer » Sun Dec 04, 2011 10:04 pm

Does it depend on the browser? I've tried it on Firefox and Chromium (Linux 11.10). It plays the game for me on the visualizer when I click the game, but I don't see stderr output. Where should I be looking for it?

[P.S. Also logged in and white on both browsers.]
Last edited by Scryer on Mon Dec 05, 2011 12:22 am, edited 1 time in total.
Scryer
Colonel
 
Posts: 72
Joined: Wed Nov 09, 2011 5:40 pm

Re: Runs great locally but wrong on server

Postby KonaEarth » Mon Dec 05, 2011 12:21 am

KonaEarth
Major
 
Posts: 33
Joined: Thu Nov 25, 2010 1:51 am

Previous

Return to Starter Packages & Tools

Who is online

Users browsing this forum: No registered users and 2 guests

cron