Skip to content

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

Open
andriiryzhkov wants to merge 1 commit intodarktable-org:masterfrom
andriiryzhkov:fix_20928
Open

[AI] Fix segfault on quit in neural restore gui_cleanup#20931
andriiryzhkov wants to merge 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
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