Orca pipeline
12 results today 24 agents on 1 worker Admin

Local AI agents triage open OrcaSlicer bug reports, try to reproduce them and draft fixes; a person reviews every result before anything goes upstream. An independent experiment, read only.

Queue / #15201

#15201Fixing · with vast-tw

Bug in SparkX i7 start gcode: `G1 X-1 Z-0.3` causes nozzle scratching build plate

  • Agents took the fix 4 times.

Agent answer

Reproduction of issue #15201 — confirmed

Setup: OrcaSlicer 2.6.0-dev (main @ f939e2b1e), Release binary, Linux, driven under Xvfb via the MCP harness with a fresh datadir seeded with the stock Creality SPARKX i7 0.4 nozzle printer and CR-PLA @SPARKX i7 filament.

Steps: added a 26 mm cube primitive → plate_slice (130 layers, OK) → project_export to G-code (repro/out/sparkx_cube.gcode).

Result — bug present. The exported G-code start section (lines ~105–130) reads:

G1 Z3 F600
M83
G1 Y0 F12000
G1 X150 F30000
G1 Z0.2 F600          ; absolute: nozzle at Z=0.2
G1 X120 Y0 E15 F280   ; purge line ...
...
G1 X95 E.3742  F1400  ; ... ends at X95, still at Z0.2
G91                   ; RELATIVE moves from here
G1 X-1 Z-0.3          ; Z: 0.2 - 0.3 = -0.1  → nozzle 0.1 mm INTO the bed
G1 X-4                ; drags it 5 mm across the plate at the negative Z
G92 E0

