- Created Wednesday, December 2nd 2015 @ 05:09:45
It is strange, but my newer versions of Ganymede can't pass tests. And there no error output, just message about bot crash:
Running testcase /opt/aigames/etc/testsblockbattle/testblockbattle.txt... Testing Bot with setup input... ... finished testcase in 0.160000000149 seconds Test failed: no output
More strange that bot works good locally in console and in my testing GUI
Recently i added some memory expensive things to bot (stack expensive). Is there any memory limitation? How can i get at least reasons of crash?
- Created Thursday, December 3rd 2015 @ 05:08:46
Well, i removed memory expensive things and it works fine.
Someone who had some problems - just try to reduce memory using)
DeveloperCreated Thursday, December 3rd 2015 @ 08:57:55
Good post, I'll see if there can be some kind of warning for this.
- Created Sunday, December 6th 2015 @ 04:07:34
By the way, i suspect that reason of such silent crash of bot may be in function assert. Recently i worked only on MVS2010, and assertion disables when you are in release mode.
But there one fine point: it disables due to enabling macro NDEBUG in visual studio. Now i use GCC compiler too for tests, and if you compile with GCC in release you cannot get NDEBUG enabled. So asserts are working!
When assert fails it going in abort(), so program terminate immediately without any error in cerr (maybe in standart io, it's too fast to see)
Memory waste is a bad thing but asserts may be more evil) Key to solve this problem - define NDEBUG.
- Created Sunday, December 6th 2015 @ 13:51:20
I deleted all asserts, rewrited many pieces of code and came to similar situation. But now i get in error:
*** glibc detected *** /bin/run_ai: malloc(): memory corruption (fast): 0x0000000001e6dc60 ***
Amusingly, my program didn't contain malloc calls.
- Created Sunday, December 6th 2015 @ 15:30:28
Sorry, i used non-initialized memory part. All is good)