Skip to content

fix: crash when GTK drawing window - #55

Merged
sorrycc merged 3 commits into
sorrycc:mainfrom
lunargon:fix/crash-change-settings
Oct 20, 2026
Merged

sorrycc merged 3 commits into
sorrycc:mainfrom
lunargon:fix/crash-change-settings

Conversation

@lunargon

Copy link
Copy Markdown
Contributor

Fix: Linux menu replacement during GTK drawing

Description:

Defer native menu updates until after GTK finishes drawing, avoiding destruction of widgets GTK may still be traversing. Discard stale queued updates so the latest menu stays active.
Potential fix for #51 Fedora reproduction still needs verification.

Validation:

  • Added regression coverage for deferred and stale updates.
  • go test -short ./... passed.
  • Linux amd64 build succeeded.
  • Updated CHANGELOG.md.

@lunargon
lunargon marked this pull request as draft October 20, 2026 04:31
@sorrycc
sorrycc marked this pull request as ready for review October 20, 2026 08:05

@sorrycc sorrycc left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks, the diagnosis matches the log in #51. On Linux, installMenu destroys the menu bar, a child of the window's box, and Mayoi sets the menu from its frame, so the box could lose that child while drawing it. That fits the gtk_container_propagate_draw assertions right before the SIGSEGV. Queuing the update through RunOnMain (g_idle_add) moves it out of the draw, and the revision check keeps updates that arrive out of order from going stale. The test passes and the linux/amd64 build is clean. I merged main and reworded the changelog line for users. Marking ready and merging. @BabyLy233, please tell us if the next release still crashes.

@sorrycc
sorrycc merged commit f8c0ab9 into sorrycc:main Oct 20, 2026
@lunargon

Copy link
Copy Markdown
Contributor Author

@sorrycc Awesome thank you. This is very great software. Have a nice day.

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