Wasila wrote:I tested the game again, each time with one of the two new AIs removed. TransAI did appear to do something on the 5th, however even without it I had problems. If you would be willing to run my custom-built game, here is the link to the download:
What problems are those? The hang on August 5th is just as I guessed, an AI selecting a large portion of the map in an array. Perhaps I should post a bug report about that:
Code: Select all
(gdb) info thread
2 Thread 0x424c4950 (LWP 12906) 0x00007f33b6aeeb66 in poll () from /lib/libc.so.6
* 1 Thread 0x7f33b963f6f0 (LWP 12903) 0x0000000000489d35 in std::_Identity<int>::operator() (this=0x26af44c0, __x=@0x7fffc165c064) at /usr/include/c++/4.3/bits/stl_function.h:470
(gdb) bt
#0 0x0000000000489d35 in std::_Identity<int>::operator() (this=0x26af44c0, __x=@0x7fffc165c064) at /usr/include/c++/4.3/bits/stl_function.h:470
#1 0x000000000048d0f3 in std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::_M_insert_unique (this=0x2af5528, __v=@0x7fffc165c064) at /usr/include/c++/4.3/[...]
#2 0x000000000048d2e7 in std::set<int, std::less<int>, std::allocator<int> >::insert (this=0x2af5528, __x=@0x7fffc165c064) at /usr/include/c++/4.3/bits/stl_set.h:381
#3 0x0000000000487c2c in AIAbstractList::AddItem (this=0x2af5470, item=9170950) at /home/alve/projekte/wasila/src/ai/api/ai_abstractlist.cpp:402
#4 0x00000000004aa118 in AITileList::AddRectangle (this=0x2af5470, t1=8193, t2=33546238) at /home/alve/projekte/wasila/src/ai/api/ai_tilelist.cpp:38
#5 0x0000000000463e38 in SQConvert::HelperT<void (AITileList::*)(unsigned int, unsigned int), true>::SQCall (instance=0x2af5470, func=0x4aa074 <AITileList::AddRectangle(unsigned int, [...]
at /home/alve/projekte/wasila/src/ai/../script/squirrel_helper.hpp:323
#6 0x000000000047b30a in SQConvert::DefSQNonStaticCallback<AITileList, void (AITileList::*)(unsigned int, unsigned int)> (vm=0x2324000) at /home/alve/projekte/wasila/src/ai/../script/[...]
#7 0x0000000000432bd4 in SQVM::CallNative (this=0x2324000, nclosure=0x24475e0, nargs=3, stackbase=11, retval=@0x7fffc165c4b0, suspend=@0x7fffc165c4af) at /home/alve/projekte/[...]
#8 0x000000000043507d in SQVM::Execute (this=0x2324000, closure=@0xaf42e0, target=9, nargs=-1, stackbase=-1, outres=@0x7fffc165c650, raiseerror=1, et=ET_RESUME_OPENTTD) at [...]
#9 0x0000000000407da5 in sq_resumecatch (v=0x2324000, suspend=10000) at /home/alve/projekte/wasila/src/3rdparty/squirrel/squirrel/sqapi.cpp:1010
#10 0x000000000063441d in Squirrel::Resume (this=0x2313af0, suspend=10000) at /home/alve/projekte/wasila/src/script/squirrel.cpp:179
#11 0x0000000000449e47 in AIInstance::GameLoop (this=0x231cd80) at /home/alve/projekte/wasila/src/ai/ai_instance.cpp:334
#12 0x0000000000440198 in AI::GameLoop () at /home/alve/projekte/wasila/src/ai/ai_core.cpp:69
#13 0x00000000005c9c5a in StateGameLoop () at /home/alve/projekte/wasila/src/openttd.cpp:1165
#14 0x00000000005cafa1 in GameLoop () at /home/alve/projekte/wasila/src/openttd.cpp:1244
#15 0x00000000006c8337 in VideoDriver_SDL::MainLoop (this=0x1955f60) at /home/alve/projekte/wasila/src/video/sdl_v.cpp:501
#16 0x00000000005cbcdf in ttd_main (argc=1, argv=0x7fffc165cd08) at /home/alve/projekte/wasila/src/openttd.cpp:715
#17 0x00000000006b29d6 in main (argc=1, argv=0x7fffc165cd08) at /home/alve/projekte/wasila/src/unix.cpp:251
(gdb)
note "AITileList::AddRectangle" and the numbers. It seems that it selects about all of the map except for the first row - about 32 million tiles; that does take a looong time. After killing off all AIs from the in-game console with "stop_ai <n>" I don't see any obvious problems with this game anymore.
The guy on the picture is not me, it's Alonso.