"InvalidOperationException - object is currently in use elsewhere" on Windows 1809
See original GitHub issueSince the Windows 10 1809 release, we observed issues on some customers with the ribbon.
It seems that something is wrong with the Graphics object and its use in Krypton.
In our case, the issue occurs when we use a OpenFileDialog. It raise an exception on the Form app:
à System.Drawing.Graphics.Restore(GraphicsState gstate)
à System.Windows.Forms.Control.WmPaint(Message& m)
à System.Windows.Forms.Control.WndProc(Message& m)
à ComponentFactory.Krypton.Toolkit.VisualControlBase.WndProc(Message& m)
à ComponentFactory.Krypton.Ribbon.KryptonRibbon.WndProc(Message& m)
à System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
à System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
à System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
For now, I am trying to reproduce the problem on my dev machine with debug builds.
If I am able to reproduce the problem locally I will update the issue.
Perhaps the root issue is the same as #46, and this windows update made the problem more frequent, I don’t know yet.
Issue Analytics
- State:
- Created 5 years ago
- Comments:20 (8 by maintainers)
Top Results From Across the Web
c# - InvalidOperationException - object is currently in use ...
Now SOMETIMES I'm getting "InvalidOperationException - object is currently in use elsewhere". Its very arbitrary. I somtimes get this in ...
Read more >Object already in use elsewhere c# even if using the lock ...
Hi. I try to draw onto bitmap inside a picturebox from multiple tasks. This is a simplified version of my main code.
Read more >InvalidOperationException - Object is currently in use ...
Text assignment of course happens on the UI thread! Here is the exception call strack: Error Message: Object is currently in use elsewhere....
Read more >System.invalidoperationexception: 'object is currently in ...
I have some code that shows network traffic on a proxy class, when I run the code I get random errors where the...
Read more >Getting an error [Object is in use elsewhere] when ...
InvalidOperationException HResult=0x80131509 Message=Object is currently in use elsewhere. Source=System.Drawing StackTrace: at System.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
FYI, this problem does not seems to occur anymore on v1903. You can consider this problem fixed in the fwk itself.
Thank you @Wagnerp. I will certainly use the 5.470 repo for issues (related to the ribbon & form integration bug) , as it seems to be the most active.