Lightburn crashing on Linux

Hi, I downloaded yesterday a trial of lightburn. It’s a nice software, but I’m having many problems with it crashing.

What I could detect until now is that:

  • it seems to sometimes not crash after a fresh reboot.
  • Once it crashes, if I try to open it again, it takes very long to start and ends up crashing without even opening the application.
  • No error or warning is shown
  • Tends to crash when connecting to the laser

OS is ubuntu linux 20.10 and the laser is an Ortur Laser master 2

I have searched other posts regarding crashes in linux but I didn’t find anything that solved this.

Any help is appreciated. Thanks.

We don’t officially support Ubuntu 20 - We build and test on 16 and 18. That said, very few of the crashes we’ve had have been Linux specific, so it could be something about the laser itself.

Try this:

  • Run LightBurn
  • Go to Help > Enable debug logging
  • Connect to the laser and do something that has made it crash in the past
  • If you get it to crash, see if anything is emitted to the console, or ends up in the ‘LightBurnLog.txt’ file you’ll find in the Documents folder.

Any time you do this, delete any existing log file before you start, as the existing log is constantly appended to, and will grow forever if you don’t clean it out once in a while.

OK, that’s a good pointer, I will do as you suggest, let’s see what the log captures.

I did what you said and I got this log:

23:10:48.454  D: "LightBurn 0.9.20"   "vie. ene. 22 2021"
23:10:48.552  D: "Connecting..."  busy:  false  state:  1
23:10:48.552  D: O: "\n"
23:10:48.807  D: "Connecting..."  busy:  false  state:  1
23:10:48.809  D: O: "\n"
23:10:49.064  D: O: "?"
23:10:49.318  D: "Connecting..."  busy:  false  state:  1
23:10:49.319  D: O: "\n"
23:10:49.574  D: "Connecting..."  busy:  false  state:  1
23:10:49.576  D: O: "\n"
23:10:49.829  D: "Connecting..."  busy:  false  state:  1
23:10:49.829  D: O: "\n"
23:10:50.084  D: "Connecting..."  busy:  false  state:  1
23:10:50.087  D: O: "\n"
23:10:50.340  D: O: "?"
23:10:50.595  D: "Connecting..."  busy:  false  state:  1
23:10:50.596  D: O: "\n"
23:10:50.850  D: "Connecting..."  busy:  false  state:  1
23:10:50.851  D: O: "\n"
23:10:51.106  D: "Connecting..."  busy:  false  state:  1
23:10:51.107  D: O: "\n"
23:10:51.361  D: "Connecting..."  busy:  false  state:  1
23:10:51.362  D: O: "\n"
23:10:51.618  D: O: "?"
23:10:51.872  D: "Connecting..."  busy:  false  state:  1
23:10:51.874  D: O: "\n"
23:10:52.127  D: "Connecting..."  busy:  false  state:  1
23:10:52.128  D: O: "\n"
23:10:54.383  F: QThread: Destroyed while thread is still running

Hopefully it means something for you, because it doesn’t mean much for me. Thanks!

