OrcaSlicer icon indicating copy to clipboard operation
OrcaSlicer copied to clipboard

Windows CLI: diagnose final output path length failures before slicing

Open antonio94770 opened this issue 1 month ago • 1 comments

Scope clarification, 2026-10-29: 229/230 is the measured boundary for the tested environment and generated filename, not a universal output-directory length limit or a confirmed Snapmaker-specific root cause. The actionable request is to identify the final failing path and its constraint clearly.

Is there an existing issue for this problem?

  • [x] I have searched the existing issues

Snapmaker_Orca Version

2.4.1, official Windows installer; reproduced on 2026-10-28.

Operating System (OS)

Windows

OS Version

Windows 11

Printer

Snapmaker U1 (0.4 nozzle), bundled 0.20mm High Quality @Snapmaker U1 (0.4 nozzle) process and Generic PLA presets. Offline CLI slicing, no physical print required.

How to reproduce

Run the suite with a short work directory; compare output-229 and output-230. The script creates absolute output directory paths of exactly 229 and 230 characters. Same cube, same flattened settings; inspect command.json and slicer.log.

Actual results

229 characters: exit 0, one G-code, 925 s / 3.65 g. 230 characters: exit 4294967196 (0xFFFFFF9C), no G-code, with: GCode processor post process export failed. Cannot open file for writing. The boundary is measured for this environment and generated output filename. A total Windows path limit is a possible explanation, not a confirmed root cause or a universal output-directory limit.

Expected results

Support the path where possible, or validate the final generated file path before slicing and identify that path and the applicable limit in the diagnostic.

Project file & Debug log uploads

Reproducer script and recorded results, pinned to the tested revision. The script generates the inputs and preserves each command (command.json), input settings, output and combined stdout/stderr (slicer.log) in a separate probe directory. Raw logs are not attached here. To reproduce with Python >= 3.11 and Orca 2.4.1 installed:

git clone https://github.com/antonio94770/Snapmaker-U1-Print-Copilot.git

cd Snapmaker-U1-Print-Copilot

git checkout aa73504769f591bb9c993c9b662de601251da4e6

python -m pip install -e .

python research/m4-probe/recheck_release.py C:/orca-cli-recheck

Use a fresh short absolute work directory that does not already exist. The script copies bundled presets and does not modify the installation or user presets or communicate with a printer. The suite includes intentional crash probes, each with a 45-second timeout. Commands use Windows-style paths and four filament presets.

Checklist of files to include

  • [ ] Raw log file attached (preserved locally by the script)
  • [x] Reproducer and input-generation code linked above

antonio94770 avatar Oct 29 '26 13:10 antonio94770

Thanks for the thorough probe — the 229/230 boundary is consistent with the Windows MAX_PATH (260) limit: the failing open happens in the post-process export (GCodeProcessor.cpp — "Cannot open file for writing"), and the total path (output dir + generated gcode filename) crosses 260 right at your measured boundary. And agreed, the exit code is a dead-end failure path, not a usable diagnostic. Status: we're taking a pre-slice validation of the final output path on Windows (a diagnostic that names the actual path and the 260-character constraint) through evaluation on our side; if it passes, we'll queue it up for implementation. Full long-path support (\?\ prefixes / a longPathAware manifest) is a bigger change to be assessed separately. Until then, the workaround is shortening the output directory — or mapping a deep folder to a drive letter (subst) — to keep the total generated path under 260.

gushanji avatar Nov 26 '26 11:11 gushanji