Skip to content

CURA-13036 Ensure build volume initialized before arrange#21476

Open
HellAholic wants to merge 3 commits into
5.13from
CURA-13036
Open

CURA-13036 Ensure build volume initialized before arrange#21476
HellAholic wants to merge 3 commits into
5.13from
CURA-13036

Conversation

@HellAholic
Copy link
Copy Markdown
Contributor

@HellAholic HellAholic commented Mar 16, 2026

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

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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 16, 2026

Test Results

24 592 tests  ±0   24 590 ✅ ±0   51s ⏱️ +8s
     1 suites ±0        2 💤 ±0 
     1 files   ±0        0 ❌ ±0 

Results for commit 414ee3e. ± Comparison against base commit a0cbad0.

♻️ This comment has been updated with latest results.

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.
@HellAholic HellAholic changed the title Ensure build volume initialized before arrange CURA-13036 Ensure build volume initialized before arrange Mar 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants