Bla1AI 0.32 crash info

Bla1AI 0.32 crash info

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

Post Reply
Bla
Posts: 79
Joined: 25 Feb 2013, 14:44

Bla1AI 0.32 crash info

Post by Bla »

My AI crashed when I was playing a 1v1 against it, and here is the output from infolog

Code: Select all

[f=0018858] Warning: [Watchdog] Hang detection triggered for Spring 96.0.
[f=0018858] Warning:   (in thread: main)
[f=0018858] Warning: DLL information:
[f=0018858] Error: 0x00400000	spring
[f=0018858] Error: 0x770e0000	ntdll
[f=0018858] Error: 0x74b50000	kernel32
[f=0018858] Error: 0x75560000	KERNELBASE
[f=0018858] Error: 0x753f0000	ADVAPI32
[f=0018858] Error: 0x764e0000	msvcrt
[f=0018858] Error: 0x76710000	sechost
[f=0018858] Error: 0x75180000	RPCRT4
[f=0018858] Error: 0x74af0000	SspiCli
[f=0018858] Error: 0x74ae0000	CRYPTBASE
[f=0018858] Error: 0x634a0000	GLU32
[f=0018858] Error: 0x60bf0000	OPENGL32
[f=0018858] Error: 0x76b00000	GDI32
[f=0018858] Error: 0x74eb0000	USER32
[f=0018858] Error: 0x76700000	LPK
[f=0018858] Error: 0x76660000	USP10
[f=0018858] Error: 0x60b00000	DDRAW
[f=0018858] Error: 0x68600000	DCIMAN32
[f=0018858] Error: 0x76950000	SETUPAPI
[f=0018858] Error: 0x75300000	CFGMGR32
[f=0018858] Error: 0x755c0000	OLEAUT32
[f=0018858] Error: 0x75690000	ole32
[f=0018858] Error: 0x74c60000	DEVOBJ
[f=0018858] Error: 0x71ec0000	dwmapi
[f=0018858] Error: 0x76b90000	IMAGEHLP
[f=0018858] Error: 0x75890000	SHELL32
[f=0018858] Error: 0x75830000	SHLWAPI
[f=0018858] Error: 0x72db0000	WINMM
[f=0018858] Error: 0x757f0000	WS2_32
[f=0018858] Error: 0x76650000	NSI
[f=0018858] Error: 0x10000000	DevIL
[f=0018858] Error: 0x72e00000	MSVCP80
[f=0018858] Error: 0x72e90000	MSVCR80
[f=0018858] Error: 0x6b600000	OpenAL32
[f=0018858] Error: 0x70780000	vorbisfile
[f=0018858] Error: 0x68140000	ogg
[f=0018858] Error: 0x64cc0000	vorbis
[f=0018858] Error: 0x62e80000	zlib1
[f=0018858] Error: 0x66fc0000	freetype6
[f=0018858] Error: 0x62aa0000	glew32
[f=0018858] Error: 0x00330000	SDL
[f=0018858] Error: 0x7c340000	MSVCR71
[f=0018858] Error: 0x74c90000	IMM32
[f=0018858] Error: 0x75490000	MSCTF
[f=0018858] Error: 0x683e0000	dsound
[f=0018858] Error: 0x720d0000	POWRPROF
[f=0018858] Error: 0x765c0000	CLBCatQ
[f=0018858] Error: 0x6cbe0000	MMDevApi
[f=0018858] Error: 0x6d640000	PROPSYS
[f=0018858] Error: 0x63470000	wdmaud
[f=0018858] Error: 0x6dd20000	ksuser
[f=0018858] Error: 0x6ece0000	AVRT
[f=0018858] Error: 0x6cba0000	AUDIOSES
[f=0018858] Error: 0x6cd40000	msacm32
[f=0018858] Error: 0x71f20000	MSACM32
[f=0018858] Error: 0x683a0000	midimap
[f=0018858] Error: 0x75680000	profapi
[f=0018858] Error: 0x71ff0000	uxtheme
[f=0018858] Error: 0x61ee0000	FRAPS32
[f=0018858] Error: 0x685c0000	atiglpxx
[f=0018858] Error: 0x60aa0000	atiadlxy
[f=0018858] Error: 0x75660000	USERENV
[f=0018858] Error: 0x73320000	WTSAPI32
[f=0018858] Error: 0x750f0000	PSAPI
[f=0018858] Error: 0x76590000	WINTRUST
[f=0018858] Error: 0x74fd0000	CRYPT32
[f=0018858] Error: 0x755b0000	MSASN1
[f=0018858] Error: 0x69030000	atioglxx
[f=0018858] Error: 0x74690000	VERSION
[f=0018858] Error: 0x6cfe0000	aticfx32
[f=0018858] Error: 0x67300000	atigktxx
[f=0018858] Error: 0x60a70000	DINPUT
[f=0018858] Error: 0x67260000	HID
[f=0018858] Error: 0x742c0000	mswsock
[f=0018858] Error: 0x739f0000	wship6
[f=0018858] Error: 0x742b0000	wshtcpip
[f=0018858] Error: 0x0fc70000	AIInterface
[f=0018858] Error: 0x5fea0000	jvm
[f=0018858] Error: 0x723e0000	WSOCK32
[f=0018858] Error: 0x722b0000	MSVCR100
[f=0018858] Error: 0x67150000	verify
[f=0018858] Error: 0x63450000	java
[f=0018858] Error: 0x60a50000	zip
[f=0018858] Error: 0x74300000	dbghelp
[f=0018858] Warning: Stacktrace (main) for Spring 96.0:
[f=0018858] Warning: (0) Unknown [0x2ECA0C07]
[f=0018858] Warning: (1) Unknown [0x2ECB63B8]
[f=0018858] Warning: (2) C:\Program Files (x86)\Java\jre7\bin\client\jvm.dll(JVM_Clone+0x4346a) [0x5FFE10FA]
[f=0018858] Warning: (3) C:\Program Files (x86)\Java\jre7\bin\client\jvm.dll(JVM_FindSignal+0x62f2e) [0x600A567E]
[f=0018858] Warning: (4) C:\Program Files (x86)\Java\jre7\bin\client\jvm.dll(JVM_Clone+0x434ed) [0x5FFE117D]
[f=0018858] Warning: (5) C:\Program Files (x86)\Java\jre7\bin\client\jvm.dll(JNI_CreateJavaVM+0xd52) [0x5FF6AA72]
[f=0018858] Warning: (6) C:\Program Files (x86)\Java\jre7\bin\client\jvm.dll(JNI_CreateJavaVM+0x311f) [0x5FF6CE3F]
[f=0018858] Warning: (7) C:\Users\Richard\Documents\My Games\Spring\engine\96.0\AI\Interfaces\Java\0.1\AIInterface.dll(Java_com_springrts_ai_JniAICallback_Debug_1OverlayTexture_1setLabel+0x7e4) [0x0FC89184]
[f=0018858] Warning: (8) C:\Users\Richard\Documents\My Games\Spring\engine\96.0\AI\Interfaces\Java\0.1\AIInterface.dll(unloadAllSkirmishAILibraries+0x213f) [0x0FC73D4F]
[f=0018858] Warning: (9) C:\Users\Richard\Documents\My Games\Spring\engine\96.0\spring.exe(skirmishAiCallback_Cheats_setEnabled+0x2dea) [0x0090563A]
[f=0018858] Warning: (10) C:\Users\Richard\Documents\My Games\Spring\engine\96.0\spring.exe(skirmishAiCallback_Cheats_setEnabled+0xa352) [0x0090CBA2]
[f=0018858] Warning: (11) C:\Users\Richard\Documents\My Games\Spring\engine\96.0\spring.exe [0x008E92EA]
[f=0018858] Warning: (12) C:\Users\Richard\Documents\My Games\Spring\engine\96.0\spring.exe [0x00426347]
[f=0018858] Warning: (13) C:\Users\Richard\Documents\My Games\Spring\engine\96.0\spring.exe [0x0050EA36]
[f=0018858] Warning: (14) C:\Users\Richard\Documents\My Games\Spring\engine\96.0\spring.exe [0x0042F3F9]
[f=0018858] Warning: (15) C:\Users\Richard\Documents\My Games\Spring\engine\96.0\spring.exe [0x00887CA4]
[f=0018858] Warning: (16) C:\Users\Richard\Documents\My Games\Spring\engine\96.0\spring.exe [0x008968A4]
[f=0018858] Warning: (17) C:\Users\Richard\Documents\My Games\Spring\engine\96.0\spring.exe [0x00872956]
[f=0018858] Warning: (18) C:\Users\Richard\Documents\My Games\Spring\engine\96.0\spring.exe [0x0087376C]
[f=0018858] Warning: (19) C:\Users\Richard\Documents\My Games\Spring\engine\96.0\spring.exe [0x0087398D]
[f=0018858] Warning: (20) C:\Users\Richard\Documents\My Games\Spring\engine\96.0\spring.exe [0x00401402]
[f=0018858] Warning: (21) C:\Windows\syswow64\kernel32.dll(BaseThreadInitThunk+0x12) [0x74B6338A]
[f=0018858] Warning: (22) C:\Windows\SysWOW64\ntdll.dll(RtlInitializeExceptionChain+0x63) [0x77119F72]
[f=0018858] Warning: (23) C:\Windows\SysWOW64\ntdll.dll(RtlInitializeExceptionChain+0x36) [0x77119F45]
[f=0018858] Warning: Stacktrace (audio) for Spring 96.0:
[f=0018858] Warning: (0) C:\Windows\SysWOW64\ntdll.dll(ZwWaitForMultipleObjects+0x15) [0x7710015D]
[f=0018858] Warning: (1) C:\Windows\syswow64\kernel32.dll(WaitForMultipleObjectsEx+0x8e) [0x74B619F8]
[f=0018858] Warning: (2) C:\Windows\syswow64\kernel32.dll(WaitForMultipleObjects+0x18) [0x74B64200]
[f=0018858] Warning: (3) C:\Users\Richard\Documents\My Games\Spring\engine\96.0\spring.exe(skirmishAiCallback_Cheats_setEnabled+0x29b10c) [0x00B9D95C]
[f=0018858] Warning: (4) C:\Users\Richard\Documents\My Games\Spring\engine\96.0\spring.exe(skirmishAiCallback_Cheats_setEnabled+0x3a7e14) [0x00CAA664]
[f=0018858] Warning: (5) C:\Users\Richard\Documents\My Games\Spring\engine\96.0\spring.exe(skirmishAiCallback_Cheats_setEnabled+0x299c37) [0x00B9C487]
[f=0018858] Warning: (6) C:\Windows\SysWOW64\ntdll.dll(RtlInitializeExceptionChain+0x63) [0x77119F72]
[f=0018858] Warning: (7) C:\Windows\SysWOW64\ntdll.dll(RtlInitializeExceptionChain+0x36) [0x77119F45]
I have no idea what could be the error. There is something in there about setCheatsEnabled, but my AI doesn't even use cheats. It's combat mechanism is very basic expand, and send raiders to wherever you get attacked.