It means that your laser is ignoring the ‘newline’ being sent by LightBurn. Have you set Linux to allow LightBurn to communicate with USB devices? (IE, adding yourself to the dialout group: https://lightburnsoftware.github.io/NewDocs/Installation.html#linux-installation )

yes, I’ve followed that and my user is in the dialout group. Actually, lightburn has connected with the laser in a couple of occasions and I was able to cut.

BTW, I find it interesting that once it has crashed, Lightburn is not able to start again even with the laser disconnected from the PC. I will reboot again and try to get another log.

OK, so the lines with “O:” are the output that Lightburn is sending to the laser, right? I can connect to the laser with pronterface, so if you want me to send some commands manually, I can do it.

I’ve tested to connect directly with a serial terminal to the laser. I can send commands and it responds correctly. I send ‘\n’ and the response is ‘ok’, I send ‘G28’ and it homes, same with G1 moves. This at least confirms the serial output working correctly.

I did a bit more research, I’m sniffing usb with wireshark. I can confirm that Lightburn doesn’t get to send anything to the serial port, and it crashes.

After crashing, I connect with a terminal to the laser and just type ‘\n’ (0x0d). I can see my output:

And the response from the laser:

So, for some reason, Lightburn seems to be unable to write to the serial port. The logs are here too:

02:31:57.545  D: "LightBurn 0.9.20"   "sáb. ene. 23 2021"
02:31:57.622  D: O: "?"
02:31:57.876  D: "Connecting..."  busy:  false  state:  1
02:31:57.877  D: O: "\n"
02:31:58.132  D: "Connecting..."  busy:  false  state:  1
02:31:58.133  D: O: "\n"
02:31:58.387  D: "Connecting..."  busy:  false  state:  1
02:31:58.389  D: O: "\n"
02:31:58.643  D: "Connecting..."  busy:  false  state:  1
02:31:58.643  D: O: "\n"
02:31:58.899  D: O: "?"
02:31:59.153  D: "Connecting..."  busy:  false  state:  1
02:31:59.154  D: O: "\n"
02:31:59.409  D: "Connecting..."  busy:  false  state:  1
02:31:59.410  D: O: "\n"
02:31:59.664  D: "Connecting..."  busy:  false  state:  1
02:31:59.664  D: O: "\n"
02:31:59.919  D: "Connecting..."  busy:  false  state:  1
02:31:59.920  D: O: "\n"
02:32:00.176  D: O: "?"
02:32:00.430  D: "Connecting..."  busy:  false  state:  1
02:32:00.432  D: O: "\n"
02:32:00.686  D: "Connecting..."  busy:  false  state:  1
02:32:00.687  D: O: "\n"
02:32:00.941  D: "Connecting..."  busy:  false  state:  1
02:32:00.942  D: O: "\n"
02:32:01.196  D: "Connecting..."  busy:  false  state:  1
02:32:01.199  D: O: "\n"
02:32:01.453  D: O: "?"
02:32:01.707  D: "Connecting..."  busy:  false  state:  1
02:32:01.708  D: O: "\n"
02:32:01.962  D: "Connecting..."  busy:  false  state:  1
02:32:01.964  D: O: "\n"
02:32:02.218  D: "Connecting..."  busy:  false  state:  1
02:32:02.219  D: O: "\n"
02:32:02.473  D: "Connecting..."  busy:  false  state:  1
02:32:02.475  D: O: "\n"
02:32:02.730  D: O: "?"
02:32:02.984  D: "Connecting..."  busy:  false  state:  1
02:32:02.986  D: O: "\n"
02:32:05.240  F: QThread: Destroyed while thread is still running

Go to Edit > Device Settings. Is the “Enable DTR” switch on or off?

It’s red, I guess this is OFF.

BTW, I realized that Lightburn defaults to a different serial port than the one the laser is connected to, this explains that he’s sending the “\n” and getting no response. He initially tries on /dev/ttyS0, but the laser is on /dev/ttyACM0.

When I set the dropdown to connect to /dev/ttyACM0 is when it crashes. But it doesn’t get to output a single byte to ttyACM0.

I guess the reason why once it crashes once, it crashes until the next reboot is because rebooting somehow resets the serial port it tries to connect back to ttyS0.

How does Lightburn detect serial ports in linux?

It’s searching for things that match this spec:

("ttyS*")    // Standard UART 8250 and etc.
("ttyO*")    // OMAP UART 8250 and etc.
("ttyUSB*")  // Usb/serial converters PL2303 and etc.
("ttyACM*")  // CDC_ACM converters (i.e. Mobile Phones).
("ttyGS*")   // Gadget serial device (i.e. Mobile Phones with gadget serial driver).
("ttyMI*")   // MOXA pci/serial converters.
("ttymxc*")  // Motorola IMX serial ports (i.e. Freescale i.MX).
("ttyAMA*")  // AMBA serial device for embedded platform on ARM (i.e. Raspberry Pi).
("ttyTHS*")  // Serial device for embedded platform on ARM (i.e. Tegra Jetson TK1).
("rfcomm*")  // Bluetooth serial device.
("ircomm*")  // IrDA serial device.
("tnt*");    // Virtual tty0tty serial device.

Have you tried this with any other software on the same machine?

I think it has nothing to do with serial or the laser, because the app crashes also without any laser connected to the computer.

I have been doing some debugging, I saw you’re using QtSerialPort and tried to replicate the problem in a python script. But the closest I could get is to confirm that after a fresh reboot, calling QSerialPortInfo::availablePorts() is a normal call that returns as fast as you would expect, but if at some point I open Lightburn, from that point on calls to QSerialPortInfo::availablePorts() take about 20s (rough estimate) to return. Same behavior that I saw for Lightburn under gdb.However, in my script I can still open the serial port after that.

However, this indicates that this issue is somehow related with something going wrong in Qt.

I also saw that you’re ending the process with SIGABRT, if that helps.

In any case, I got tired of trying to find the issue and tried using lightburn from virtualbox running windows and that seems to be working.

In Linux I still didn’t find any other suitable software to try with laser cutters, but I did manage to connect to the laser with screen and send g code commands which behaved as expected.

Interesting that you support tty0tty, I also thought of using that in between Lightburn and the ttyACM0 to isolate them a bit and see if that makes a difference.

I suspect it might be that there are libs on your newer Ubuntu that are conflicting with the ones used or shipped with LightBurn. I’ve not had anyone report a crash attempting to connect before, but you’re the only one whose reported using anything past v18.

I’m running Linux Mint 20.1 which is allegedly based on Ubuntu 20.04. Does that count?
(Not using an Ortur)

That makes sense, for the time being I will keep evaluating the windows trial. Unless I see something not working (up to now the only difference I’ve noticed is that it takes longer to start cutting), I will probably buy a license and I will try again in the future to use it on Ubuntu. I assume the license can be used on any OS, right?

Yup - and you can mix, so you could run one on Windows and one on Linux.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.