GNOME Bugzilla – Bug 74197
Control-T Control-D crashes profterm
Last modified: 2004-12-22 21:47:04 UTC
CVS today: Type Control-T Type Control-D <crash> With ignoreeof unset, the above causes profterm to crash. ^T is set in keybindings to create a new tab. spacecoaster:~> gdb gnome-terminal GNU gdb 5.1.1 Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-linux"... (gdb) r Starting program: /home/ryan/bin/gnome-terminal [New Thread 1024 (LWP 3538)] gnome-terminal gnome-terminal --window-with-profile-internal-id=Default --hide-menubar gnome-terminal --window-with-profile-internal-id=Default --hide-menubar --tab-with-profile-internal-id=Default Program received signal SIGSEGV, Segmentation fault.
+ Trace 18958
Thread 1024 (LWP 3538)
I think there are several dups of this against libzvt already.
Eck; lots of dups.
*** Bug 74472 has been marked as a duplicate of this bug. ***
*** Bug 75280 has been marked as a duplicate of this bug. ***
*** Bug 75338 has been marked as a duplicate of this bug. ***
*** Bug 75489 has been marked as a duplicate of this bug. ***
*** Bug 76816 has been marked as a duplicate of this bug. ***
*** Bug 76839 has been marked as a duplicate of this bug. ***
Analysis: zvt_configure_window() is getting ZvtTerm whose memory is freed already. This is causing the crash. ZvtTerm (screen->priv->term) is freed in terminal_window_remove_screen() if its ref count is 1, screen->priv->term 's ref count is reduced from 3 to 1 in gtk_container_remove() . don't know how. The callback function is called many no of times, this needs to be corrected.
Created attachment 7574 [details] [review] proposed patch
havoc, does the patch make sense to you?
While closing a tab in the transparent background mode, the already connected signal("configure_event") for the tab needs to be disconnected, otherwise the crash will occur when trying to configure the closed tab. In the above patch, when a tab is closed the corresponding signal is disconnected.
Created attachment 7701 [details] [review] fix
I'm putting in a more elaborate fix that also cleans up the code a bit.