Jump to content
AeronautEdward

[XCE 34.2] Game locks up on carrier GC

Recommended Posts

After 1-3 turns on ground combat assault of a downed carrier, the game locks up and gets, well, stuck on the AI turn, it will not respond but does not crash, simply locking up. I tried reloading multiple times to no avail, nothing out of ordinary on the screen. Happened twice when I was assaulting a crashed carrier with 6 wraiths and 14 Ceasans with a leader on the ship. Dropship used was the Valkyrie. I hacked the research.xml, and the 120-degree view mod. OS: Windows 10

To reproduce:

-Use the provided GC save file.

-Play for 1-3 turns untill game locks up.

-Bug Get!

researches.xml

Screenshot (79).png

Screenshot (80).png

armours_gc.xml

GC.sav

Humor: (I just have to.) If i was a COD kid i would be saying: omg aliens using gamefreeze hack Goldhawk pls ban!!11!!1!1111

Edited by AeronautEdward
Made steps to reproduce more clear.

Share this post


Link to post
Share on other sites

I have run this save game under wine in X:CE 32.4HF.  It has two problems.  It allocates a whole bunch of texture maps and starts getting out of memory errors allocating textures.

Before it can crash for that reason which it usually does in my games, it encounters a deadlock condition between the first thread started by the game and a thread started much much later.  A race condition with occasional deadlock would explain the slow alien turn bug.

Here's some of the errors coughed up by wine:

 

err:d3d:wined3d_debug_callback 0x1b1af8: "GL_OUT_OF_MEMORY error generated. Failed to allocate memory for texture.".
err:d3d:wined3d_debug_callback 0x1b1af8: "GL_OUT_OF_MEMORY error generated. Failed to allocate memory for texture.".
err:d3d:wined3d_debug_callback 0x1b1af8: "GL_OUT_OF_MEMORY error generated. Failed to allocate memory for texture.".
err:d3d:wined3d_debug_callback 0x1b1af8: "GL_OUT_OF_MEMORY error generated. Failed to allocate memory for texture.".
err:d3d:wined3d_debug_callback 0x1b1af8: "GL_OUT_OF_MEMORY error generated. Failed to allocate memory for texture.".
err:d3d:wined3d_debug_callback 0x1b1af8: "GL_OUT_OF_MEMORY error generated. Failed to allocate memory for texture.".
err:d3d:wined3d_debug_callback 0x1b1af8: "GL_OUT_OF_MEMORY error generated. Failed to allocate memory for texture.".
err:d3d:wined3d_debug_callback 0x1b1af8: "GL_OUT_OF_MEMORY error generated. Failed to allocate memory for texture.".
err:d3d:wined3d_debug_callback 0x1b1af8: "GL_OUT_OF_MEMORY error generated. Failed to allocate memory for texture.".
err:d3d:wined3d_debug_callback 0x1b1af8: "GL_OUT_OF_MEMORY error generated. Failed to allocate memory for texture.".
err:d3d:wined3d_debug_callback 0x1b1af8: "GL_OUT_OF_MEMORY error generated. Failed to allocate memory for texture.".
err:d3d:wined3d_debug_callback 0x1b1af8: "GL_OUT_OF_MEMORY error generated. Failed to allocate memory for texture.".
err:d3d:wined3d_debug_callback 0x1b1af8: "GL_OUT_OF_MEMORY error generated. Failed to allocate memory for texture.".
err:d3d:wined3d_debug_callback 0x1b1af8: "GL_OUT_OF_MEMORY error generated. Failed to allocate memory for texture.".
err:ntdll:RtlpWaitForCriticalSection section 0x44b36854 "?" wait timed out in thread 0045, blocked by 0000, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x44b36854 "?" wait timed out in thread 0045, blocked by 0000, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x44b36854 "?" wait timed out in thread 0045, blocked by 0000, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x44b36854 "?" wait timed out in thread 0045, blocked by 0000, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x44b36854 "?" wait timed out in thread 0045, blocked by 0000, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x44b36854 "?" wait timed out in thread 0045, blocked by 0000, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x44b36854 "?" wait timed out in thread 0045, blocked by 0000, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x44b36854 "?" wait timed out in thread 0045, blocked by 0000, retrying (60 sec)

 

 

 

 

 

Share this post


Link to post
Share on other sites

It appears that the X:CE executable is not being built with the large address aware flag and as a result, the program runs out of address space with the texture maps.

I was able to download the following tool that hacks the binary to change that flag and all of my problems with running out of memory on wine went away.   I think there may be a compiler option in the build but this tool fixed the problems for me.

http://www.moddb.com/downloads/large-address-aware1

Edited by ckelloug
typo

Share this post


Link to post
Share on other sites

Yeah, there's a linker option to that effect. I cannot claim much familiarity with the MS tech stack though so am not sure how safe applying the flag is. For instance, how will that affect memory allocation when running on 64-bit Windows, that is, most computers? And can I be reasonably sure that the game engine doesn't do ugly hacks with pointers that would break?

Share this post


Link to post
Share on other sites
1 hour ago, Solver said:

Yeah, there's a linker option to that effect. I cannot claim much familiarity with the MS tech stack though so am not sure how safe applying the flag is. For instance, how will that affect memory allocation when running on 64-bit Windows, that is, most computers? And can I be reasonably sure that the game engine doesn't do ugly hacks with pointers that would break?

Compile a test exe and let me test it. I run win 7 64 bit, gtx 970, amd 4,4 ghz and can give all other data on request.

Share this post


Link to post
Share on other sites

It probably won't break anything immediately. What I am unsure about is the long-term stability.

Share this post


Link to post
Share on other sites

I cant follow you, tell me an example.

Im more thinking about my current texture error. As i have a perfect map giving the game the limits it can run on i can immidiatelly tell you if that expands on something or not.

Share this post


Link to post
Share on other sites

I'm not an expert on the microsoft stack either but I've played through the game once using the hacking tool under wine on linux and had only a few hangs rather than every mission with larger than a scout UFO causing the out of memory problem.  The Large address aware flag should be fine on 64 bit windows.  What it does is tell the linker that it's okay for the 32 bit code to use memory addresses between 2gb and 4gb.  From extensive googlation many many games from this era had the exact same problem. 

Share this post


Link to post
Share on other sites

Thanks for the info. The game has to be compiled with VC++ 2008 and I see the linker option also exists back in that tool, so might be worth doing. I wouldn't be surprised if something in the engine breaks when using that much memory anyway, but it starts acting up anyway when pushed to its limits.

Share this post


Link to post
Share on other sites

I remember using that hack for the Total War Rome mod: Roma Surrectum 2 and it was basically a requirement to run the game with all their hd textures. Didnt cause more instability than the game already had.

Share this post


Link to post
Share on other sites

@ckelloug Im still deciding if i should marry you. Nevertheless this solved some major blockades for X-Division, and may lead to a totally new map design in the future. Ofcourse @Solver did all the work :).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×