Horizontal lines produced on one specific image, missing S on grbl-based G1?

Hi all. I’m seeing horizontal lines on my grbl-based xTool s1 when I attempt to engrave one specific image (the other ~10 are completely fine). I noticed this on a physical cut of alu I did. I updated to 1.6.00 and the issue persists.

If I export to a gcode file, I can see these horizontal lines are lasered at high power, so I’ve been using that to reproduce the issue.

I’ve found this only happens when I am outputting for the xTool (not my other, Marlin-based machine), and only if the image mode is specified as ‘greyscale’. I don’t know why it happens only on this specific image.

Enabling the option ‘Emit S value with every G1 command’ does not fix the issue, and if I look at the produced gcode, I can see that not every G1 command has an S value. An excerpt:

G0 X-0.05S0
G1 X-0.05S200
G1 X-6.75
G1 X-0.05S766.9
G1 X-0.05S984.3

Note the middle line, which seems to be erroneously cut at S200 instead of S0.
I’ve attached the produced gcode, along with the source image, and the lightburn file that reproduces it. I’ve also attached a screenshot of the gcode viewer showing the erroneous lines - note that I did some simple postprocessing to get this result (on this image only, not the other gcode files), so it may not be accurate, but that it does appear identical to the physically lasered object I have.

Hope this is helpful (and I hope I’m posting to the right place!) Let me know if you need anything else to help narrow this down.

foo.gcode (324.8 KB)

weirdlines.lbrn2 (168.5 KB)