Shoutbox

[Bug? or not?] OnEvent_Contact*** called before OnEvent_SigninReady - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: WLM Plus! Bug Reports (/forumdisplay.php?fid=7)
+----- Thread: [Bug? or not?] OnEvent_Contact*** called before OnEvent_SigninReady (/showthread.php?tid=74483)

[Bug? or not?] OnEvent_Contact*** called before OnEvent_SigninReady by CookieRevised on 05-18-2007 at 10:17 AM

in reference to http://shoutbox.menthix.net/showthread.php?tid=69...d=777535#pid777535

quote:
Originally posted by Patchou in January
quote:
Originally posted by CookieRevised
EDIT: although a new bug pops up now.... But this time, it is the fault of Messenger Plus! itself I believe. For some reason a OnEvent_ContactSignout was called _after_ the OnEvent_Signout:
quote:
Debug
Function called: OnEvent_Signout
Function called: OnEvent_ContactSignout

which resulted in making an "WLM - undefined" subdirectory since our own email wasn't defined anymore, obviously because we've signed out...

This can be worked around in the script, but in fact, this should have never happened in the first place. And this also might have big consequences for many other scripts...
Fixed for next version.

This still doesn't seem to be fixed completely...maybe....

With the SendTo script I very occassionally saw a fault popping up in the debug window (which otherwise didn't render any problems for the script itself because of the workaround/check I had in place since last time).

I wanted to know what the exact cause was, as I thought since this bug was fixed in Plus! it might be, for whatever reason, I got a contact event for a contact which isn't properly set in my contactlist (possible msn server bug?). After a very long time of monitoring suddenly the fault in the debugging window popped up again and I got these traces:


> Function called: "OnEvent_Initialize"
> Function called: "OnEvent_SigninReady"
> Function called: "OnEvent_Signout"
<= unfortunatly I dunno if "OnEvent_Signin" was called here as I don't have this in the script and forgot to add it to be monitored...
> Function called: "OnEvent_ContactStatusChange("*****@****.com", NLN)
<= error pops up here (because Messenger.MyContacts.GetContact(sEmail) = null);
> Function called: "OnEvent_ContactStatusChange("*****@****.com", BSY)
<= error pops up here (because Messenger.MyContacts.GetContact(sEmail) = null);
> Function called: "OnEvent_SigninReady"


Now, I dunno if this time it is really a bug or not (because I didn't monitor OnEvent_SignIn). But if it isn't it also implies that objects like Messenger.MyContacts are not to be taken for granted in contact events. It might well be possible that such objects aren't yet available at the time of the call. And this has on its turn big consequences for many scripts and should be taken in account by programmers.

Because OnEvent_SigninReady is in normal circumstances called fairly quickly after OnEvent_Signin, you will not notice or encounter all this pretty quickly, but it still can happen apparently...



PS: it would really really really be great (and helpful) if timestamps are added to the debugging log.
RE: [Bug? or not?] OnEvent_Contact*** called before OnEvent_SigninReady by Patchou on 05-19-2007 at 04:42 AM

thx for the report. you are right, timestamps would be useufl, I'll probably add a "save to file / timestamp" option in the next verison, even if it's only reg based (for develoeprs it shouldn't matter that much anyway).

As for your problem, for what I can see in the current code (After the fix), it's supposed to be impossible to receive a ContactStatusChange msg if you're not online and if Messenger Plus! itself doesn't know the contact (as the event wouldn't event be generated internally). If you have any idea how to reproduce the problem, let me knoooooow.


RE: [Bug? or not?] OnEvent_Contact*** called before OnEvent_SigninReady by CookieRevised on 05-23-2007 at 09:49 AM

mail (incl. Debug Trace Log) is send...