M.K. Posted May 26, 2017 Share Posted May 26, 2017 Hi, the app crashes immediately whenever the mouse hovers over the taskbar icon. Assuming Paint .Net is using an unchanged version of Microsoft's TabbedThumbnailNativeMethods.cs, it looks like the DwmSetIconicThumbnail function is called with an invalid thumbnail bitmap. This exception occurs if the taskbar thumbnail violates the maximum boundaries or has an invalid color depth. "An application typically calls the DwmSetIconicThumbnail function after it receives a WM_DWMSENDICONICTHUMBNAIL message for its window. The thumbnail should not exceed the maximum x-coordinate and y-coordinate that are specified in that message. The thumbnail must also have a 32-bit color depth." https://msdn.microsoft.com/en-us/library/windows/desktop/dd389411(v=vs.85).aspx In this context, it could also be an issue with high DPI, since I encountered several problems with native functions (e.g. getting the correct mouse position on the desktop) in windows forms applications, if the application does not call the SetProcessDPIAware function at startup. The "dpiaware" tag in the manifest file does not cover all scenarios. Exception details: System.ArgumentException: Der Wert liegt außerhalb des erwarteten Bereichs. bei Microsoft.WindowsAPICodePack.Taskbar.TabbedThumbnailNativeMethods.SetIconicThumbnail(IntPtr hwnd, IntPtr hBitmap) in D:\src\pdn\src\SystemLayer\WindowsAPICodePack\Shell\Interop\Taskbar\TabbedThumbnailNativeMethods.cs:Zeile 114. bei Microsoft.WindowsAPICodePack.Taskbar.TaskbarWindowManager.DispatchSendIconThumbnailMessage(Message& m, TaskbarWindow taskbarWindow) in D:\src\pdn\src\SystemLayer\WindowsAPICodePack\Shell\Taskbar\TaskbarWindowManager.cs:Zeile 265. bei Microsoft.WindowsAPICodePack.Taskbar.TaskbarWindowManager.DispatchMessage(Message& m, TaskbarWindow taskbarWindow) in D:\src\pdn\src\SystemLayer\WindowsAPICodePack\Shell\Taskbar\TaskbarWindowManager.cs:Zeile 714. bei Microsoft.WindowsAPICodePack.Taskbar.TabbedThumbnailProxyWindow.WndProc(Message& m) in D:\src\pdn\src\SystemLayer\WindowsAPICodePack\Shell\Taskbar\TabbedThumbnailProxyWindow.cs:Zeile 39. bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) Hopefully I could help you a little bit :-) Kind regards, Michael Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted May 26, 2017 Share Posted May 26, 2017 Yeah I've gotten a few reports of this. Not sure what causes it. Last week, for the upcoming 4.0.17 update, I put in some code that suppresses the exception. So you might see a visual glitch, but at least it won't crash for something menial like this. 1 Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
M.K. Posted May 26, 2017 Author Share Posted May 26, 2017 Great! For the moment, I simply unchecked the "show image preview in the windows taskbar" option in the settings dialog. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.