The issue doesn't happen consistently and the same file could stop and start quite happily one day and fail the next.
One thing that may (or may not) be relevant is that I've only seen it happen on larger files so far (typically 15mb or bigger)
The files you asked for are:
My Cancel.g is the factory default empty one:
; stop.g
; called when a print is cancelled after a pause.
One G code file that I had the problem with is this one:
[[Language]]
; G-Code generated by Simplify3D(R) Version 4.0.0
; Feb 26, 2018 at 1:27:08 PM
; Settings Summary
; processName,Process1
```This is followed by about 200 lines of comments from Simplify listing all its settings plus its life history before we get to the actual code:
[[language]]
G90
M82
M106 S255
G4 P500
M106 S0
M140 S60
M190 S60
G28 ; home all axes
;G29 ; run auto bed levelling routine
M109 S180 ; heat extruder to correct temperature
G92 E0
G1 E-8.0000 F4800
G1 Z0.600 F6000
; process Process1
; layer 1, Z = 0.100
T0
; tool H0.100 W0.480
; skirt
G1 X-35.752 Y-17.500 F18000
G1 Z0.100 F6000
G1 E-0.0500 F1440
G92 E0
G1 X-36.241 Y-17.989 E0.0138 F3000
G1 X-36.302 Y-18.060 E0.0157
G1 X-36.820 Y-18.774 E0.0333
G1 X-36.870 Y-18.854 E0.0352
etc.
There then follows about 18mb of G-Code before we end with:
[[language]]
G1 X8.963 Y31.464 E1.1401
G1 X8.659 Y32.316 E1.1581
G92 E0
G1 E-8.0000 F4800
; layer end
M104 S0 ; turn off extruder
M140 S0 ; turn off bed
G28 ; home axes
M84 ; disable motors
M107; turn off part cooling fan
M81 S1; Power off after cooldown
; Build Summary
; Build time: 2 hours 56 minutes
; Filament length: 15021.0 mm (15.02 m)
; Plastic volume: 36129.70 mm^3 (36.13 cc)
; Plastic weight: 45.16 g (0.10 lb)
; Material cost: 2.08