shellscape / Gmail-Notifier-Plus

Gmail Notifier Plus
http://shellscape.org
MIT License
89 stars 26 forks source link

Shell Exception when resuming Windows #121

Closed jansokoly closed 10 years ago

jansokoly commented 11 years ago

When Windows is resuming, this exception occurs in version 3.6.0.0:

at Microsoft.WindowsAPI.Taskbar.ThumbnailToolBarButton.UpdateThumbnailButton() at Microsoft.WindowsAPI.Taskbar.ThumbnailToolBarButton.set_Enabled(Boolean value) at GmailNotifierPlus.Forms.Notifier.UpdateThumbButtonsStatus() at GmailNotifierPlus.Forms.Notifier.UpdateMailPreview() at GmailNotifierPlus.Forms.Notifier._WebClient_DownloadDataCompleted(Object sender, DownloadDataCompletedEventArgs e) at System.Net.WebClient.OnDownloadDataCompleted(DownloadDataCompletedEventArgs e) at System.Net.WebClient.DownloadDataOperationCompleted(Object arg)

shellscape commented 11 years ago

Sorry I didn't see this before now. Resuming from what previous state?

jansokoly commented 11 years ago

I'm not really sure what you mean by previous state. Notifier is running. I close the notebook lid and Windows goes to the sleep mode. I open the lid and Windows resumes with this stack trace shown.

pamtbaau commented 10 years ago

When Windows 8.1 resumes from sleep this unhandled exception occurred. But not at every resume though....

jansokoly commented 10 years ago

I got this fixed in my fork. Although I don't like to silently swallow the exceptions in general, I think it's totally OK in this case as the UpdateThumbButtonsStatus() is being called periodically and the taskbar buttons will get enabled in a little while, when Windows has finished waking up. What do you think @shellscape? Want the pull?

shellscape commented 10 years ago

@jansokoly sure, let's have a look at it.