Page 1 of 1

(New Level Refactor) VM Abort on 20 Heretics Credits map

Posted: Sun Feb 10, 2019 7:02 am
by Rachael
https://www.doomworld.com/idgames/level ... orts/20hcc

To reproduce, simply use the console and do "map credits" - then look for Gutawer's avatar, and step on the platform underneath it.

This is the avatar to look for:
Image

The expected result (and what previous versions of GZDoom did) is it should activate a ripple shader.

Instead, it VM aborts with a null pointer.

Re: (New Level Refactor) VM Abort on 20 Heretics Credits map

Posted: Sun Feb 10, 2019 7:22 am
by Marisa the Magician
Looks like Gutawer made the same silly mistake I made in a couple other mods. He's using EventHandler.Find to look for a StaticEventHandler.

Edit: Fixed it. Was just a single line change anyway.

Re: (New Level Refactor) VM Abort on 20 Heretics Credits map

Posted: Sun Feb 10, 2019 7:39 am
by Graf Zahl
Those Find functions were extremely sloppy coding. Why have two when they do the exact same thing with no safeguards present that what they return is correct?
Of course, not checking the return of a function call is also a source of problems.

Re: (New Level Refactor) VM Abort on 20 Heretics Credits map

Posted: Sun Feb 10, 2019 7:54 am
by Rachael
It's really not going to bother me that much if this simply becomes incompatible with newer versions of GZDoom. The thing is - this is the released version and I don't really want to update it, at least not to /idgames, at least until Zero X. Diamond finishes his super-super-secret map that he had been working on prior to its release.

If this must stay broken (except for the repository version that Marisa just updated) - so be it.

Re: (New Level Refactor) VM Abort on 20 Heretics Credits map

Posted: Sun Feb 10, 2019 8:27 am
by Graf Zahl
I think I am just deprecating these functions.
What this needs is a Level.FindEventHandler function and one StaticEventHandler.FindHandler function that exclusively search their respective list, not two functions with different names that both so the same thing, both wrong.

Re: (New Level Refactor) VM Abort on 20 Heretics Credits map

Posted: Mon Feb 11, 2019 8:37 am
by Major Cooke
Amusingly, that bug also affects D4D's upgrade cases. No wonder why people aren't getting upgrades whenever they walked over the cases, but I can work around this by having the handler assign itself as a variable at least.