Visual Studio 9 build

Visual Studio 9 build

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
johanhagelback
Posts: 13
Joined: 17 Sep 2009, 10:49

Visual Studio 9 build

Post by johanhagelback »

Hi,

I managed to compile and link Spring.exe in VS 9. When running Spring it starts, load screen with graphics and text is shown correctly, the map shows and then crash.

It seems it cant handle the AIInterface dll:s used in the pre-compiled Spring version. Infolog shows:

Code: Select all

[      0] 0x61a40000	AIInterface
[      0] 0x6e940000	libgcc_s_dw2-1
[      0] 0x703d0000	dbghelp
[      0] Stacktrace:
[      0] (0) C:\Windows\SysWOW64\ntdll.dll(RtlInitUnicodeString+0x1f3) [0x76EEE29B]
[      0] (1) C:\Windows\SysWOW64\ntdll.dll(RtlFreeHeap+0x7e) [0x76EEDEA3]
[      0] (2) C:\Windows\syswow64\msvcrt.dll(free+0x39) [0x74D398CD]
[      0] (3) C:\Users\jhg\Desktop\Spring\AI\Interfaces\Java\0.1\AIInterface.dll(initStatic+0x2628) [0x61A43A24]
[      0] (4) C:\Users\jhg\Desktop\Spring\AI\Interfaces\Java\0.1\AIInterface.dll(initStatic+0x375) [0x61A41771]
[      0] (5) C:\Users\jhg\Desktop\Spring\spring.exe(skirmishAiCallback_Game_getSpeedFactor+0x1ff48) [0x00459C4E]
[      0] (6) C:\Windows\SysWOW64\ntdll.dll(LdrGetDllHandleEx+0x441) [0x76EEFFF9]
[      0] (7) C:\Windows\SysWOW64\ntdll.dll(LdrGetProcedureAddressEx+0x11f) [0x76EF018A]
[      0] (8) C:\Windows\SysWOW64\ntdll.dll(LdrGetProcedureAddressEx+0x197) [0x76EF0202]
[      0] (9) C:\Windows\syswow64\KERNELBASE.dll(GetProcAddress+0x44) [0x763F11C4]
[      0] (10) C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4926_none_508ed732bcbc0e5a\MSVCR90.dll(free+0xec) [0x66C838DA]
[      0] (11) C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4926_none_508ed732bcbc0e5a\MSVCP90.dll(std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Tidy+0x48) [0x65515E2C]
[      0] (12) C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4926_none_508ed732bcbc0e5a\MSVCP90.dll(std::basic_string<char,std::char_traits<char>,std::allocator<char> >::~basic_string<char,std::char_traits<char>,std::allocator<char> >+0x9) [0x65515EAD]
Happens on both Win 7 x64 and 32.

Any idea how to avoid it without recompiling the AIInterface dll:s (which seems to be quite tricky, havent been able to do it yet).

Cheers,
Johan
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Visual Studio 9 build

Post by hoijui »

if they are compiled for the same OS, and from the same sources, then they should work. so make sure you use the exact same version of the source to compile spring like was used for the interfaces and the AIs.
Did you also try other AIs, eg native ones (RAI, KAIK)?
There is a log in the Java AI Interface dir, not likely in this case, but possibly helpfull.

why do you want to build spring, and only the main executable in VS?
Did you make a project yourself? what about using CMake to generate it, or using the one for VS 2008 that is in the sources? (is 2008 = 9?)
johanhagelback
Posts: 13
Joined: 17 Sep 2009, 10:49

Re: Visual Studio 9 build

Post by johanhagelback »

Visual Studio 2008 = Visual Studio version 9. Microsoft logic? :D I used the vc9 build files.

The same problems occur when using a native skirmish AI, RAI.
The reason I want to compile the engine is that I need to change some of the output that is sent to the ingame console and some information in UI parts. I just learned that I was able to trick around with the luaui files to make this possible so it seems I dont need to recompile the engine.

I am planning a research study about how AI's play RTS games compared to how humans play, and a part of it will be to analyze replays of Spring games (and therefore all info about a bot or a human playing a team must be hidden...).
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Visual Studio 9 build

Post by hoijui »

ahh i see, nice! :-)
well.. i recommend using MinGW anyway.. its not that hard to setup, plus i actualized the instructions a few months ago, should still work fine. just in case you need to compile stuff yourself anyway. The reason to use MinGW is, that most devs use GCC/MinGW, and so that is better supported/more people can help you there/less problems.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Visual Studio 9 build

Post by Tobi »

Realize that, in case you do want to watch replays of games played using the official version, a custom build made in Visual Studio won't help you, as the Visual Studio and MinGW builds of Spring do not synchronize with each other. I.e. the results of simulation may be slightly different, which will quickly snowball into an entirely different game.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Visual Studio 9 build

Post by Beherith »

Tobi wrote: Visual Studio and MinGW builds of Spring do not synchronize with each other
Wow thats some useful info, did not know that.
Post Reply

Return to “Engine”