When this bug happens: spring "frozen", spring mouse cursor don't moving (native cursor moving) and spring start eat memory 1 Gb per 20 second, up to 4-5 Gb, next from 1 minute Spring close and show out of memory message.
My bot some time may using ower that 2 second per 1 game frime. I see on Java AI Interface exist config files for JVM settings, they have rule for limited 1 bot memory up to 64 Mb defauld, that means the memory leak can not contain on bot logic.
Some ideas for how fix this bug and what reason for this bug maybe?
How test Java AI where Spring is runing? I mean how debug bot's by NetBeans SDK, use watch variables and break points when game run? How using profiler for check BOT CPU and memoru usage?
P.S.: I found how repeat this crash in single player.
1. if start play on EvoRTS and build unit "ORB" and afther 1-2 second crash.
My bot log:
Code: Select all
...
commandFinished
unitCreated: eorb
release: reason=0
My bot log:
Code: Select all
unitCreated: armcom1
Now AI have new Tech Up to -1 tech level! (onAddUnit)
Unit from uncknown owner base add to base.
unitFinished
release: reason=0
Code: Select all
[f=0000000] Connection attempt from ME
[f=0000000] -> Version: 96.0
[f=0000000] Epicmenu: Switching to Total Annihilation camera mode
[f=0000000] -> Connection established (given id 0)
[f=0000000] Mexspot Fetcher received
[f=0000000] Player ME finished loading and is now ingame
[f=0000000] Mex Placement Initialised with 58 spots.
[f=0000000] <ME> Allies: I choose: Battle Commander!
[f=0000000] GameID: 0fa4f853888541ab11c8550e1cdf4421
[f=0000000] <SkirmishAI: FieldBOT dev (team 0)>: Now AI have new Tech Up to -1 tech level! (onAddUnit)
[f=0000000] Error: Failed to allocate memory
[f=0000000] Error: Stacktrace for Spring 96.0:
[f=0000000] Error: <0> ??:?
[f=0000000] Error: <1> /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_Znwm+0x3b) [0x7fb002f66f4b]
[f=0000000] Error: <2> /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSs4_Rep9_S_createEmmRKSaIcE+0x59) [0x7fb002fc23b9]
[f=0000000] Error: <3> /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSs9_M_mutateEmmm+0x56) [0x7fb002fc2546]
[f=0000000] Error: <4> /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSs15_M_replace_safeEmmPKcm+0x1e) [0x7fb002fc2aee]
[f=0000000] Error: <5> /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSs7replaceEmmPKcm+0x5f) [0x7fb002fc3c0f]
[f=0000000] Error: <6> ??:?
[f=0000000] Error: <7> ??:?
...
[f=0000000] Error: <30> ??:?
[f=0000000] Error: <31> ??:?
[f=0000000] Error: <32> /usr/games/spring() [0x482ecc]
[f=0000000] Error: <33> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7fb002641ec5]
[f=0000000] Error: <34> ??:?