GNOME Bugzilla – Bug 352873
gnome-terminal abuses the selection-changed filechooser signal
Last modified: 2008-05-29 20:08:13 UTC
Version: 2.15.4 What were you doing when the application crashed? Edit current profile after setting image background. Repro: yes Steps to repro: 1 Open gnome-terminal 2 Set the background to an image 3 Edit current profile Result: gnome-terminal crashes To fix: Using configuration editor remove the background image filename from the configuration (setting the background to solid is not enough) Distribution: Unknown Gnome Release: 2.15.92 2006-08-21 (GNOME.Org) BugBuddy Version: 2.15.92 Memory status: size: 77074432 vsize: 0 resident: 77074432 share: 0 rss: 19632128 rss_rlim: 0 CPU usage: start_time: 1156527003 rtime: 0 utime: 2425 stime: 0 cutime:483 cstime: 0 timeout: 1942 it_real_value: 0 frequency: 0 Backtrace was generated from '/usr/bin/gnome-terminal' Using host libthread_db library "/lib/libthread_db.so.1". [Thread debugging using libthread_db enabled] [New Thread -1226720928 (LWP 8783)] [New Thread -1236436048 (LWP 8787)] 0xffffe410 in __kernel_vsyscall ()
+ Trace 70997
Thread 1 (Thread -1226720928 (LWP 8783))
Wow, that's a lovely stack trace! ;-) This happens because currently g-t is listening to the selection-changed signal on the background image GtkFileChooserButton in the profile editor. As per the docs <http://developer.gnome.org/doc/API/2.0/gtk/GtkFileChooser.html#GtkFileChooser-selection-changed>, one should not listen to that. I've file bug #353196 with a patch on gtk+ to add a file-set signal. Using that, this gets fixed with the following patch. Maybe this bug should be marked as blocked by 353196, but blocking on an API change in gtk isprobably not wise ;-) Note that doing simply the folowing change (half of the patch) avoids this issue, but one should really fix the signal one is listening to... diff -U5 -r1.57 profile-editor.c --- profile-editor.c 5 Jan 2006 15:18:09 -0000 1.57 +++ profile-editor.c 28 Aug 2006 09:10:16 -0000 @@ -657,10 +657,15 @@ TerminalProfile *profile) { char *text; text = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (entry)); + + if (text == NULL) + { + return; + } terminal_profile_set_background_image_file (profile, text); g_free (text); }
Created attachment 71755 [details] [review] Assuming my patch on bug 353196 gets accepted, this fixes this g-t bug
I want to get the first part committed as that fixes crashes. Asking for permissions from release-team.
One of two from the release team
Uh, who defines the "file-set" signal from the patch in comment #2?
Ok, I got Federico's approval on IRC. First part of the patch committed. 2006-08-28 Behdad Esfahbod <behdad@gnome.org> Part of Bug 352873 – crash in Terminal: Edit current profile aft... Patch from Mariano Suárez-Alvarez * src/profile-editor.c (background_image_changed): Return if filename is NULL.
Cool! Thanks, Behdad.
"file-set" is already in gtk HEAD. As soon as we can depend on a gtk+ which has it, we should commit the second part of that patch.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.