mudlet-makers team mailing list archive
-
mudlet-makers team
-
Mailing list archive
-
Message #02729
Re: [Bug 1092769] Re: Event handlers can go off multiple times
No, scripts should properly unregister event handlers on uninstall
instead if there really is a bug in this area:
This is the destructor code, so this *should* work in theory. Are you
sure that unregistration doesn't work?
TScript::~TScript()
{
if( ! mpHost )
{
return;
}
for( int i=0; i<mEventHandlerList.size(); i++ )
{
mpHost->unregisterEventHandler( mEventHandlerList[i], this
);
}
mpHost->getScriptUnit()->unregisterScript( this );
}
Am 02.02.2013 20:11, schrieb Chris:
> I think I know what is causing this issue. When a script is compiled &
> it registers an event handler, that handler is added. When the script
> is uninstalled, that event handler is not removed. You can see this by
> creating an event handler, deleting the script, then creating a new
> script with the called function and it'll still raise that event. I
> think a way to fix this issue is to create a event->script name mapping.
> This mapping will not allow duplicate functions to raise for a given
> event, and will keep events unique. This will solve the problem should
> it be a) duplicate events calling a single script or b) single events
> calling duplicated scripts.
>
--
You received this bug notification because you are a member of Mudlet
Makers, which is subscribed to Mudlet.
https://bugs.launchpad.net/bugs/1092769
Title:
Event handlers can go off multiple times
Status in Mudlet the MUD client:
New
Bug description:
Event handlers can somehow get into a state where they will
consistently go off more than once. In an example I've got, on one
profile run one event handler is going off 8 times, and another 144
times (!). Just raising the event makes it go off all those times,
consistently, until you restart Mudlet.
I haven't quite worked out what is causing this issue just yet, either
- this needs to be narrowed down. It does happen to everyone somewhat
infrequently however all the way from test4 and before.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mudlet/+bug/1092769/+subscriptions
References