After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 352873 - gnome-terminal abuses the selection-changed filechooser signal
gnome-terminal abuses the selection-changed filechooser signal
Status: RESOLVED FIXED
Product: gnome-terminal
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: gnome-2-22
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
Depends on: 353196
Blocks: 324470
 
 
Reported: 2006-08-25 17:33 UTC by Mauro Leibelt
Modified: 2008-05-29 20:08 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
Assuming my patch on bug 353196 gets accepted, this fixes this g-t bug (1.18 KB, patch)
2006-08-28 09:15 UTC, Mariano Suárez-Alvarez
reviewed Details | Review

Description Mauro Leibelt 2006-08-25 17:33:57 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 ()

Thread 1 (Thread -1226720928 (LWP 8783))

  • #0 __kernel_vsyscall
  • #1 __waitpid_nocancel
    from /lib/libpthread.so.0
  • #2 libgnomeui_segv_handle
    at gnome-ui-init.c line 867
  • #3 <signal handler called>
  • #4 __kernel_vsyscall
  • #5 *__GI_raise
    at ../nptl/sysdeps/unix/sysv/linux/raise.c line 64
  • #6 *__GI_abort
    at ../sysdeps/generic/abort.c line 88
  • #7 IA__g_logv
    at gmessages.c line 497
  • #8 IA__g_log
    at gmessages.c line 517
  • #9 IA__g_return_if_fail_warning
    at gmessages.c line 532
  • #10 gconf_client_set_string
    at gconf-client.c line 1732
  • #11 terminal_profile_set_background_image_file
    at terminal-profile.c line 1259
  • #12 background_image_changed
    at profile-editor.c line 663
  • #13 IA__g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 77
  • #14 IA__g_closure_invoke
    at gclosure.c line 490
  • #15 signal_emit_unlocked_R
    at gsignal.c line 2438
  • #16 IA__g_signal_emit_valist
    at gsignal.c line 2197
  • #17 IA__g_signal_emit_by_name
    at gsignal.c line 2265
  • #18 dialog_selection_changed_cb
    at gtkfilechooserbutton.c line 2411
  • #19 IA__g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 77
  • #20 IA__g_closure_invoke
    at gclosure.c line 490
  • #21 signal_emit_unlocked_R
    at gsignal.c line 2438
  • #22 IA__g_signal_emit_valist
    at gsignal.c line 2197
  • #23 IA__g_signal_emit_by_name
    at gsignal.c line 2265
  • #24 delegate_selection_changed
    at gtkfilechooserutils.c line 330
  • #25 IA__g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 77
  • #26 IA__g_closure_invoke
    at gclosure.c line 490
  • #27 signal_emit_unlocked_R
    at gsignal.c line 2438
  • #28 IA__g_signal_emit_valist
    at gsignal.c line 2197
  • #29 IA__g_signal_emit_by_name
    at gsignal.c line 2265
  • #30 delegate_selection_changed
    at gtkfilechooserutils.c line 330
  • #31 IA__g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 77
  • #32 IA__g_closure_invoke
    at gclosure.c line 490
  • #33 signal_emit_unlocked_R
    at gsignal.c line 2438
  • #34 IA__g_signal_emit_valist
    at gsignal.c line 2197
  • #35 IA__g_signal_emit_by_name
    at gsignal.c line 2265
  • #36 update_current_folder_get_info_cb
    at gtkfilechooserdefault.c line 6213
  • #37 get_file_info_callback
    at gtkfilesystemgnomevfs.c line 1344
  • #38 dispatch_job_callback
    at gnome-vfs-job.c line 229
  • #39 g_idle_dispatch
    at gmain.c line 3924
  • #40 IA__g_main_context_dispatch
    at gmain.c line 2043
  • #41 g_main_context_iterate
    at gmain.c line 2675
  • #42 IA__g_main_loop_run
    at gmain.c line 2879
  • #43 IA__gtk_main
    at gtkmain.c line 1000
  • #44 main
    at terminal.c line 1773
  • #0 __kernel_vsyscall

Comment 1 Mariano Suárez-Alvarez 2006-08-28 09:14:14 UTC
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);
   }
Comment 2 Mariano Suárez-Alvarez 2006-08-28 09:15:21 UTC
Created attachment 71755 [details] [review]
Assuming my patch on bug 353196 gets accepted, this fixes this g-t bug
Comment 3 Behdad Esfahbod 2006-08-28 20:19:17 UTC
I want to get the first part committed as that fixes crashes.  Asking for permissions from release-team.
Comment 4 John (J5) Palmieri 2006-08-28 20:24:35 UTC
One of two from the release team
Comment 5 Federico Mena Quintero 2006-08-28 20:56:06 UTC
Uh, who defines the "file-set" signal from the patch in comment #2?
Comment 6 Behdad Esfahbod 2006-08-28 21:36:45 UTC
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.

Comment 7 Federico Mena Quintero 2006-08-29 00:24:11 UTC
Cool!  Thanks, Behdad.
Comment 8 Mariano Suárez-Alvarez 2007-01-21 00:12:55 UTC
"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.
Comment 9 Christian Persch 2008-05-29 20:08:13 UTC
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.