The negative relative Z move happens after the purge line and before the print begins — exactly the nozzle-into-bed scratch reported. The same block is present at line 62 (machine_start_gcode) of all four profiles named in the issue: resources/profiles/Creality/machine/Creality SPARKX i7 {0.2,0.4,0.6,0.8} nozzle.json. (Ender-3 V4's similar gcode uses Z-0.300 too — out of scope, worth a look when fixing.)

Fix: in all four JSONs replace G1 X-1 Z-0.3 with a safe move, e.g. G1 X-1 Z0.1 (positive lift while relative) — nothing downstream depends on descending; G1 X-4 is just a wipe.

Side observation (separate bug): the pure-CLI path (--load-settings <machine json> --slice 0) aborts on these profiles with retraction_distances_when_cut: 28 not in range [10, 18] — the profiles ship value 28 but the option def at src/libslic3r/PrintConfig.cpp:6408-6413 clamps to [10,18]. The GUI tolerates it; the CLI refuses to slice. Recommend filing separately.

Artifacts in repro/: NOTES.md (exact steps), out/sparkx_cube.gcode (full export), gcode_purge_excerpt.txt, cube.stl, screenshot_preview.png, repro_cli.sh.

Cause

resources/profiles/Creality/machine/Creality SPARKX i7 {0.2,0.4,0.6,0.8} nozzle.json, machine_start_gcode (line 62): after the purge line drawn at absolute Z0.2, the gcode switches to relative (G91) and executes G1 X-1 Z-0.3, lowering the nozzle to ~Z-0.1 below the bed surface, then G1 X-4 drags it across the plate.

Triage summary

The shipped Creality SPARKX i7 machine profiles (0.2/0.4/0.6/0.8 nozzle) end their start gcode with a purge line at Z0.2 followed by G91 then G1 X-1 Z-0.3, a relative move that drops the nozzle to ~Z-0.1 (into the bed) and drags it ~5 mm across the plate; reproduced by slicing a cube with the stock SparkX i7 0.4 profile in the GUI and finding the move verbatim in the exported G-code.

Reproduction files (5)
file · gcode_purge_excerpt.txtOpen in full
M109 S220
M106 S0
T0

M8200 O
M204 S2000
G1 Z3 F600
M83
G1 Y0 F12000
M73 P1 R31
G1 X150 F30000
G1 Z0.2 F600
G1 X120 Y0 E15 F280
G1 X115 E.3742  F1400
G1 X110 E.3742  F5600
M73 P2 R31
G1 X105 E.3742  F1400
G1 X100 E.3742  F5600
G1 X95 E.3742  F1400
G91
G1 X-1 Z-0.3
G1 X-4
G92 E0
G90
G21
M83 ; use relative distances for extrusion
;filament start gcode
SET_PRESSURE_ADVANCE ADVANCE=0.032; Override pressure advance value
file · sparkx_cube.gcodeOpen in full

sparkx_cube.gcode, 383.0 KB: download

file · NOTES.mdOpen in full
# Issue #15201 — SparkX i7 start gcode `G1 X-1 Z-0.3` scratches the bed

Status: **reproduced** on current main (OrcaSlicer 2.6.0-dev, Release binary at $ORCA_BIN).

## What the bug is

All four shipped SparkX i7 machine profiles end their `machine_start_gcode` with the purge
line drawn at Z0.2, then:

```
G1 Z0.2 F600          ; absolute — nozzle at Z=0.2, purge line drawn here (X150 -> X95)
...
G91                    ; switch to RELATIVE moves
G1 X-1 Z-0.3           ; relative: Z 0.2 - 0.3 = Z-0.1  -> nozzle 0.1 mm BELOW the bed
G1 X-4                 ; drags nozzle 5 mm across the plate at Z-0.1
G92 E0
```

So right after the purge line the nozzle plunges ~0.1 mm into the build plate and is dragged
5 mm along X. Matches the issue report exactly.

## Faulty files (all 4, identical block, line 62 `machine_start_gcode`)

- `resources/profiles/Creality/machine/Creality SPARKX i7 0.2 nozzle.json`
- `resources/profiles/Creality/machine/Creality SPARKX i7 0.4 nozzle.json`
- `resources/profiles/Creality/machine/Creality SPARKX i7 0.6 nozzle.json`
- `resources/profiles/Creality/machine/Creality SPARKX i7 0.8 nozzle.json`

Note: the same gcode family on Ender-3 V4 uses `G1 X1 Z-0.300` and is also suspect, but it
starts that block after `G1 Z0.3` — out of scope for this issue; check when fixing.

## Reproduction steps (GUI via MCP harness, as a user would)

1. `orca-mcp launch --bin $ORCA_BIN --xvfb --vendor Creality --printer "Creality SPARKX [email protected]" --filament "CR-PLA"`
2. `object_add_primitive {"shape":"cube"}` (answered the size dialog OK, 26 mm cube)
3. `plate_slice {"plate":"all"}` — sliced fine (130 layers)
4. `project_export {"format":"gcode","path":"repro/out/sparkx_cube.gcode"}`
5. Grep the exported G-code around line 123: after the purge line (`G1 X95 E.3742`), the file
   contains literally:

   ```
   G91
   G1 X-1 Z-0.3
   G1 X-4
   G92 E0
   ```

   (see `repro/gcode_purge_excerpt.txt`; full export in `repro/out/sparkx_cube.gcode`,
   `machine_start_gcode` also echoed in the config header at line 14064).

## Side observation (separate bug, blocks CLI-only workflows)

The pure CLI path (`--load-settings <machine json> --slice 0`) aborts with:

```
Param values in 3mf/config error:
retraction_distances_when_cut: 28 not in range [10, 18]
```

The SPARKX i7 machine profiles ship `retraction_distances_when_cut: 28`, but the option def
in `src/libslic3r/PrintConfig.cpp:6408-6413` has `min = 10; max = 18`. The GUI tolerates it
(slice+export worked), but CLI slicing dies. Worth its own issue.

## Suggested fix (as proposed in the issue)

Replace `G1 X-1 Z-0.3` in all four profiles with a safe move, e.g. `G1 X-1 Z0.1` (positive Z
lift while still relative), or drop the Z part. Nothing in the gcode relies on the nozzle
going down; the following `G1 X-4` is a wipe move.

## Artifacts

- `repro/cube.stl` — 10 mm test cube (script-generated)
- `repro/out/sparkx_cube.gcode` — full slice+export with the SparkX i7 0.4 profile
- `repro/gcode_purge_excerpt.txt` — the offending lines from the export
- `repro/screenshot_preview.png` — app screenshot after slicing
- `repro/repro_cli.sh` — CLI attempt showing the profile validation failure
file · cube.stlOpen in full

cube.stl, 0.7 KB: download

file · repro_cli.shOpen in full
#!/bin/bash
# CLI reproduction attempt (aborts before slicing on a SEPARATE profile bug;
# the actual bug reproduction was done via the GUI/MCP harness — see NOTES.md).
set -x
mkdir -p repro/out
cd repro
timeout 600 $ORCA_BIN \
  --load-settings "../resources/profiles/Creality/machine/Creality SPARKX i7 0.4 nozzle.json" \
  --load-filaments "../resources/profiles/Creality/filament/CR-PLA @SPARKX i7-all.json" \
  --load-defaultfila \
  --slice 0 --outputdir out cube.stl --logfile log.txt
# Fails with: "Param values in 3mf/config error: retraction_distances_when_cut: 28 not in range [10, 18]"
Issue text on GitHub

Is this issue reproducible in the latest nightly build?

  • [x] I have checked the latest nightly build and the issue is still reproducible

Is there an existing issue for this problem?

  • [x] I have searched the existing issues

OrcaSlicer Version

2.4.2

Regression compared to a previous version

No response

Operating System (OS)

Linux

OS Version

Fedora Linux 44 and Bazzite 44

Additional system information

No response

Printer

SparkX i7

How to reproduce

  1. Select printer profile for the SparkX i7
  2. Add object like a primitive cube
  3. Start the print
  4. Observe nozzle behavior after purge completion

Actual results

After print completion of the purge line, the nozzle scratches the build plate. This occurs with newly assembled printer + fresh OrcaSlicer installations also the current Dev version.

Affected files:
SparkX i7 0.2 Profile
SparkX i7 0.4 Profile
SparkX i7 0.6 Profile
SparkX i7 0.8 Profile

The end of the machine start gcode contains this line: G1 X-1 Z-0.3

Image

Workaround: Changing Z-0.3 to Z0.1 eliminates the scratching issue.

Expected results

The start gcode should use a safer z-Height right after finishing the purge line.

Questions

  1. Was the Z-0.3 value intentional? If so, what's the purpose?
  2. Should this be adjusted to a safer positive value (e.g., Z0.1 or Z0.2)?
  3. Will this profile fix be backported to older versions?
  4. Is it possible that the recent SparkX i7 Firmware update causes the incomparability with the OrcaSlicer profile?

This affects the default profile shipped with OrcaSlicer, not user modifications. New users without gcode inspection knowledge will hit this wall immediately.

Project file & Debug log uploads

Cube.zip

Checklist of files to include

  • [ ] Log file
  • [x] Project file

Anything else?

No response

Screenshots and videos

screenshot: screenshot_preview.png
screenshot_preview.png
Area
profiles
Platform
all
Author
ReefRenderer
Comments
3
Created
2026-08-10
bug

Log

  1. vast-tw took it: fix
    vast-tw · 18 min ago
  2. Worker restarting; back in the queue
    vast-tw · 18 min ago
  3. vast-tw took it: fix
    vast-tw · 1 h ago
  4. Worker restarting; back in the queue
    vast-tw · 1 h ago
  5. vast-tw took it: fix
    vast-tw · 1 h ago
  6. vast-tw restarted; returned to the queue
    vast-tw · 1 h ago
  7. vast-tw took it: fix
    vast-tw · 1 h ago
  8. reproduce: reproduced
    vast-tw · 1 h ago
  9. vast-tw took it: reproduce
    vast-tw · 1 h ago
  10. triage: triaged
    vast-tw · 1 h ago
  11. vast-tw took it: triage
    vast-tw · 1 h ago
  12. Collected from GitHub
    panel · 3 h ago
vast-tw is fixing this issue, since 18 min ago.