What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » Stability problem with DisplayToast() function

Stability problem with DisplayToast() function
Author: Message:
KooKiz
Junior Member
**


Posts: 41
Joined: Oct 2004
O.P. Stability problem with DisplayToast() function
Hi, like a few one start to know, I'm creating a plugin to read rss feeds (in visual basic.net).
In first versions, since the displaytoast function can be called only from the main thread, I was using a forced status change (and my displaytoast() call was in the onStatusChange function). After a few weeks, I noticed (and at least one user also did) that msn sometimes hanged after displaying the notification. Since I didn't see any error in my code, I though it was the quick status change which was making msn freeze.
But now I've completely rewritten this part, and I don't use the status change anymore (I instead use System.Windows.Forms.Form.Invoke function to make the main thread call the function I want). It worked well for a few day, but now I've again this damn freeze.
Since my code to display notification is really short, I'm really starting to think that the problem come from the DisplayToast() function.

code:
   
Public Function show_notification()
        If (rssreminding = 1) Then
            DisplayToast("Last News : " + remindrss, "RssPlug", remindurl, True)
            rssreminding = 0
        Else
            DisplayToast("News : " + titlerss(index_to_show), "RssPlug", urlrss(index_to_show), True)
            remindrss = titlerss(index_to_show)
            remindurl = urlrss(index_to_show)
            index_to_show = -1
        End If
End Function

If I put a Msgbox before and after the displaytoast call, only the one before is displayed. I've checked the variables I used to call DisplayToast, but there is nothing special in it.

So, do anyone ever got the same problem ? Can a messenger plus developper tell me if that's really the DisplayToast function which is making my plugin freeze ? Since I don't have the function's source code, I can't do anything more than ask :/
07-25-2005 08:42 AM
Profile PM Find Quote Report
KooKiz
Junior Member
**


Posts: 41
Joined: Oct 2004
O.P. RE: Stability problem with DisplayToast() function
I've done some test, and that's definitely a messenger plus's bug. When that starts to happen, messenger hangs on no matter what I ask it to display with Displaytoast(). Restarting msgplus doesn't change anything, I must reboot to (sometimes) solve the problem, or just wait for a long time.

Well, Patchou, I think you've got some work to do :p

This post was edited on 07-31-2005 at 01:23 PM by KooKiz.
07-31-2005 01:22 PM
Profile PM Find Quote Report
KokiriChild
New Member
*

Avatar
FFXI Rules my life

Posts: 5
40 / Male / –
Joined: Oct 2005
RE: Stability problem with DisplayToast() function
I have exactly the same problem, as soon as I do a DisplayToast() function MSN freezes =(

Anyone know if there's a fix for this yet? I want my damn toast!!! :D

- KokiriChild

This post was edited on 10-04-2005 at 05:23 PM by KokiriChild.
10-04-2005 05:22 PM
Profile E-Mail PM Web Find Quote Report
(CyBeRDuDe)
Senior Member
****


Posts: 512
Reputation: 21
38 / Male / –
Joined: Jul 2003
RE: Stability problem with DisplayToast() function
I can confirm that I had this same exact problem when creating plugins.. Was really annoying.. Though the exact same plugin that were hanging on me didn't always hang on others... And also sometimes it seems to be "Random" times it does it.. That means if it starts doing it, it can be stopped by a restart, other times a restart doesn't help.. At one point I really had problems with it hanging.. All the time... So.. Because of this I really hate using the DisplayToast() Function...
To clarify, it's in VB, and MSN didn't Freeze completly.. Just a 10 secs hang.. Or there abouts..
I didn't really know this was a problem that other users also faced, so i've always thought that it was a problem with my computer.. Now I see it might not be... So.. I hope this can fixed.. :).... Would really be nice...
10-04-2005 08:25 PM
Profile E-Mail PM Find Quote Report
Patchou
Messenger Plus! Creator
*****

Avatar

Posts: 8607
Reputation: 201
43 / Male / Flag
Joined: Apr 2002
RE: Stability problem with DisplayToast() function
Thanks for reporting. Can you please email me with your plugin source code (if that's ok with you) so that I can work on a sollution with you (mplus@patchou.com)? also, please specify is Messenger hangs always before or after displaying the popup.
[Image: signature2.gif]
10-04-2005 09:02 PM
Profile PM Web Find Quote Report
KokiriChild
New Member
*

Avatar
FFXI Rules my life

Posts: 5
40 / Male / –
Joined: Oct 2005
RE: Stability problem with DisplayToast() function
quote:
To clarify, it's in VB, and MSN didn't Freeze completly.. Just a 10 secs hang

Mine's in VB too, although mine is a total complete freeze, only way to resolve is to kill MSN and restart it.

Source code on the way Patchou! Thanks!

- KokiriChild
10-05-2005 07:35 AM
Profile E-Mail PM Web Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Stability problem with DisplayToast() function
I didn't try this, but instead of using the SendMessage API, try to use the PostMessage API. SendMessage works syncronical, PostMessage asyncronical. In English this means that SendMessage doesn't return immediatly and waits for the call to finish (hence a possible freeze/delay if something went wrong with the called function), PostMessage doesn't wait and returns immediatly... See MSDN library... (all this is just theory, didn't tried it out yet. Furthermore, this wont solve the actual possible bug in the plugin API of Plus!, but it is a way to avoid freezing)...

PS: Patchou, about the VB example source in the plugin docs, it can be made much shorter, faster and more ermmm... "according to the proper VB programming rules" (It contains a lot of redundant code and isn't such a great example of proper efficient programming in VB so to speak; aka can teach bad practices to beginners)

This post was edited on 10-05-2005 at 02:45 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
10-05-2005 02:40 PM
Profile PM Find Quote Report
Patchou
Messenger Plus! Creator
*****

Avatar

Posts: 8607
Reputation: 201
43 / Male / Flag
Joined: Apr 2002
RE: Stability problem with DisplayToast() function
I'm very sure my VB code sucks, I'm just not a VB developer. However, you have to also realise that I need to somehow connect to my C++ program and send unmanaged data like structures. It creates ugly VB code but at least, it works the way I want it to work :p. Of course, if you know other methods to do the same thing better, I'll be glad to replace my file with your modified one :).

As for SendMessage(), it's used to be able to return a value to the caller. This shouldn't make anything freeze simply because when the message is received, a thread is created to display the toast and the function does not wait for the thread to end before it returns.

I really need all of you who are experiencing problems to tell me roughly how often it crashes and to send me the code you use to make a call to DisplayToast(). I'll investigate and I'm bound to find where the glitch is :).
[Image: signature2.gif]
10-05-2005 04:52 PM
Profile PM Web Find Quote Report
KooKiz
Junior Member
**


Posts: 41
Joined: Oct 2004
O.P. RE: Stability problem with DisplayToast() function
Sorry I didn't participate to that topic, I've lost my connection for many months.
About the problem, messenger hangs after displaying the toast. Precisely, it hangs WHILE displaying. Messenger is freezed, and the toast disappears a few seconds after, as if there wasn't any problem.
It occurs randomly, but when it starts happening, it will hang every time you retry until you reboot. So it can be a memory conflict.
I've done several tests to make sure that the string we try to display in the toast isn't responsible. No matter how many characters, ou which code I use, there is still the same problem.

If that can help you, I can send my plugin source code, but I've also tried with a simple plugin (just a toast displayed periodically) and it still randomly freeze. So I don't think you'll learn anything from it.
If you have any debugging function (like logging or backtrace) on messenger plus that can be used, I can give it a try.

This post was edited on 10-13-2005 at 08:52 AM by KooKiz.
10-13-2005 08:51 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On