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 have seen that this error is frequently related to threading. But I have not been able to find anything about this issue occurring in Design.
You didn’t include the product version you are using. Please provide the specific version of the NetAdvantage Win Client 2010 Vol 1 assemblies you are using.
Please also try to capture a stack trace of the design time issue by using the following steps.
Create Visual Studio Design Time STACK TRACE
These Steps can be used to debug Design time issues in Visual Studio:
1. Open Visual Studio.
2. Perform the necessary steps to get to where the failure occurs
3. Open another instance of Visual Studio
4. In Visual Studio, Select "Tools" -> "Attach to Process"
5. In the "Available Processes" select the first Visual Studio instance
6. Click "Attach"
7. Still in Visual Studio, Select "Debug" -> "Exceptions"
8. Check "Thrown" for "Common language Runtime Exceptions"
9. Click "Ok"
10. Go back to the first instance of Visual Studio and perform the step to reproduce the issue
If an exception is thrown, you should be able to get the stack trace from the second instance of Visual Studio and then please attach it so I can review it.
It would also be helpful if you could provide a sample and the steps you take to generate the error message.
MarianneDeveloper Support Engineer
Hi, I am not able to get the exception. The only error message box with an empty stack trace is what I got as shown.The version of Infragistic assembly is 10.1.20101.1007
Sometimes, the exception is generated even after I reboot my computer start the VS 2008 project again and the form containing wingauge is displayed with an exception message. It does not always happen but I have not done anything yet.
I am really frustrated.
I have to remove my form out of the project and restart the PC, VS, and then copy the form back so VS would not try to load the form again at first start. Once it generates the exception, normally I have to restart the pc.
If you can provide a small working sample that duplicates the behavior, I can use it to test and try to generate the stack trace here. Also give me the exact steps to reproduce the behavior.
Is it possible that you did not do a full install of the product? That the designer assemblies were not installed properly?
Without a stack trace it is very difficult to identify the cause.
I did see this forum link although it is not exactly what you are reporting and it is a couple of years old with a different version. It might be worth checking.
http://community.infragistics.com/forums/p/2933/16909.aspx#16909
Marianne
Here is the sample project that uses my Radial gauge defined in SampleGauge.xml
I could not give you a scenario that will generate the error I mention here but there is one the bug I found during using designer or from custom property page of radial guage.
Here is the steps to re-produce the error which normally leads to the error in this report too.
1/ Open custom property page of my radial gauge in the main form
2/ Select Scale # 0
3/ Change the end value of axis property from 20 to 0 and save it
An exception is generated. This exception also generates during using UltraGauge designer
Close the solution and open the solution and open the main form again to show the radial gauge
Usually, it is ok but sometimes it will generate the Object is currently in use elsewhere. It is an intermittent problem.
There are other issues in the ultragauge designer similar to this one also but I really do not have time to figure out but it is really easy to mess them up.
I could not find a way to include my zip project so I need you to send me an email so I can the sample project directly to you.
thanks
When you click on reply, use the Options tab and then click on the Add/Update button to get to the area where you can Upload File, then click on the Save button. That should help you attach your zip file.
Once I get you sample I’ll try to reproduce the issues you mentioned.
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.
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.