Effects crashing the game after time

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
User avatar
Roguey
Posts: 1438
Joined: Tue, 6. May 03, 17:31
x4

Effects crashing the game after time

Post by Roguey » Sun, 2. Feb 14, 11:41

hi there, I wonder if someone could help me with a problem I have been having. I have added some weapon-flashes to the PPC, GAUSS and ISR. However after a random amount of time X3AP crashes with:
The exception "Access violation" (0xc0000005) was caused at address 0023:710e8aa5
There is a mdmp file there, although I am not sure how to open it. I have traced it to the effects file, to my new effects (of-which I have no idea why they are causing a problem, everything looks right to me). Maybe there is something there causing the game to overflow or something? However normally when something is wrong with a effect, shouldnt it crash straight-away? This can work for 5-10mins, then crash.

Code: Select all

203;1;EDF_REINIT;0;1.0; // PPC launch
  EEDF_FADEOUT|EEDF_GROWANDSHRINK|EEDF_TIMEOUT;I3DF_2D; // idx 0
    184;0.1;1.0;120;0.0;0;0;0;-1;0;0.25;0;

204;1;EDF_REINIT;0;1.0; // GUASS launch
  EEDF_FADEOUT|EEDF_GROWANDSHRINK|EEDF_TIMEOUT;I3DF_2D; // idx 0
    136;0.1;0.8;120;0.0;0;0;0;-1;0;0.25;0;

205;1;EDF_REINIT;0;1.0; // ION-RAIL launch
  EEDF_FADEOUT|EEDF_GROWANDSHRINK|EEDF_TIMEOUT;I3DF_2D; // idx 0
    182;0.1;0.4;120;0.0;0;0;0;-1;0;0.25;0;
Here is the bug in action (you may want to whizz to the end);
http://www.youtube.com/watch?v=3JoKWFa0RTE

Many thanks
Roguey's Site: X3TC, X3AP, X3FL, X4.

ShadowPhantom
Posts: 17
Joined: Mon, 13. May 13, 18:14
x3tc

Post by ShadowPhantom » Mon, 3. Feb 14, 09:19

As for mdmp files, you can open them with something like this: http://www.nirsoft.net/utils/blue_screen_view.html

I'm not sure it will be very helpful, but anyway it's good to know.

Oh, and thank you so much for http://roguey.co.uk/x3ap/, I use it very often! :)

User avatar
Roguey
Posts: 1438
Joined: Tue, 6. May 03, 17:31
x4

Post by Roguey » Mon, 3. Feb 14, 19:18

Thanks ShadowPhantom for the suggestion. I tried that program but it didnt seem to find anything to open (even when it was told where to look).

I think found what is happening (but not sure why its happening). If I change the 2D sprite into a Lens-flare, then the game doesnt crash. When testing, it looks like the engine crashes due to a overload of effects (even producing some weird textures to pop-up). When its changed to a lenflare, the engine culls the effect (if too much is going on) keeps going. Must be to do with how the game handles 2D sprites.

Very strange...
Roguey's Site: X3TC, X3AP, X3FL, X4.

zanzal
Posts: 309
Joined: Sat, 15. Sep 12, 07:42
x3tc

Re: Effects crashing the game after time

Post by zanzal » Mon, 3. Feb 14, 20:58

Roguey wrote:Maybe there is something there causing the game to overflow or something? However normally when something is wrong with a effect, shouldnt it crash straight-away? This can work for 5-10mins, then crash.
I assume your effect is the muzzle flash? Maybe reduce the ROF on the guns and see if it helps.

My gut feeling is that this is exactly what you mention above. A limitation in the number of active effects. Which would be why it takes some time before the crash occurs. Sounds like a C array that doesn't have proper bounds checking, or some such.. Not a problem until the size of the array reaches max and then some other part of memory gets overwritten.

I'd recommend emailing a dev. If you can show how to recreate from a vanilla install, maybe package up a mini test mod for them, they can probably find where it is happening and give some advice on how to avoid it.

User avatar
Roguey
Posts: 1438
Joined: Tue, 6. May 03, 17:31
x4

Post by Roguey » Tue, 4. Feb 14, 12:16

I'd recommend emailing a dev. If you can show how to recreate from a vanilla install, maybe package up a mini test mod for them, they can probably find where it is happening and give some advice on how to avoid it.
Well I would but I think they are busy patching XR atm. If I have an way around the problem, then its not so bad. Hopefully this post might help anyone else having the same problem (use lensflares, rather than 2d effects).
Roguey's Site: X3TC, X3AP, X3FL, X4.

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”