Add Skip G-code config block to exclude the config comments from G-code files #614

Open
opened 2026-04-05 16:24:02 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @Felixoid on 2/24/2026

Description

gklib crashes attempting to parse the following line: ; filament_colour_type = 1;1;1;1

There's an upstream issue in https://github.com/ANYCUBIC-3D/Klipper-go/issues/13, but without the fix, it's a major regression.

After discussion, skipping the entire CONFIG_BLOCK seemed like a better approach to fix all parsers' issues with outdated printers globally.

Screenshots/Recordings/Graphs

image image image

Tests

A simple test to check CONFIG_BLOCK_START and CONFIG_BLOCK_END are absent when the option is enabled.

Notes

Fix https://github.com/OrcaSlicer/OrcaSlicer/issues/12444 after https://github.com/OrcaSlicer/OrcaSlicer/pull/10780
Fix #12033

I narrowed down the issue to this particular line, completely crashing the G-code parser.

*Originally created by @Felixoid on 2/24/2026* # Description gklib crashes attempting to parse the following line: `; filament_colour_type = 1;1;1;1` There's an upstream issue in https://github.com/ANYCUBIC-3D/Klipper-go/issues/13, but without the fix, it's a major regression. After discussion, skipping the entire `CONFIG_BLOCK` seemed like a better approach to fix all parsers' issues with outdated printers globally. <!-- > Please provide a summary of the changes made in this PR. Include details such as: > * What issue does this PR address or fix? > * What new features or enhancements does this PR introduce? > * Are there any breaking changes or dependencies that need to be considered? --> # Screenshots/Recordings/Graphs <img width="1015" height="882" alt="image" src="https://github.com/user-attachments/assets/a0e7053f-2fa0-4d36-8c95-32ab4cb32e15" /> <img width="693" height="493" alt="image" src="https://github.com/user-attachments/assets/eeb6e1f2-b0d4-4c89-9065-f1635229275b" /> <img width="408" height="720" alt="image" src="https://github.com/user-attachments/assets/17cd67bf-a30c-4a58-9e2b-070d4d16be49" /> <!-- > Please attach relevant screenshots to showcase the UI changes. > Please attach images that can help explain the changes. --> ## Tests <!-- > Please describe the tests that you have conducted to verify the changes made in this PR. --> A simple test to check `CONFIG_BLOCK_START` and `CONFIG_BLOCK_END` are absent when the option is enabled. ### Notes Fix https://github.com/OrcaSlicer/OrcaSlicer/issues/12444 after https://github.com/OrcaSlicer/OrcaSlicer/pull/10780 Fix #12033 I narrowed down the issue to this particular line, completely crashing the G-code parser.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/OrcaSlicer#614