Skip to content

Fix Qt race condition when repainting - #14193

Draft
ajaust wants to merge 2 commits into
equinor:mainfrom
ajaust:fix-qt-memory-error
Draft

Fix Qt race condition when repainting#14193
ajaust wants to merge 2 commits into
equinor:mainfrom
ajaust:fix-qt-memory-error

Conversation

@ajaust

@ajaust ajaust commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Issue
Resolves #14192

Approach
Delaying repainting of widgets by moving them to end of the event queue.

(Screenshot of new behavior in GUI if applicable)

  • PR title captures the intent of the changes, and is fitting for release notes.
  • Added appropriate release note label
  • Commit history is consistent and clean, in line with the contribution guidelines.
  • Make sure unit tests pass locally after every commit (git rebase -i main --exec 'just rapid-tests')

When applicable

  • When screenshots are changed: Review screenshot-PR in ert-testdata,
    merge screenshot-PR in ert-testdata before merging this PR.
  • When there are user facing changes: Updated documentation
  • New behavior or changes to existing untested code: Ensured that unit tests are added (See Ground Rules).
  • Large PR: Prepare changes in small commits for more convenient review
  • Bug fix: Add regression test for the bug
  • Bug fix: Add backport label to latest release (format: 'backport release-branch-name')

ajaust added 2 commits August 17, 2026 07:56
It seems that we occasionally resize the plot side panel while Qt is
repainting widgets. This reenters the repaint manager causing a
segmentation fauult. Defer all layout changes with QTimer.singleShot(0).
It seems that we occasionally change the visibility of a widget while
Qt is repainting widgets. This reenters the repaint manager causing a
segmentation fault. Defer the visibility change with QTimer.singleShot(0).
@ertomatic

Copy link
Copy Markdown
Collaborator

Screenshots differ from baselines. A baseline update PR has been prepared: equinor/ert-testdata#85

@codecov-commenter

codecov-commenter commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.91%. Comparing base (96d348a) to head (0711c2f).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14193      +/-   ##
==========================================
- Coverage   91.92%   91.91%   -0.01%     
==========================================
  Files         482      482              
  Lines       33479    33500      +21     
==========================================
+ Hits        30775    30792      +17     
- Misses       2704     2708       +4     
Flag Coverage Δ
cli-tests 36.47% <0.00%> (-0.02%) ⬇️
fuzz 44.47% <22.22%> (-0.02%) ⬇️
gui-tests 58.83% <33.33%> (-0.04%) ⬇️
performance-and-unit-tests 80.79% <100.00%> (+<0.01%) ⬆️
test 45.99% <22.22%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...rc/ert/gui/plotting/widgets/collapsible_section.py 100.00% <100.00%> (ø)
src/ert/gui/plotting/widgets/plot_side_panel.py 100.00% <100.00%> (ø)

... and 10 files with indirect coverage changes

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.

Flaky GUI test (segmentation fault)

3 participants