[Level Refactor bcc1aa95b] Eventhandler randomly disappears

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

[Level Refactor bcc1aa95b] Eventhandler randomly disappears

Post by Matt »

This version of HD, which has a line added to continually log players[0].cmd.

1. Warp to Map15.
2. IDDQD.
3. Faff around for a few minutes. (EDIT: you don't even need to do anything, but it is easier to see when the bug kicks in if the logspam isn't just zero.)

Expected: the logspam just keeps going.
Actual: after a while it just stops.

It doesn't seem to be related to anything I'm doing, but it seems I can't replicate it without monsters around.

Is there some way to isolate the moment when an eventhandler is destroyed?
EDIT: And how *is* an eventhandler destroyed, other than by calling "destroy()" (which HD definitely does not do at any point)? Knowing how it might disappear would help a lot to isolate this, I suspect.



EDIT: Isolated example attached. Ran

Code: Select all

gzdoom -file ~/handlertest -warp 01 -fast -skill 4
IDCLEV15'd and ran around in the courtyard after also summoning about 50 chaingun guys, the logs stopped shortly after.
Attachments
handlertest.zip
(686 Bytes) Downloaded 23 times
Last edited by Matt on Fri Feb 08, 2019 1:49 am, edited 3 times in total.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [Level Refactor bcc1aa95b] Eventhandler randomly disappe

Post by Graf Zahl »

If you want to catch its destruction, add a Console.Printf to its OnDestroy method.
The only other way than intentional destruction is that it gets caught by the garbage collector, but even that goes through that method.
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: [Level Refactor bcc1aa95b] Eventhandler randomly disappe

Post by Matt »

In that case I'm pretty sure it's the garbage collector - one way to make sure this bug kicks in is to kill at least 3 zombies with a single grenade, which spawns a huge buttload of actors and thinkers and whatnot all at once.

And it seems I can't replicate this if I use "+map map15" in the command line, only if I use "+map range" (EDIT: or "-warp 01" with the isolated sample) and then IDCLEV15. Knox reported on Discord that he got this bug when he went from map01 to map02 as well.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [Level Refactor bcc1aa95b] Eventhandler randomly disappe

Post by Graf Zahl »

Looks to be a duplicate of this: viewtopic.php?f=2&t=63596
which perfectly explains what happens. Once that older handler gets collected it'd take the new one away with it as well.
Post Reply

Return to “Closed Bugs [GZDoom]”