Fix segfault in --merge CLI command (#14548)#15235
Open
joshherkness wants to merge 1 commit intoprusa3d:masterfrom
Open
Fix segfault in --merge CLI command (#14548)#15235joshherkness wants to merge 1 commit intoprusa3d:masterfrom
joshherkness wants to merge 1 commit intoprusa3d:masterfrom
Conversation
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
Running
PrusaSlicer --merge model.stlresults in a segmentation fault. The root cause is an unsafe access to thedont_arrangeoption - callingtransform.opt_bool("dont_arrange")when the option hasn't been set causes the crash.Changes
dont_arrangeoptiondont_arrange, we'll skip checking thedont_arrangeoption since this causes crashTesting
~/Projects/prusa-slicer/build/src/PrusaSlicer --merge /tmp/3DBenchy.stl /tmp/3DBenchy.stl --export-stl --output /tmp/merged.stl, verify no crash occurs and output contains merged models which have been arrangedIssue