Created attachment 8671 trace log gdk_window_set_cursor: assertion 'GDK_IS_WINDOW (window)' failed How to reproduce: - copy some file - close main window.
Created attachment 8813 Patch to fix bug 15635 Small patch to fix this (it just swaps the order of two lines of code). After some experimenting, I found that thunar_clipboard_manager_dispose was being called during the unrealize-ing of the window. When the clipboard is non-empty, this results in a call to gtk_clipboard_store. This call runs a glib event loop, which then processes signals that are ultimately passed to the window's GtkPaned member, which is in a bad state due to being part-way through unrealize-ation, and this causes the error. The patch fixes this by waiting until after the GtkWidget class has unrealize the window before calling g_object_unref on the clipboard manager. So I suppose this is really a gtk bug, since gtk is allowing widgets to receive signals while in a bad state? Also this is my first go at submitting a patch, so if I have done something wrong/badly (either in the patch itself or the submission process), please let me know!
Reuben Green referenced this bugreport in commit 9c0d4a03ec3287b4b1fbc28b451dc78ad6f06d68 Prevent premature disposal of clipboard manager (Bug 15635) https://git.xfce.org/xfce/thunar/commit?id=9c0d4a03ec3287b4b1fbc28b451dc78ad6f06d68
Reuben Green referenced this bugreport in commit ca761593d4db7d186b2029f4567bec1ef4ade0ce Prevent premature disposal of clipboard manager (Bug 15635) https://git.xfce.org/xfce/thunar/commit?id=ca761593d4db7d186b2029f4567bec1ef4ade0ce
(In reply to Reuben Green from comment #1) > Created attachment 8813 > Patch to fix bug 15635 > Welcome! Your patch looks good to me and seems to fix the bug. Formatting, commit message, etc, all is fine (iirc first time everything seems to be ok on a "first patch" :P ) Pushed it to master and 4.14 branch. I as well would assume to receive at least some dedicated Warning / Error when a widget reveives a signal in while in a bad state. ( Though I dont know much about gtk internals) Best open a bug for it on https://gitlab.gnome.org/GNOME/gtk and see what the devs tell (or first search if such a bug already exists) Thanks for your contribution !
Quick follow-up to this bug: after a little work, I discovered that the root cause of this bug was indeed a bug in gtk 3.24. I opened an issue against this bug (https://gitlab.gnome.org/GNOME/gtk/issues/2066) and submitted a fix for it (https://gitlab.gnome.org/GNOME/gtk/merge_requests/1033), which has now been accepted.
Thanks for the info! Well done !