[3.7.x]EventHandler registering bug

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: [3.7.x]EventHandler registering bug

Re: [3.7.x]EventHandler registering bug

by Major Cooke » Tue Jan 15, 2019 10:46 am

I did some more testing with those three samples, and then I tested it in my mod series where the bug originally happened. Mental's solution fixes the issue entirely.

Re: [3.7.x]EventHandler registering bug

by Graf Zahl » Tue Jan 15, 2019 8:55 am

_mental_ wrote:linked lists and garbage collection[/url].

Two things that constantly seem to be at odds with each other - the main reason why I avoid using linked lists with objects in new code.
The PR looks ok but I'll wait for someone to confirm that it works.

Re: [3.7.x]EventHandler registering bug

by _mental_ » Tue Jan 15, 2019 8:25 am

The fix involves linked lists and garbage collection, so I decided to make this PR.

[3.7.x]EventHandler registering bug

by Major Cooke » Sun Jan 13, 2019 10:42 am

Load the following files from first to last:
  1. test.pk3
  2. test2.pk3
  3. test3.pk3
Then type into console (doesn't matter what the message is, so long as it provokes NetworkProcess):

Code: Select all

netevent t
You will notice how Handler2 does not show up.

The handler orders are:
  • Handler1: 9
  • Handler2: 7
  • Handler3: 11
  • Handler4: 6
Now, if these are all together in one single PK3, all four of them are registered. However, when they're apart, this bug surfaces.
Attachments
test.pk3
(433 Bytes) Downloaded 24 times
test2.pk3
(415 Bytes) Downloaded 23 times
test3.pk3
(417 Bytes) Downloaded 23 times

Top