FS#24402 - [gnome-panel] possible glib2 gnome-panel crash

Attached to Project: Arch Linux
Opened by david (kryzic) - Monday, 23 May 2011, 13:18 GMT
Last edited by Ionut Biru (wonder) - Saturday, 18 June 2011, 17:56 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Ionut Biru (wonder)
Jan Alexander Steffens (heftig)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:


Additional info:
* glib2 2.28.7-1
* segmention fault crash

patch to fix problem

View File glib2-fix-panel-crash.patch of Package glib2 (Project GNOME:Evolution:snapshots)


commit e738a8dd8ca3d3dd327bc5a3bbfd151858738609
Author: Colin Walters <walters@verbum.org>
Date: Thu Jan 6 11:47:58 2011 -0500

gdesktopappinfo: Don't crash if we don't have a desktop filename

If code creates a GDesktopAppInfo via g_desktop_app_info_new_from_keyfile(),
we'd try to send a NULL pointer down into GVariant.

Since in this case we don't have a filename, just send the empty
string. In the future we should either:

1) Change panel to use g_desktop_app_info_new_from_filename(), and
take the hit of parsing the file twice.
2) Add a g_key_file_get_origin_filename()
3) Add g_desktop_app_info_new_from_keyfile_and_name()

https://bugzilla.gnome.org/show_bug.cgi?id=638838

diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
index c808796..f557538 100644
--- a/gio/gdesktopappinfo.c
+++ b/gio/gdesktopappinfo.c
@@ -932,7 +932,7 @@ child_setup (gpointer user_data)

static void
notify_desktop_launch (GDBusConnection *session_bus,
- const char *desktop_file, /* filename */
+ GDesktopAppInfo *info,
long pid,
const char *display,
const char *sn_id,
@@ -942,6 +942,7 @@ notify_desktop_launch (GDBusConnection *session_bus,
GVariantBuilder uri_variant;
GVariantBuilder extras_variant;
GList *iter;
+ const char *desktop_file_id;

if (session_bus == NULL)
return;
@@ -956,12 +957,19 @@ notify_desktop_launch (GDBusConnection *session_bus,
"startup-id",
g_variant_new ("s",
sn_id));
+
+ if (info->filename)
+ desktop_file_id = info->filename;
+ else if (info->desktop_id)
+ desktop_file_id = info->desktop_id;
+ else
+ desktop_file_id = "";

msg = g_dbus_message_new_signal ("/org/gtk/gio/DesktopAppInfo",
"org.gtk.gio.DesktopAppInfo",
"Launched");
g_dbus_message_set_body (msg, g_variant_new ("(@aysxasa{sv})",
- g_variant_new_bytestring (desktop_file),
+ g_variant_new_bytestring (desktop_file_id),
display ? display : "",
(gint64)pid,
&uri_variant,
@@ -1069,7 +1077,7 @@ _g_desktop_app_info_launch_uris_internal (GAppInfo *appinfo,
pid_callback (info, pid, pid_callback_data);

notify_desktop_launch (session_bus,
- info->filename,
+ info,
pid,
data.display,
data.sn_id,
This task depends upon

Closed by  Ionut Biru (wonder)
Saturday, 18 June 2011, 17:56 GMT
Reason for closing:  Works for me
Comment by Ionut Biru (wonder) - Monday, 23 May 2011, 13:36 GMT
is this issue new or exists also with older glib?
Comment by david (kryzic) - Monday, 23 May 2011, 13:52 GMT
i see the code only of glib2 2.28.7-1 and this problem is present
Comment by Ionut Biru (wonder) - Monday, 23 May 2011, 13:55 GMT
you should report a new bug upstream. the bug report you are referring has the resolution FIXED.

you should rebuild gnome-panel and glib2 with debug symbols and provide a backtrace

https://wiki.archlinux.org/index.php/Debug_-_Getting_Traces#One_package_settings_only
Comment by Jan de Groot (JGC) - Thursday, 26 May 2011, 09:41 GMT
The patch you mentioned is already in 2.28.7. Please provide a clear bugreport, we can't fix a problem you didn't describe.

Loading...