arkypita / LaserGRBL

Laser optimized GUI for GRBL
http://lasergrbl.com
Other
1.23k stars 491 forks source link

Stopped in the middle of job #2302

Open Worthyhands1 opened 2 months ago

Worthyhands1 commented 2 months ago

Program stopped in the middle of the job and gave the following error message:

LaserGrbl v7.8.0.0 Grbl v1.1h Wrapper: UsbSerial Win 11, Home, 10.0.22631.0 (7) CLR: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll 4.8.9241.0 built by: NET481REL1LAST_C

TypeOf exception [System.ObjectDisposedException] Exception message [Safe handle has been closed] Exception source [mscorlib], thread [Main Thread] Exception method [Void DangerousAddRef(Boolean ByRef)]

----------- stack trace ----------- at System.Runtime.InteropServices.SafeHandle.DangerousAddRef(Boolean& success) at System.StubHelpers.StubHelpers.SafeHandleAddRef(SafeHandle pHandle, Boolean& success) at Microsoft.Win32.UnsafeNativeMethods.GetOverlappedResult(SafeFileHandle hFile, NativeOverlapped* lpOverlapped, Int32& lpNumberOfBytesTransferred, Boolean bWait) at System.IO.Ports.SerialStream.EventLoopRunner.WaitForCommEvent() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()

arkypita commented 2 months ago

Hi Unlucky this exception is inside a Windows component System.IO.Ports.SerialStream so I cannot control/fix it. What I suggest is to update Microsoft .NET component, to the latest updates.

Another option you have, is to switch to a different SerialPort implementation called "UsbSerial2" that is an alternative to the Microsoft SerialPort component.

Menù Grbl - Settings

image