[Level Refactor bcc1aa95b] Eventhandler randomly disappears

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 a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [Level Refactor bcc1aa95b] Eventhandler randomly disappears

Re: [Level Refactor bcc1aa95b] Eventhandler randomly disappe

by Graf Zahl » Sat Feb 09, 2019 1: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.

Re: [Level Refactor bcc1aa95b] Eventhandler randomly disappe

by Matt » Fri Feb 08, 2019 1: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.

Re: [Level Refactor bcc1aa95b] Eventhandler randomly disappe

by Graf Zahl » Fri Feb 08, 2019 1: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.

[Level Refactor bcc1aa95b] Eventhandler randomly disappears

by Matt » Fri Feb 08, 2019 12: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 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 28 times

Top