OpenTTD

Tasklist

FS#6322 - Crash: Out of memory due to AI/GS (in particular when using 32bit build and 32bpp blitter)

Attached to Project: OpenTTD
Opened by Rifani Arsyad (fanioz) - Monday, 15 June 2015, 21:10 GMT
Last edited by frosch (frosch) - Thursday, 21 September 2017, 16:11 GMT
Type Bug
Category Core
Status New
Assigned To No-one
Operating System Windows
Severity Low
Priority High
Reported Version 1.5.0
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

I was just playing the game before sleep. Let it along night, and found it crash upon wake up with the following message " Out of memory. Cannot reallocate 201326592 bytes ". So I can't tell you exactly what happened before crash.
Attached the crash.* file
This task depends upon

Comment by frosch (frosch) - Tuesday, 16 June 2015, 15:19 GMT
Information from crash.dmp:
0012f434 006a6dae 00000016 0bb9a8ab 01000000 openttd!CustomAbort+0x10 [c:\bamboo-agent-home\xml-data\build-dir\ottd-rls-w32bit\src\os\windows\crashlog_win.cpp @ 544]
0012f480 006a60a3 00000016 0043e62c 2074754f openttd!raise+0x17a [f:\dd\vctools\crt_bld\self_x86\crt\src\winsig.c @ 586]
0012f488 0043e62c 2074754f 6d20666f 726f6d65 openttd!abort+0x10 [f:\dd\vctools\crt_bld\self_x86\crt\src\abort.c @ 74]
0012f690 00469d46 00ee2dc0 0c000000 0053de3b openttd!error+0x3e [c:\bamboo-agent-home\xml-data\build-dir\ottd-rls-w32bit\src\openttd.cpp @ 124]
0012f69c 0053de3b 0c000000 42b9dd8c 00530f35 openttd!ReallocError+0xe [c:\bamboo-agent-home\xml-data\build-dir\ottd-rls-w32bit\src\core\alloc_func.cpp @ 31]
0012f6a8 00530f35 49d20020 0c000000 00000000 openttd!sq_vm_realloc+0x40 [c:\bamboo-agent-home\xml-data\build-dir\ottd-rls-w32bit\src\3rdparty\squirrel\squirrel\sqmem.cpp @ 14]
0012f6c0 0052dff8 01000000 00000000 ffffffff openttd!sqvector<SQObjectPtr>::_realloc+0x34 [c:\bamboo-agent-home\xml-data\build-dir\ottd-rls-w32bit\src\3rdparty\squirrel\squirrel\squtils.h @ 106]
0012f6f0 0052f205 08000000 36f7c1e8 0012f708 openttd!SQArray::Append+0x43 [c:\bamboo-agent-home\xml-data\build-dir\ottd-rls-w32bit\src\3rdparty\squirrel\squirrel\sqarray.h @ 60]
0012f700 00531c13 0012f7a0 0054a684 08000000 openttd!sq_arrayappend+0x60 [c:\bamboo-agent-home\xml-data\build-dir\ottd-rls-w32bit\src\3rdparty\squirrel\squirrel\sqapi.cpp @ 287]
0012f708 0054a684 08000000 2ffe9ce0 286dc128 openttd!array_append+0xd [c:\bamboo-agent-home\xml-data\build-dir\ottd-rls-w32bit\src\3rdparty\squirrel\squirrel\sqbaselib.cpp @ 434]
0012f7a0 0054832e 286dc128 26580430 00000006 openttd!SQVM::CallNative+0x413 [c:\bamboo-agent-home\xml-data\build-dir\ottd-rls-w32bit\src\3rdparty\squirrel\squirrel\sqvm.cpp @ 1189]
0012f940 00530608 286dc128 00f3d6f4 00000027 openttd!SQVM::Execute+0x9ca [c:\bamboo-agent-home\xml-data\build-dir\ottd-rls-w32bit\src\3rdparty\squirrel\squirrel\sqvm.cpp @ 798]
0012f99c 0052d167 00001388 00001388 0052bab7 openttd!sq_resumecatch+0x6d [c:\bamboo-agent-home\xml-data\build-dir\ottd-rls-w32bit\src\3rdparty\squirrel\squirrel\sqapi.cpp @ 1022]
0012f9a8 0052bab7 00000000 00000005 00000010 openttd!Squirrel::Resume+0x23 [c:\bamboo-agent-home\xml-data\build-dir\ottd-rls-w32bit\src\script\squirrel.cpp @ 201]
0012f9f4 0054c0a6 26e0a2a8 00000000 13b6af78 openttd!ScriptInstance::GameLoop+0x236 [c:\bamboo-agent-home\xml-data\build-dir\ottd-rls-w32bit\src\script\script_instance.cpp @ 239]
0012fa30 004407c4 13b6af78 00000000 00f6d90c openttd!AI::GameLoop+0xad [c:\bamboo-agent-home\xml-data\build-dir\ottd-rls-w32bit\src\ai\ai_core.cpp @ 80]
0012fb6c 004409b3 76b3a256 00000000 005d3e9d openttd!StateGameLoop+0x142 [c:\bamboo-agent-home\xml-data\build-dir\ottd-rls-w32bit\src\openttd.cpp @ 1389]
0012fb78 005d3e9d 00000000 00000000 0012fde0 openttd!GameLoop+0xea [c:\bamboo-agent-home\xml-data\build-dir\ottd-rls-w32bit\src\openttd.cpp @ 1484]
0012fbc0 0043f90f 02443718 0012fdf8 7ffd4000 openttd!VideoDriver_Win32::MainLoop+0x2f8 [c:\bamboo-agent-home\xml-data\build-dir\ottd-rls-w32bit\src\video\win32_v.cpp @ 1278]
0012fde0 005d61d4 00000001 0012fdf8 00000000 openttd!openttd_main+0xa71 [c:\bamboo-agent-home\xml-data\build-dir\ottd-rls-w32bit\src\openttd.cpp @ 865]
0012fef8 006a84bc 00400000 00000000 00292937 openttd!WinMain+0x7b [c:\bamboo-agent-home\xml-data\build-dir\ottd-rls-w32bit\src\os\windows\win32.cpp @ 457]
0012ff88 764fee1c 7ffd4000 0012ffd4 7740399b openttd!__tmainCRTStartup+0x11a [f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c @ 275]
Comment by frosch (frosch) - Tuesday, 16 June 2015, 15:20 GMT
I.e. the crash was caused by an AI, allocating a huge array.
Comment by James (james1101) - Saturday, 07 October 2017, 20:11 GMT
I've also seen it happen with WmDot, in version 1.7.1:

1. Select WmDot as an AI for the game. (settings to change to which values: Debug Level = 8; Max Atlas Size = 150; Build Attempts = 15)
2. Start new game (large map size, 1M tiles or more or 1k by 1k or larger)
3. Execute console command: "startai" until WmDot starts.
4. Open AI/Game Script Debug window.
5. Wait until it crashes.

Loading...