[Duplicate] [Level Refactor bcc1aa95b] Eventhandler randomly disappears

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

[Level Refactor bcc1aa95b] Eventhandler randomly disappears

Postby Matt » Fri Feb 08, 2019 1:32 am

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 allExpand view
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 8 times
Last edited by Matt on Fri Feb 08, 2019 2:49 am, edited 3 times in total.
User avatar
Matt
Putting the XD into *xdeath since 2007
 
 
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: [Level Refactor bcc1aa95b] Eventhandler randomly disappe

Postby Graf Zahl » Fri Feb 08, 2019 2:25 am

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
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [Level Refactor bcc1aa95b] Eventhandler randomly disappe

Postby Matt » Fri Feb 08, 2019 2:42 am

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
Matt
Putting the XD into *xdeath since 2007
 
 
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: [Level Refactor bcc1aa95b] Eventhandler randomly disappe

Postby Graf Zahl » Sat Feb 09, 2019 2:53 am

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.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 2 guests