Bug 910 : Theres a bug in the RegisteredMethods class when unregistering methods.
Last modified: 2008-09-03 10:19




Status:
RESOLVED
Resolution:
FIXED -
Priority:
P2
Severity:
normal

 

Reporter:
John_Doe
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2008-09-03 06:43
The bug happens when you register multiple of 5 methods and then try to
remove one again. From what ive seen the array of the registered object
gets doubled if the limit is hit. But if you add exactly 5 methods (or 10
etc) the array is full and not yet expanded.
At the call to unregister -> remove, i think the bug happens when shifting
the remaining methods at a call to "objects[i+1]".
Ive only tested this with version 0135 but i think the code is still the same.

It can easily be shown by doing this:
[code]
registerPre(this);
registerPre(this);
registerPre(this);
registerPre(this);
registerPre(this);

unregisterPre(this);
[/code]

Hope this helps.
Additional Comment #1 From fry 2008-09-03 10:19
ah, found and fixed for 0149. thanks for the report.