Page 1 of 1

.NET Framework crash - USB removal

PostPosted: Wed Jun 15, 2022 10:19 am
by johu
While plugging in and/or removing a USB device the following .NET Framework crash occured.
I'm using a UCR201, I think that is relevant information.
UCCNC version: 1.2112

Code: Select all
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.OverflowException: Arithmetic operation resulted in an overflow.
   at USBClassLibrary.USBClass.GetUSBDevice(UInt32 VID, UInt32 PID, List`1& ListOfDP, Boolean GetCOMPort, Nullable`1 MI)
   at Plugins.PluginForm.USBPort_USBDeviceRemoved(Object sender, USBDeviceEventArgs e)
   at USBClassLibrary.USBClass.ProcessWindowsMessage(Int32 Msg, IntPtr WParam, IntPtr LParam, Boolean& handled)
   at Plugins.PluginForm.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4515.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
UCCNC
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/UCCNC/UCCNC.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4515.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4488.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4390.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
OpenTK
    Assembly Version: 1.1.0.0
    Win32 Version: 1.1.1664.6217
    CodeBase: file:///C:/UCCNC/OpenTK.DLL
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4190.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4515.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
ୈỲ㬔䙸噤︬玿岱
    Assembly Version: 0.0.65535.65535
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/UCCNC/UCCNC.exe
----------------------------------------
OpenTK.GLControl
    Assembly Version: 1.1.0.0
    Win32 Version: 1.1.1664.6217
    CodeBase: file:///C:/UCCNC/OpenTK.GLControl.DLL
----------------------------------------
OpenTK.Compatibility
    Assembly Version: 1.1.0.0
    Win32 Version: 1.1.1664.6217
    CodeBase: file:///C:/UCCNC/OpenTK.Compatibility.DLL
----------------------------------------
ILCalc
    Assembly Version: 0.9.7.5
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/UCCNC/UCCNC.exe
----------------------------------------
p3jrwdgj
    Assembly Version: 0.0.0.0
    Win32 Version: 4.8.4488.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
AForge.Video.DirectShow
    Assembly Version: 2.2.5.0
    Win32 Version: 2.2.5.0
    CodeBase: file:///C:/UCCNC/AForge.Video.DirectShow.DLL
----------------------------------------
Microsoft.CSharp
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.CSharp/v4.0_4.0.0.0__b03f5f7f11d50a3a/Microsoft.CSharp.dll
----------------------------------------
System.Dynamic
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Dynamic/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Dynamic.dll
----------------------------------------
Anonymously Hosted DynamicMethods Assembly
    Assembly Version: 0.0.0.0
    Win32 Version: 4.8.4515.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/mscorlib/v4.0_4.0.0.0__b77a5c561934e089/mscorlib.dll
----------------------------------------
tmhowexp
    Assembly Version: 0.0.0.0
    Win32 Version: 4.8.4488.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
Plugininterface
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/UCCNC/Plugininterface.DLL
----------------------------------------
AutoBackupProfile
    Assembly Version: 1.1.0.0
    Win32 Version: 1.1.0.0
    CodeBase: file:///C:/UCCNC/Plugins/AutoBackupProfile.dll
----------------------------------------
AutolevelerCA
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/UCCNC/Plugins/AutolevelerCA.dll
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 10.0.0.0
    Win32 Version: 14.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
C76 Fault Reporting
    Assembly Version: 1.1.0.0
    Win32 Version: 1.1.0.0
    CodeBase: file:///C:/UCCNC/Plugins/C76%20Fault%20Reporting.dll
----------------------------------------
Console
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/UCCNC/Plugins/Console.dll
----------------------------------------
Debugger
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/UCCNC/Plugins/Debugger.dll
----------------------------------------
Diagnostics
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/UCCNC/Plugins/Diagnostics.dll
----------------------------------------
FaultSignals
    Assembly Version: 1.2.0.0
    Win32 Version: 1.2.0.0
    CodeBase: file:///C:/UCCNC/Plugins/FaultSignals.dll
----------------------------------------
Laserengrave
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/UCCNC/Plugins/Laserengrave.dll
----------------------------------------
Lubricator
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/UCCNC/Plugins/Lubricator.dll
----------------------------------------
Modbusmaster
    Assembly Version: 1.3.0.0
    Win32 Version: 1.3.0.0
    CodeBase: file:///C:/UCCNC/Plugins/Modbusmaster.dll
