[Xfce-bugs] [Bug 13271] New: Unable to Add/Edit Application Autostart Entries (git)

bugzilla-daemon at xfce.org bugzilla-daemon at xfce.org
Wed Jan 4 12:30:19 CET 2017


https://bugzilla.xfce.org/show_bug.cgi?id=13271

            Bug ID: 13271
           Summary: Unable to Add/Edit Application Autostart Entries (git)
    Classification: Xfce
           Product: Xfce4-session
           Version: Unspecified
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Medium
         Component: General
          Assignee: xfce-bugs at xfce.org
          Reporter: tony.paulic at gmail.com
        QA Contact: bjt23 at cornell.edu
                CC: benny at xfce.org, nick at xfce.org
  Target Milestone: Xfce 4.12

Created attachment 6946
  --> https://bugzilla.xfce.org/attachment.cgi?id=6946&action=edit
Fix callback signals

With xfce4-session built from git (after the gtk3 migration work), trying to
add or edit an application autostart entry results in a segmentation fault
after a 
"(xfce4-session-settings:9094): Gtk-CRITICAL **: gtk_entry_get_text: assertion
'GTK_IS_ENTRY (entry)' failed" message.

It appears that when the "notify::text" signal callbacks for the
"command_entry" and "name_entry" GtkEntry objects are created, they are called
immediately, before the second GtkEntry object is created resulting in a
failure in the xfae_dialog_update() function to properly process the objects.
Here is the output of a gdb session:

---------------------------------
(gdb) file /usr/bin/xfce4-session-settings 
Reading symbols from /usr/bin/xfce4-session-settings...done.
(gdb) run
Starting program: /usr/bin/xfce4-session-settings 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffeacfd700 (LWP 5230)]
[New Thread 0x7fffea4fc700 (LWP 5231)]
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.

(xfce4-session-settings:5226): GLib-GObject-CRITICAL **: g_object_new_valist:
object class 'GtkGrid' has no property named 'width'

(xfce4-session-settings:5226): Gtk-CRITICAL **: gtk_entry_get_text: assertion
'GTK_IS_ENTRY (entry)' failed

Thread 1 "xfce4-session-s" received signal SIGSEGV, Segmentation fault.
xfae_dialog_update (dialog=0x69a760) at xfae-dialog.c:164
warning: Source file is more recent than executable.
164                                          GTK_RESPONSE_OK,
(gdb) p command
$1 = (const gchar *) 0x0
(gdb) p name
$2 = (const gchar *) 0x7ffff74f6d4e ""
(gdb) p *dialog->command_entry
Cannot access memory at address 0x0
(gdb) p *dialog->name_entry
$3 = {parent_instance = {g_type_instance = {g_class = 0xca84b0}, ref_count = 5, 
    qdata = 0xcb39d0}, priv = 0xcb63b0}
(gdb) 
---------------------------------

Note, that the command_entry object does not exist at the time the callback
function is called. Moving the signal callback function calls after the second
GtkEntry object is created fixes this issue. Attached is a patch that does
this.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Xfce-bugs mailing list