CURA-13036 Ensure build volume initialized before arrange#21476
Open
HellAholic wants to merge 3 commits into
Open
CURA-13036 Ensure build volume initialized before arrange#21476HellAholic wants to merge 3 commits into
HellAholic wants to merge 3 commits into
Conversation
Fix a race where BuildVolume dimensions could remain zero because globalContainerStackChanged/activeQualityChanged fire before BuildVolume is constructed. Call _onStackChanged() during initialization and re-trigger it from _onEngineCreated() (with a warning) if the volume AABB is still None so dimensions are populated and rebuild can succeed. In CuraApplication._arrangeAll, handle a None build-volume bounding box by logging a warning, requesting a rebuild, and aborting arrange to avoid comparing against an uninitialized volume.
Erwan MATHIEU (wawanbreton)
requested changes
Mar 16, 2026
Contributor
Erwan MATHIEU (wawanbreton)
left a comment
There was a problem hiding this comment.
Code looks good, but there are way too many comments in my opinion. The full explanation could be present in the commit details, but the in-code comments should remain short.
Contributor
Clean up and shorten explanatory comments in BuildVolume related to queuing the stack-change timer, and simplify the warning text when rebuild() returns early or the volume bounding box is missing. These edits reduce verbose explanations about signal ordering/race conditions while keeping behavior unchanged.
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.
Defensive programming:
Fix a potential race where BuildVolume dimensions could remain zero because globalContainerStackChanged/activeQualityChanged fire before BuildVolume is constructed. Call _onStackChanged() during initialization and re-trigger it from _onEngineCreated() (with a warning) if the volume AABB is still None so dimensions are populated and rebuild can succeed. In CuraApplication._arrangeAll, handle a None build-volume bounding box by logging a warning, requesting a rebuild, and aborting arrange to avoid comparing against an uninitialized volume.
CURA-13036