Ooops! Something went wrong

Good news: it’s not your fault 🙂

There are no programs without bugs, and LaserGRBL is no exception (although there are very few). Usually bugs depend on particular conditions that are difficult to test or to think about, such as the input of unexpected data (very large numbers, negative numbers when positive numbers are expected, etc.) or on particular hardware/software configurations.

When an exception is detected, i.e. an unexpected condition, LaserGRBL will show you this window containing some useful diagnostic information.

If you are here, maybe this has happened to you too.

You can copy-paste this information and post it here, in my github page, to help me solve the problem. I will do my best!

Most common exception and suggested solutions

ObjectDisposedException in DangerousAddRef

One of the most long-standing problems that I can’t seem to solve is the problem due to the exception “System.ObjectDisposedException” located at the point DangerousAddRef of the Microsoft System.IO.Ports.SerialStream object.

This exception is located in an essential external component (the communication port) and I cannot resolve it simply because it is not in the LaserGRBL code but in the system libraries.

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

Here’s what you can do if you have this type of problem:

  1. Update the Microsoft .NET Framework to the latest version
  2. Switch LaserGRBL from using the UsbSerial port (from Microsoft) to RJCPSerial port implementation

To to the 2nd point, open menu “Grbl”, “Settings”, and then under “Connection Protocol” select the RJCPSerial protocol.

Other kind of exception

  1. Update the Microsoft .NET Framework to the latest version
  2. Update LaserGRBL to the latest version
  3. Run LaserGRBL in compatibility mode using shortcut “LaserGRBL (disable OpenGL)”
  4. Search in my github page if someone else is having the same issue, and search for possible solution given by other users.