Skip to content

[AI] Fix segfault on quit in neural restore gui_cleanup#20931

Merged
TurboGit merged 1 commit intodarktable-org:masterfrom
andriiryzhkov:fix_20928
May 5, 2026
Merged

[AI] Fix segfault on quit in neural restore gui_cleanup#20931
TurboGit merged 1 commit intodarktable-org:masterfrom
andriiryzhkov:fix_20928

Conversation

@andriiryzhkov
Copy link
Copy Markdown
Contributor

Fixes #20928

On quit, gui_cleanup flushed all pending events in the GLib main loop. One of them was a stale callback from another plugin already mid-teardown, and dispatching it crashed.

Fix

  • Remove the flush – the idle callbacks it was meant to drain don't need it.
  • Idle callbacks now skip safely if gui_cleanup already ran.
  • Cancel all timers at the top of gui_cleanup so none can fire mid-cleanup.

Tested on macOS and Linux.

@TurboGit TurboGit added this to the 5.6 milestone May 4, 2026
@TurboGit TurboGit added bugfix pull request fixing a bug priority: high core features are broken and not usable at all, software crashes labels May 4, 2026
Copy link
Copy Markdown
Member

@TurboGit TurboGit left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks!

@TurboGit TurboGit merged commit dfda2a9 into darktable-org:master May 5, 2026
11 of 20 checks passed
@andriiryzhkov andriiryzhkov deleted the fix_20928 branch May 5, 2026 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix pull request fixing a bug priority: high core features are broken and not usable at all, software crashes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

segfault on exit in neural restore

2 participants