Gcode post 6000 lines cutting random places

I was trying to cut a file with 210439 lines of gcode, I know this because GroundControl gave me a big warning saying:

The current file contains 210439 lines of gcode rendering all 210439 lines simultaneously may crash the program, only the first 6000 lines are shown here. The complete program will cut if you choose to do so.

I chose to cut, and everything seemed fine, until it got past the 6000 lines, somewhere in the 7k’s things started going sideways and it was making random slices up and down the material, and then heading off in a weird direction to start cutting in an area that should not have any cuts. I’m not sure what went wrong.

I used Inkscape to create the SVG, and JSCut to create the GCode. I tried to upload the file, but it says its too large for the forum, its 5MB.

Anyone else cut some really large files, and have problems? Luckily I did not pay much for the material, but it took 3 hours of watching the cut until it started going sideways.

My initial thought was there might be some memory problem, but I’m running on a pretty hefty laptop running Ubuntu Linux. I don’t see anything bad in the .kivy/logs or in the command line output, not sure what else can be used to troubleshoot. It did not appear to lose connectivity with the board during the cut, but I could have missed it if it automatically reconnected. There did not appear to be any pause in the cutting that I noticed.

A disaster 7000 lines into a cut would be pretty disturbing!
Would you open an issue in GroundControl for this? Do you happen to have the log.txt file from it as well? I guess a copy of the .nc file might make it easier to reproduce, if that would be permissible.

There,'s a line number limit, but it’s at least 50K

http://forums.maslowcnc.com/t/resolved-v0-85-calibration-step-8-randomized/477/14?u=mooselake

I wonder if exceeding the limit starts causing strange errors? Maybe a buffer overflow?

If I remember right the limit should be 60,000 lines at this point not 6,000. The limit is just there because we had an issue where someone opened a 500,000 (or something crazy like that) line file on a computer that didn’t have enough ram to render the whole file so the computer stopped responding, then every time GC was opened it would lock up the computer so he couldn’t select a different file to open. Maybe the limit should be a setting so you could up it if you needed to?

In either case, the limit applies only to how many lines are shown in the preview, I wouldn’t expect it to affect how the file cuts. If you had the log file that would be awesome, but if not the .nc file would be really helpful if you are willing to share it

1 Like

Yep, I will create a github issue and post the log and gcode file, and probably a picture of what happened in the cut.

2 Likes

Created issue 428.

1 Like

Allowing a configurable amount of drawn lines with a reasonable default seems like a nice feature. If I’m on a powerful machine and can handle drawing a lot, it would be nice to see the whole file drawn.

1 Like

Not a snake programmer, but can you ask python what the memory limits are, and then subtract a size/percent guard size and make that your limit?

Might want to make it controlled with an option (there’s multi program considerations, but if you’re web surfing and maslowing at the same time…), but at the expense of potential massive thrashing today’s paged OSes should’ve able to handle an awful lot of lines. Do you strip out all the comments, etc or keep them for display?