[g4.11.3] Crash : Call to a custom function causes GZDoom crash

Is there something that doesn't work right in the latest GZDoom? Post about it here.

Moderator: GZDoom Developers

Forum rules
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.

If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.

Please make a new topic for every bug. Don't combine multiple bugs into a single topic. Thanks!
User avatar
Pyhrrous
Posts: 16
Joined: Tue Jul 14, 2020 6:11 pm

[g4.11.3] Crash : Call to a custom function causes GZDoom crash

Post by Pyhrrous »

This is for the g4.11.3 version of GZDoom.

Whenever my code runs a call to a function LedgeGrabInitiator()in this customized PlayerPawn, it crashes GZDoom (demonstrated in the YouTube video below)



You can download (a reduced version of) the code here. It comes alongside my cvar settings and a .txt file of the crash log that appears when the bug happens, for convenience's sake.
https://drive.google.com/file/d/1RgTiLc ... sp=sharing

Some notes:
- This function hasn't been an issue until today. The problem only started happening after I got rid of one of the variables used by LedgeGrabInitiator() and I created this ticket here after being told to submit this as a bug.
- The bug sometimes doesn't happen consistently, and I'm not sure why. I've had moments where it wouldn't happen after I inserted some A_Log calls to figure out where the crash happens in the code.
- The precise line in ZMovePlayer.zsc that has the bug appears to be at line 661. GZDoom doesn't seem to make it to the A_Log call at the very start of LedgeGrabInitiator().
- LedgeGrabInitiator() only gets called while the playerpawn is airborne; in the first demonstration of the bug, that happens when I walk off the starting platform in Congo, while in the second, it happens because I jump.
User avatar
Rachael
Posts: 13885
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: [g4.11.3] Crash : Call to a custom function causes GZDoom crash

Post by Rachael »

Does it still crash when you run gzdoom with +vm_jit false?
User avatar
Pyhrrous
Posts: 16
Joined: Tue Jul 14, 2020 6:11 pm

Re: [g4.11.3] Crash : Call to a custom function causes GZDoom crash

Post by Pyhrrous »

Rachael wrote: Sun Jan 14, 2024 4:19 pm Does it still crash when you run gzdoom with +vm_jit false?
Just tried this a couple times, and as far as I can tell, it doesn't when I use that command line param.
User avatar
Rachael
Posts: 13885
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: [g4.11.3] Crash : Call to a custom function causes GZDoom crash

Post by Rachael »

I checked your code and I couldn't see anything immediately wrong with it, so that was the only conclusion I could come up with. I am leaving this open but, I am not sure how long it will take for anyone knowledgeable enough about the JIT who would be interested in fixing it to appear.

In the meantime you can try and juke things by putting things in a different order, i.e. saving the bool-check to a variable and testing against the variable rather than testing against the bool-check directly. It's unpleasant and yes it does make for messier code but sometimes it works around these odd issues.

Return to “Bugs [GZDoom]”