Fix retract keys sort order in PrintConfig (debug build crash)#202
Closed
appositeit wants to merge 1 commit intoSnapmaker:2.2.4-devfrom
Closed
Fix retract keys sort order in PrintConfig (debug build crash)#202appositeit wants to merge 1 commit intoSnapmaker:2.2.4-devfrom
appositeit wants to merge 1 commit intoSnapmaker:2.2.4-devfrom
Conversation
The retract_length_toolchange and retract_restart_extra_toolchange keys were appended at the end of m_extruder_retract_keys and m_filament_retract_keys, violating the alphabetical sort order required by the std::is_sorted assertion. This causes an immediate crash on startup in debug builds. Move the keys to their correct alphabetical positions: - retract_length_toolchange after retract_before_wipe - retract_restart_extra_toolchange after retract_restart_extra Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
|
Hi! I noticed you've closed all the bugs I raised. Is that because they were not useful, or they were wrong, or you didn't understand that they were causing compilation errors? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
m_extruder_retract_keysandm_filament_retract_keysinPrintConfig.cppretract_length_toolchangeandretract_restart_extra_toolchangewere appended at the end of the sorted lists instead of being inserted at their correct alphabetical positionsstd::is_sortedassertion failure and immediate crash on startup in debug builds (-DCMAKE_BUILD_TYPE=Debug)Root Cause
When the toolchange retraction keys were added to Snapmaker Orca, they were appended at the end of the sorted key lists. Alphabetically,
retract_le...sorts beforeretract_li..., andretract_restart_extra_toolchangesorts afterretract_restart_extrabut beforeretract_when_changing_layer.Fix
Move the keys to their correct alphabetical positions:
retract_length_toolchange→ afterretract_before_wipe, beforeretract_lift_aboveretract_restart_extra_toolchange→ afterretract_restart_extra, beforeretract_when_changing_layerTest plan
sortutility: extracted keys, sorted, diffed — no differences🤖 Generated with Claude Code