Page 1 of 1

PWAD: GZDooM Crashes With No Crash Log

PostPosted: Tue Feb 19, 2019 2:06 pm
by ReX
I am using GZDooM 3.7.2 Legacy, which works fine in general. However, when I run it with a particular file, GZDooM crashes with no crash log. [It does the same thing with v3.7.1 also.] All I get is the following message:

GZDooM Crash.jpg


For this reason, I can't tell what is the offending aspect of the file.

I tried uploading the file, but it is too large for the forums. Accordingly, I've uploaded it here. It is based on Ryan Cordell's Dark Forces Mod, which runs just fine with GZDooM. This tells me that something in my edits is causing the problem, but I can't figure out what. I've tried selectively deleting some of the lumps (which didn't reveal the problem), but there are too many edits to experiment with.

I'd appreciate any insights into why the wad won't run with GZDooM.

Re: PWAD: GZDooM Crashes With No Crash Log

PostPosted: Tue Feb 19, 2019 2:40 pm
by Graf Zahl
Does it work with the modern version?

Re: PWAD: GZDooM Crashes With No Crash Log

PostPosted: Tue Feb 19, 2019 2:49 pm
by drfrag
3.7.0_legacy doesn't crash.

Re: PWAD: GZDooM Crashes With No Crash Log

PostPosted: Tue Feb 19, 2019 3:12 pm
by ReX
Graf Zahl wrote:Does it work with the modern version?

I don’t have newer hardware with which to test the Modern version. However, it’s heartening to know that @drfrag is able to run it with an earlier version of GZDooM. This tells me that I might not have done anything wrong after all.

Re: PWAD: GZDooM Crashes With No Crash Log

PostPosted: Tue Feb 19, 2019 3:23 pm
by drfrag
Runs with 3.7.2_legacy as well, for me it only crashes in software mode. 3.7.0_legacy also crashes now.

Re: PWAD: GZDooM Crashes With No Crash Log

PostPosted: Tue Feb 19, 2019 3:58 pm
by drfrag
Crashes with 3.4.1 (vid_rendermode 1), module with errors: riched20.dll.

Re: PWAD: GZDooM Crashes With No Crash Log

PostPosted: Tue Feb 19, 2019 6:48 pm
by Kappes Buur
Graf Zahl wrote:Does it work with the modern version?


The pwad works with gzdoom-x64-g3.8pre-414, but has some dialog to offer

Re: PWAD: GZDooM Crashes With No Crash Log

PostPosted: Wed Feb 20, 2019 7:09 am
by ReX
Kappes Buur wrote:The pwad works with gzdoom-x64-g3.8pre-414, but has some dialog to offer

I looked through the files you attached, but saw nothing that raised significant flags. Perhaps someone else will see something that explains the problem.

Out of curiosity, how does one go about resolving the "truncation of floating point constant" script warnings?

Re: PWAD: GZDooM Crashes With No Crash Log

PostPosted: Wed Feb 20, 2019 7:18 am
by Graf Zahl
Use FRandom instead of Random.
This error nearly universally comes from using 'Random(floatval, floatval)' which was silently accepted by the old pre-ZScript DECORATE parser, but obviously still truncated the values to ints.

Re: PWAD: GZDooM Crashes With No Crash Log

PostPosted: Wed Feb 20, 2019 7:06 pm
by Kappes Buur
Something strange is going on with the pk3.
Loading it as resource in GZDBBF



makes GZDBBF sit there for several minutes and then unceremoniously quit.
No crash log, but a logfile

Re: PWAD: GZDooM Crashes With No Crash Log

PostPosted: Thu Feb 21, 2019 7:32 am
by ReX
I didn't see anything in the GZDBBF logfile that raised flags. But it certainly appears that there's something in the pk3 that is creating problems, both in GZDooM and in GZDBBF. The strange thing is, I don't remember adding anything new when I copied and pasted resources from the relevant wads into the pk3 during the edit process. Moreover, the fact still remains that GZDooM is not identifying the source of the crash.

Re: PWAD: GZDooM Crashes With No Crash Log

PostPosted: Thu Feb 21, 2019 9:49 am
by _mental_
It crashes because of an attempt to access missing textures, SKY2 and SKY3.

The crash itself is caused by a bug in GZDoom. There are several places were textures without underlying images are read.
If I got it right, the problem is those textures are treated as valid by the engine. I made this PR with the proposed fix.

Re: PWAD: GZDooM Crashes With No Crash Log

PostPosted: Thu Feb 21, 2019 2:12 pm
by ReX
_mental_ wrote:It crashes because of an attempt to access missing textures, SKY2 and SKY3.

Yes, I edited the TEXTURES lump and deleted references to the missing patches, and all is well now. Thank you very much for troubleshooting this issue.

Any idea why GZDooM was crashing without creating a crash log?

Graf Zahl wrote:Use FRandom instead of Random.

The scripts/definitions in question don't use "Random". Instead, the lines in question use fixed fractional values:

Code: Select allExpand view
      Flash:
         TNT1 A 1 A_Light(1.0)
         TNT1 A 1 A_Light(0.6)
         TNT1 A 1 A_Light(0.2)
         TNT1 A 1 A_Light(0.0)
         Stop


The GZDooM startup warnings are as follows:

Script warning, "rc_darkforces_edit.pk3:actors/slot2/bryar_pistol.txt" line 49: Truncation of floating point constant 0.600000
Script warning, "rc_darkforces_edit.pk3:actors/slot2/bryar_pistol.txt" line 50: Truncation of floating point constant 0.200000

Re: PWAD: GZDooM Crashes With No Crash Log

PostPosted: Thu Feb 21, 2019 2:21 pm
by Graf Zahl
A_Light cannot use fractional values. Just remove the fractional parts and put A_Light(0) where you want the weapon light to go away.