GNOME Bugzilla – Bug 769161
notebook: avoid crash on tab DND
Last modified: 2021-06-10 21:08:33 UTC
See "gtk_notebook_detach_tab" API documentation. Using it instead of gtk_container_remove avoids an assertion crash in gtk+ when dragging and dropping a tab between terminal windows. See also original bug report at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=825818
Created attachment 332114 [details] [review] notebook: avoid crash on tab DND
This function is only available in gtk 3.16, so this needs some #if GTK_CHECK_VERSION() checks. The API docs only say that this makes this not abort the DND operation (assuming the removal was from a DND operation), so this is the right thing to do on >= 3.16, but it has nothing to do with fixing a crash; afaik the crash in gtk+ is actually fixed in the latest 3.20.x release.
(In reply to Christian Persch from comment #2) > This function is only available in gtk 3.16, so this needs some #if > GTK_CHECK_VERSION() checks. The API docs only say that this makes this not > abort the DND operation (assuming the removal was from a DND operation), so > this is the right thing to do on >= 3.16, but it has nothing to do with > fixing a crash; afaik the crash in gtk+ is actually fixed in the latest > 3.20.x release. Thanks for your quick review, will post a new patch with the ifdefs. Please note that I've tested this on 3.20.2 (lastest 3.20.x release) with all debian patches disabled where this is needed to fix the crash for me.
Latest is actually 3.20.6. I think the crash is bug 767588 which I thought was FIXED but now see has been reopened.
Created attachment 332117 [details] [review] notebook: avoid crash on tab DND See "gtk_notebook_detach_tab" API documentation. Using it instead of gtk_container_remove avoids an assertion crash in gtk+ when dragging and dropping a tab between terminal windows. See also original bug report at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=825818
Comment on attachment 332117 [details] [review] notebook: avoid crash on tab DND Thanks! master and gnome-3-20 branch (cherry-pick -x).
oh, I meant gnome-terminal 3.20.2 but you're apparently talking about gtk+ 3.20.6? I have gtk+ 3.20.6 already though, so not fixed for me there either. Thanks again for quickly reviewing and applying!
pushed to master (and cherry-picked -x to gnome-3-20).
*** Bug 764960 has been marked as a duplicate of this bug. ***
Hello. This fix is crash in gnome 3.20 branch. reverting it fixes the crash. (gdb) bt full
+ Trace 236513
To reproduce, open gnome-terminal, then File -> new terminal. In first gnome-terminal window, type exit.
Reverted.
I've disabled detaching a tab by DND for now until the gtk bug is fixed.
(In reply to Hussam Al-Tayeb from comment #11) > To reproduce, open gnome-terminal, then File -> new terminal. > In first gnome-terminal window, type exit. Fwiw, I'm not able to reproduce here on Debian testing/unstable (gnome-terminal 3.20.2-2) which includes the notebook_detach_tab patch. That's with gtk+ 3.20.7-1.
*** Bug 771588 has been marked as a duplicate of this bug. ***
Has this supposed gtk bug been reported upstream?
Is https://bugzilla.gnome.org/show_bug.cgi?id=767588 the correct upstream bug? A few months ago it had been reopened and, err, un-duplicated :)
*** Bug 775029 has been marked as a duplicate of this bug. ***
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-terminal/-/issues/7683.