Does anyone have any ideas what might be going on? Is this an error with my AI, or maybe the java AI wrapper or something else outside what I wrote?
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Bla1AI 0.32 crash info

Post by hoijui »

when it crashes, please always give the whole infolog, and attach it as a file through the forum or pastebin.com or the like.
i am not sure how this works these days, but back then, when you crashed on windows, you had to supply the infolog to some web-service that translated the memory addresses to sourcefile:line-numbers.
an other thing you could try, is to wrapp all your code in the events you get from the engine in catch Throwable blocks, like this:

Code: Select all

void eventUnitKilled() {
    try {
        // all of your code here
    } catch (Throwable t) {
        t.printStackTrace();
    }
}
could it be OutOfMemoryError?
Bla
Posts: 79
Joined: 25 Feb 2013, 14:44

Re: Bla1AI 0.32 crash info

Post by Bla »

Yeah, I did wrap it in try and catch blocks, and added sendTextMessage statements in the catch blocks, but got no messages... Gah, I think I played more games since then and lost the infolog :(
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Bla1AI 0.32 crash info

Post by hoijui »

mmm...
maybe you could write the error directly into a file instead, and make surte the file writer (or whatever) is open already, when the error occurs.
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

Re: Bla1AI 0.32 crash info

Post by Anarchid »

Is the AI source code available anywhere?
User avatar
nixtux
TechA Developer
Posts: 100
Joined: 01 Mar 2009, 15:36

Re: Bla1AI 0.32 crash info

Post by nixtux »

Not sure if it's his latest version but you can get it from here http://springfiles.com/spring/ai-opponents/bla1ai
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Bla1AI 0.32 crash info

Post by abma »

[f=0018858] Warning: [Watchdog] Hang detection triggered for Spring 96.0.
thats no crash, very likely its an endless loop. if it crashes it says sth. like "Spring 96.0 crashed".


translated:
C:\Program Files (x86)\Java\jre7\bin\client\jvm.dll 0x5FFE10FA ??:0
C:\Program Files (x86)\Java\jre7\bin\client\jvm.dll 0x600A567E ??:0
C:\Program Files (x86)\Java\jre7\bin\client\jvm.dll 0x5FFE117D ??:0
C:\Program Files (x86)\Java\jre7\bin\client\jvm.dll 0x5FF6AA72 ??:0
C:\Program Files (x86)\Java\jre7\bin\client\jvm.dll 0x5FF6CE3F ??:0
C:\Users\Richard\Documents\My Games\Spring\engine\96.0\AI\Interfaces\Java\0.1\AIInterface.dll 0x0FC89184 ??:0
C:\Users\Richard\Documents\My Games\Spring\engine\96.0\AI\Interfaces\Java\0.1\AIInterface.dll 0x0FC73D4F ??:0
C:\Users\Richard\Documents\My Games\Spring\engine\96.0\spring.exe 0x0090563A rts/ExternalAI/SkirmishAI.cpp:57
C:\Users\Richard\Documents\My Games\Spring\engine\96.0\spring.exe 0x0090CBA2 rts/ExternalAI/SkirmishAIWrapper.cpp:387
C:\Users\Richard\Documents\My Games\Spring\engine\96.0\spring.exe 0x008E92EA /opt/mxe/usr/lib/gcc/i686-w64-mingw32/4.8.1/include/c++/bits/stl_tree.h:189
C:\Users\Richard\Documents\My Games\Spring\engine\96.0\spring.exe 0x00426347 rts/Game/Game.cpp:1596
C:\Users\Richard\Documents\My Games\Spring\engine\96.0\spring.exe 0x0050EA36 rts/System/Sync/SyncChecker.h:37
C:\Users\Richard\Documents\My Games\Spring\engine\96.0\spring.exe 0x0042F3F9 rts/Game/Game.cpp:983
C:\Users\Richard\Documents\My Games\Spring\engine\96.0\spring.exe 0x00887CA4 /slave/mingwlibs/include/boost/optional/optional.hpp:438
C:\Users\Richard\Documents\My Games\Spring\engine\96.0\spring.exe 0x008968A4 rts/System/SpringApp.cpp:1034
C:\Users\Richard\Documents\My Games\Spring\engine\96.0\spring.exe 0x00872956 rts/System/Main.cpp:65
C:\Users\Richard\Documents\My Games\Spring\engine\96.0\spring.exe 0x0087376C rts/System/Main.cpp:125
C:\Users\Richard\Documents\My Games\Spring\engine\96.0\spring.exe 0x0087398D rts/System/Main.cpp:134
C:\Users\Richard\Documents\My Games\Spring\engine\96.0\spring.exe 0x00401402 crtexe.c:0
C:\Windows\syswow64\kernel32.dll 0x74B6338A ??:0
C:\Windows\SysWOW64\ntdll.dll 0x77119F72 ??:0
C:\Windows\SysWOW64\ntdll.dll 0x77119F45 ??:0
C:\Windows\SysWOW64\ntdll.dll 0x7710015D ??:0
C:\Windows\syswow64\kernel32.dll 0x74B619F8 ??:0
C:\Windows\syswow64\kernel32.dll 0x74B64200 ??:0
C:\Users\Richard\Documents\My Games\Spring\engine\96.0\spring.exe 0x00B9D95C thread.cpp:0
C:\Users\Richard\Documents\My Games\Spring\engine\96.0\spring.exe 0x00CAA664 /slave/mingwlibs/include/boost/thread/detail/thread.hpp:118
C:\Users\Richard\Documents\My Games\Spring\engine\96.0\spring.exe 0x00B9C487 thread.cpp:0
C:\Windows\SysWOW64\ntdll.dll 0x77119F72 ??:0
C:\Windows\SysWOW64\ntdll.dll 0x77119F45 ??:0
rts/ExternalAI/SkirmishAIWrapper.cpp:387 is Update(int frame), so check your ai for an endless loop in Update().
Bla
Posts: 79
Joined: 25 Feb 2013, 14:44

Re: Bla1AI 0.32 crash info

Post by Bla »

rts/ExternalAI/SkirmishAIWrapper.cpp:387 is Update(int frame), so check your ai for an endless loop in Update().[/quote]
Ah thanks!
Hm, this is the only loop in my code and only place for an infinite loop, and I'm having a hard time finding the error.

Code: Select all

boolean notInRange = true;
Unit uni = uManage.getNextBuilderNotCom();
     AIFloat3 loc = uManage.getFacPos();
     while(notInRange){
          loc.x+= 2*(Math.random()-0.5)*findAppropriateNano(uni).getBuildDistance();
          loc.z+= 2*(Math.random()-0.5)*findAppropriateNano(uni).getBuildDistance(); // I noticed the z coordinate is actually the y coordinate
          if(Math.sqrt(CallbackHelper.getDistanceBetween(uManage.getFacPos(),loc))<=findAppropriateNano(uni).getBuildDistance())
                                notInRange=false;
                        }
It's supposed to be an algorithm to build nanos randomly around a factory , but in range. I thought it worked, but I tried simulating this

It adds a random number from the negative nano build distance to the positive nano build distance to the nano build location, then checks to see if the distance to the factory is shorter than the nano build distance, then builds it.

PS, sorry about my slow reply, I was kind of busy lately with school and such that I didn't have time to get into leisure coding

EDIT: wait... found my error I created AIFloat3 outside the loop, thus coordinates outside the fac only get messed up more and more...
playerO1
Posts: 57
Joined: 25 Jun 2014, 15:22

Re: Bla1AI 0.32 crash info

Post by playerO1 »

findAppropriateNano(uni).getBuildDistance();
I'm not wiev you last source, but I recomended check on null value before call some methods.
Post Reply

Return to “AI”