fix: prevent PySide6 6.11.0 segfault and CDockManager 4.5.x teardown crashes#1180
Draft
Copilot wants to merge 2 commits into
Draft
fix: prevent PySide6 6.11.0 segfault and CDockManager 4.5.x teardown crashes#1180Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
Copilot
AI
changed the title
feat: make BEC Widgets compatible with PySide6 6.11
feat: bump PySide6 to 6.11.0 and PySide6-QtAds to 4.5.0.4
May 29, 2026
Copilot created this pull request from a session on behalf of
wyzula-jan
May 29, 2026 12:20
View session
Contributor
Benchmark comparisonThreshold: 20% (lower is better). No benchmark regression exceeded the configured threshold. 1 benchmark(s) improved beyond the configured threshold.
All benchmark results
|
…6.11.0 - bec_widget.py: set _destroyed=True BEFORE calling cleanup() so the flag is available throughout the entire teardown phase - bec_console.py: in _parking_parent, skip console.window() as parking target when the window is marked as _destroyed, preventing setParent() into a widget mid-destruction (segfault in PySide6 6.11.0) - basic_dock_area.py: add DockAreaWidget.cleanup() that calls delete_all() first to release CDockWidgets via the Qt ADS API before BECWidget.cleanup() runs, fixing teardown crashes with PySide6-QtAds 4.5.x
Copilot
AI
changed the title
feat: bump PySide6 to 6.11.0 and PySide6-QtAds to 4.5.0.4
fix: prevent PySide6 6.11.0 segfault and CDockManager 4.5.x teardown crashes
May 30, 2026
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.
Description
Three targeted fixes for teardown crashes introduced by PySide6 6.11.0 and PySide6-QtAds 4.5.x. PySide6 6.11.0 segfaults when
setParent()targets a widget mid-destruction; QtAds 4.5.x is stricter about dock widget teardown order.Root cause (segfault):
_destroyedwas set aftercleanup()returned, so during teardown the flag wasFalse. This allowed_parking_parentto returnconsole.window()(the enclosingDeveloperWidget) as a reparenting target — already being destroyed — causingsetParent()to segfault.Fixes:
bec_widget.py— moveself._destroyed = Trueto beforeself.cleanup()incloseEvent(), making the flag available throughout the entire teardown chainbec_console.py— in_parking_parent(), skipconsole.window()as a parking target whenwindow._destroyed is True, falling back to_fallback_holderinsteadbasic_dock_area.py— addDockAreaWidget.cleanup()that callsdelete_all()beforesuper().cleanup(), ensuring CDockWidgets are released through the Qt ADS API (closeDockWidget/deleteDockWidget) beforeBECWidget.cleanup()processes them as generic children;delete_all()is idempotent so subclasses that already call it in their owncleanup()are unaffectedRelated Issues
Type of Change
BecConsole._park_terminalwith PySide6 6.11.0DeviceManagerDisplayWidget/DockAreaWidgetteardown crash with PySide6-QtAds 4.5.xHow to test
DeveloperWidget(containing aBecConsole) — should not segfaultDeviceManagerDisplayWidget— should not crashPotential side effects
_destroyed = Trueis now set earlier incloseEvent. Any code that checked_destroyedto gate re-entrant calls duringcleanup()will now correctly seeTrue; this is the intended behavior. No other known side effects.Screenshots / GIFs (if applicable)
N/A
Additional Comments
CI is pending maintainer approval to run on this bot-submitted PR. The prior CI run (pre-fix, SHA
f4d51b62) showed exit code 139 (segfault) intest_developer_view; these fixes address that crash chain directly.Definition of Done