How to knock out your python (do not try this at home)

I’m not sure where I’m going with this, but I find it interesting enough to share.
Ubuntu 18.04 LTS, FW/GC 1.13
FW running FAKE_SERVO

To replicate, I load this file gnu.ngc (27.1 KB) (Generated by gcode_tools from inkscape.)

This does not only make GC insane, but seems also to affect the system python in a way that I need to restart my PC to recover from it. Restarting GC does not help.
What I found interesting is that if I load this file afterwards circle.nc (2.8 KB) I get ‘USB connection lost’ and ‘Sled can not keep up’ and running just stops somewhere without any response. If seen this pop up in the forum quite often lately, but there might be no connection.

G03 X[403.1599*#5+#8] Y[25.9257*#6+#9] I[-4.9493*#5+#8] J[-9.7829*#6+#9]
Unable to draw arc on screen: G03 X[403.1599*#5+#8] Y[25.9257*#6+#9] I[-4.9493*#5+#8] J[-9.7829*#6+#9]
Unable to draw line on screen: G00 Z[#11*#7 + #10]
Exception in thread Thread-1:
Traceback (most recent call last):
File “/usr/lib/python2.7/threading.py”, line 801, in __bootstrap_inner
self.run()
File “/usr/lib/python2.7/threading.py”, line 754, in run
self.__target(*self.__args, **self.__kwargs)
File “/home/whoareyou4/Maslow/fw-test/GroundControl-1.13/Connection/serialPortThread.py”, line 172, in getmessage
if self.bufferSpace > len(self.data.gcode[self.data.gcodeIndex]): #if there is space in the buffer keep sending lines
IndexError: string index out of range

If you can’t draw that arc, fine, but leave my serial port alone! :wink:

2 Likes

I’ve tried the files on OSX and Win10, in both cases the gnu.ngc file fails to load but GC survives and is willing to open circle.nc.
The gcode format in gnu.gnc is quite complex, with 11 substitution variables. Those are something GC and the firmware know nothing about. Eliminating those lets the file open.

2 Likes