----------------------------------------
Pinout
    Assembly Version: 2.5.0.0
    Win32 Version: 2.5.0.0
    CodeBase: file:///C:/UCCNC/Plugins/Pinout.dll
----------------------------------------
Plugintest
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/UCCNC/Plugins/Plugintest.dll
----------------------------------------
Printer3D
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/UCCNC/Plugins/Printer3D.dll
----------------------------------------
Probing
    Assembly Version: 1.3.0.0
    Win32 Version: 1.3.0.0
    CodeBase: file:///C:/UCCNC/Plugins/Probing.dll
----------------------------------------
Profiler
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/UCCNC/Plugins/Profiler.dll
----------------------------------------
Scope
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/UCCNC/Plugins/Scope.dll
----------------------------------------
UCCAM
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/UCCNC/Plugins/UCCAM.dll
----------------------------------------
UCCNC_OSK
    Assembly Version: 1.7.3.0
    Win32 Version: 1.7.3.0
    CodeBase: file:///C:/UCCNC/Plugins/UCCNC_OSK.dll
----------------------------------------
UCR200Plugin
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/UCCNC/Plugins/UCR200Plugin.dll
----------------------------------------
UCR201Plugin
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/UCCNC/Plugins/UCR201Plugin.dll
----------------------------------------
Webcamera
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/UCCNC/Plugins/Webcamera.dll
----------------------------------------
Xbox360controller
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/UCCNC/Plugins/Xbox360controller.dll
----------------------------------------
XHC-HB04_pendant
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/UCCNC/Plugins/XHC-HB04_pendant.dll
----------------------------------------
knpuw40s
    Assembly Version: 0.0.0.0
    Win32 Version: 4.8.4488.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
nnd2q2ne
    Assembly Version: 0.0.0.0
    Win32 Version: 4.8.4488.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
lgmt3i54
    Assembly Version: 0.0.0.0
    Win32 Version: 4.8.4488.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
omsepv5u
    Assembly Version: 0.0.0.0
    Win32 Version: 4.8.4488.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
ciewmapo
    Assembly Version: 0.0.0.0
    Win32 Version: 4.8.4488.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
waceqseg
    Assembly Version: 0.0.0.0
    Win32 Version: 4.8.4488.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
plm02owc
    Assembly Version: 0.0.0.0
    Win32 Version: 4.8.4488.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
r0r115ho
    Assembly Version: 0.0.0.0
    Win32 Version: 4.8.4488.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
r5jv1thl
    Assembly Version: 0.0.0.0
    Win32 Version: 4.8.4488.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.




Do you need any more info?

Re: .NET Framework crash - USB removal

PostPosted: Sat Jun 18, 2022 9:11 am
by johu
Extra info: using UCR201 Plugin Beta 1.4

Re: .NET Framework crash - USB removal

PostPosted: Sat Jun 18, 2022 10:59 am
by ger21
The simple answer is don't plugin or unplug it.
You're not supposed to ever unplug USB devices without ejecting them first, but I suspect that might not solve the issue.

Re: .NET Framework crash - USB removal

PostPosted: Sun Oct 09, 2022 10:26 pm
by twedlake
ger21 wrote:The simple answer is don't plugin or unplug it.
You're not supposed to ever unplug USB devices without ejecting them first, but I suspect that might not solve the issue.


this response is about as useless as it gets! NO ONE is unplugging anything. the error pops up after about 30 minutes of inactivity with this plug in running

I'm having the same exact issue..

Re: .NET Framework crash - USB removal

PostPosted: Mon Oct 10, 2022 12:59 am
by ger21
this response is about as useless as it gets! NO ONE is unplugging anything.


The original post.
While plugging in and/or removing a USB device the following .NET Framework crash occured.

Re: .NET Framework crash - USB removal

PostPosted: Mon Oct 10, 2022 4:23 am
by cncdrive
I think this has been fixed, but my collegue dezsoe can confirm it.
And you can disable the USB suspend function in the Windows settings so then Windows will not unpower the device goes idle.
The USB suspend and HDD suspend etc. functions are all should be disabled anyways, because they could cause problems if Windows unexpectadly stopping the HDD or doing things which could cause interrupts in the communication between the computer and the motion controller.