Files
OrcaSlicer/tests/libslic3r
Kris Austin fa3dbfcc6f fix: clear 1 warning - report the real error when a Windows G-code export fails (#15582)
fix: report the real error when a Windows G-code export fails

copy_file built its failure message as "Error: " + errCode. Adding a DWORD
to a string literal is pointer arithmetic, not concatenation, so the pointer
lands errCode bytes into an 8-byte literal and runs past its end for any code
above 7. std::string then calls strlen on it and throws length_error, and the
catch(...) in BackgroundSlicingProcess::finalize_gcode replaces the diagnosis
with "Unknown error occurred during exporting G-code."

Every code a user is likely to hit is past the end: write-protected media is
19, no media 21, a full disk 112, and a destination held open by another
program 32. Codes 1 to 7 stay inside the literal and produce a truncated
message instead. So the "Maybe the SD card is write locked?" text has not
been reachable on Windows since this path was added in #2923.

Now that it is reachable, that guess only fits removable media, so it is
conditional on m_export_path_on_removable_media. The existing string is
untouched and keeps its 23 translations; the fixed-drive case adds one string.
2026-09-09 07:55:19 -03:00
..
2025-12-08 22:42:11 +08:00
2026-08-23 22:43:41 +08:00
2026-07-19 12:07:58 +08:00
2025-12-08 22:42:11 +08:00
2025-12-08 22:42:11 +08:00
2026-08-23 22:43:41 +08:00
2025-12-08 22:42:11 +08:00
2025-12-08 22:42:11 +08:00
2025-12-08 22:42:11 +08:00
2025-12-08 22:42:11 +08:00
2025-12-08 22:42:11 +08:00
2026-07-02 17:49:36 +08:00
2025-12-08 22:42:11 +08:00
2025-12-08 22:42:11 +08:00
2026-08-25 21:35:43 +08:00
2025-12-08 22:42:11 +08:00