Hi
I am facing this problem "Object is currently in use elsewhere" many times during design of my windows form when I am using RadialGauge control in my Windows Form developed in VB.NET 2008.
By just opening my form with the gauge on it, it can generate the error "Object is currently in use elsewhere".
The only option is to shutdown my VS 2008 .net framework 3.5 sp1 windows xp sp3 and run vs2008 again.
I also see many lock up during design time of gauge using wizard or compile time of my application in vs2008.
Thanks
Hi Linh,
I've created a separate case for you related to the run time exception and you should hear from me shortly.
I haven't been able to generate the run time exception you described but I have a sample that I am going to send you through the new case. If we can isolate this exception and the steps to cause it, we'll be able to hopefully identify the cause.
Marianne
Hi David,
I will try.
My computer and other computer got the lastest .net framework sp. I have tried to prove that it would not crash due to updating the gauge from other threads by creating an application without any code at all.
In one page of multi tabs control, I put my gauge and your preset gauge and by switching the pages back and forth then my gauge throw a run-time error during drawing the control. Your preset gauge already drawn on the same page.
So I would conclude that there is a problem with drawing my gauge but not your preset gauge.
This scenario has been crashed on my computer and other deployed PCs.
we haven't been able to reproduce this in-house, but I have a couple theories you could test:
1. make sure the latest service pack is used for the .NET Framework.
2. try inheriting the gauge to disable double buffering:
public class CustomGauge : UltraGauge
{
public CustomGauge() : base()
this.SetStyle(ControlStyles.OptimizedDoubleBuffer, false);
}
3. same as above but instead of turning off double buffer, try this.SetStyle(ControlStyles.UserPaint, true);
4. check your application for multi-threaded code, ensuring that no thread other than the UI thread can update the gauge.
i hope this helps.
Hi,
I got run time also with the gauge. Any recommend on this.
This is an intermittent problem. If I click on continuing in the exception dialog then the application continues running.
See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************System.InvalidOperationException: Object is currently in use elsewhere. at System.Drawing.Graphics.GetHdc() at System.Drawing.BufferedGraphics.RenderInternal(HandleRef refTargetDC, BufferedGraphics buffer) at System.Drawing.BufferedGraphics.Render() at System.Windows.Forms.Control.WmPaint(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************mscorlib Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000) CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll----------------------------------------OkumaUtility.CoolantMonitor Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///D:/Program%20files/Okuma/Okuma%20Utility%20-%20Coolant%20Monitor/OkumaUtility.CoolantMonitor.exe----------------------------------------Microsoft.VisualBasic Assembly Version: 8.0.0.0 Win32 Version: 8.0.50727.3053 (netfxsp.050727-3000) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll----------------------------------------System Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll----------------------------------------System.Windows.Forms Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll----------------------------------------System.Drawing Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll----------------------------------------System.Runtime.Remoting Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll----------------------------------------Infragistics2.Win.UltraWinGauge.v10.1 Assembly Version: 10.1.20101.1007 Win32 Version: 10.1.20101.1007 CodeBase: file:///D:/Program%20files/Okuma/Okuma%20Utility%20-%20Coolant%20Monitor/Infragistics2.Win.UltraWinGauge.v10.1.DLL----------------------------------------MultiColorListBox Assembly Version: 1.1.0.0 Win32 Version: 1.1.0.0 CodeBase: file:///D:/Program%20files/Okuma/Okuma%20Utility%20-%20Coolant%20Monitor/MultiColorListBox.DLL----------------------------------------Infragistics2.Shared.v10.1 Assembly Version: 10.1.20101.1007 Win32 Version: 10.1.20101.1007 CodeBase: file:///D:/Program%20files/Okuma/Okuma%20Utility%20-%20Coolant%20Monitor/Infragistics2.Shared.v10.1.DLL----------------------------------------Infragistics2.Win.v10.1 Assembly Version: 10.1.20101.1007 Win32 Version: 10.1.20101.1007 CodeBase: file:///D:/Program%20files/Okuma/Okuma%20Utility%20-%20Coolant%20Monitor/Infragistics2.Win.v10.1.DLL----------------------------------------Infragistics2.Win.UltraWinTabControl.v10.1 Assembly Version: 10.1.20101.1007 Win32 Version: 10.1.20101.1007 CodeBase: file:///D:/Program%20files/Okuma/Okuma%20Utility%20-%20Coolant%20Monitor/Infragistics2.Win.UltraWinTabControl.v10.1.DLL----------------------------------------Infragistics2.Win.Misc.v10.1 Assembly Version: 10.1.20101.1007 Win32 Version: 10.1.20101.1007 CodeBase: file:///D:/Program%20files/Okuma/Okuma%20Utility%20-%20Coolant%20Monitor/Infragistics2.Win.Misc.v10.1.DLL----------------------------------------System.Xml Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll----------------------------------------System.Core Assembly Version: 3.5.0.0 Win32 Version: 3.5.30729.1 built by: SP CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll----------------------------------------Okuma.EthernetIO Assembly Version: 1.1.0.0 Win32 Version: 1.1.0.0 CodeBase: file:///D:/Program%20files/Okuma/Okuma%20Utility%20-%20Coolant%20Monitor/Okuma.EthernetIO.DLL----------------------------------------TwinCAT.Ads Assembly Version: 2.0.5.0 Win32 Version: 2.0.5.0 CodeBase: file:///D:/Program%20files/Okuma/Okuma%20Utility%20-%20Coolant%20Monitor/TwinCAT.Ads.DLL----------------------------------------System.Data Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000) CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll----------------------------------------System.Data.DataSetExtensions Assembly Version: 3.5.0.0 Win32 Version: 3.5.30729.1 built by: SP CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Data.DataSetExtensions/3.5.0.0__b77a5c561934e089/System.Data.DataSetExtensions.dll----------------------------------------System.Transactions Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000) CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll----------------------------------------System.EnterpriseServices Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000) CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll----------------------------------------System.Configuration Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll----------------------------------------
************** JIT Debugging **************To enable just-in-time (JIT) debugging, the .config file for thisapplication or computer (machine.config) must have thejitDebugging value set in the system.windows.forms section.The application must also be compiled with debuggingenabled.
For example:
<configuration> <system.windows.forms jitDebugging="true" /></configuration>
When JIT debugging is enabled, any unhandled exceptionwill be sent to the JIT debugger registered on the computerrather than be handled by this dialog box.
I have been able to duplicate an Out of Memory exception and I am opening up a case for you concerning this issue. I will be submitting a development issue for you and you will be better able to track its progress.
You will hear from me shortly via your new case.