pcmanfm crashed with SIGSEGV in g_object_unref()

Bug #848896 reported by Tom
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
PCManFM
Unknown
Unknown
libfm (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Step to reproduce :
- Open pcmanfm
- Switch to the Directory Tree view on teh left
- Open lxapperance
- Change the icon theme (for example, Humanity) => pcmanfm crash

Original bug report :

Left computer running overnight, when I came in in the morning, the file manager was crashed.

ProblemType: Crash
DistroRelease: Ubuntu 11.10
Package: pcmanfm 0.9.9-0ubuntu1
ProcVersionSignature: Ubuntu 3.0.0-10.16-generic 3.0.4
Uname: Linux 3.0.0-10-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 1.22.1-0ubuntu2
Architecture: amd64
Config_pcmanfm_System_lxde: Error: [Errno 2] No such file or directory: '/etc/xdg/pcmanfm/lxde/pcmanfm.conf'
CrashCounter: 1
Date: Tue Sep 13 00:09:52 2011
ExecutablePath: /usr/bin/pcmanfm
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Beta amd64 (20110901)
Pref_Config_Home_lxde:

ProcCmdline: pcmanfm --desktop --profile LXDE
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SegvAnalysis:
 Segfault happened at: 0x7fe92c939ca2 <g_object_unref+18>: mov (%rdi),%rax
 PC (0x7fe92c939ca2) ok
 source "(%rdi)" (0xccdaf694fdac8f4e) not located in a known VMA region (needed readable region)!
 destination "%rax" ok
SegvReason: reading unknown VMA
Signal: 11
SourcePackage: pcmanfm
StacktraceTop:
 g_object_unref () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
 ?? () from /usr/lib/libfm-gtk.so.1
 ?? () from /usr/lib/libfm-gtk.so.1
 g_closure_invoke () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
 ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
Title: pcmanfm crashed with SIGSEGV in g_object_unref()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm admin cdrom dialout libvirtd lpadmin plugdev sambashare

Related branches

Revision history for this message
Tom (teeks99) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 g_object_unref (_object=0xccdaf694fdac8f4e) at /build/buildd/glib2.0-2.29.90/./gobject/gobject.c:2680
 item_reload_icon (model=0x8bb800, item=0x7a8ca0, tp=0x96be40) at gtk/fm-dir-tree-model.c:80
 on_theme_changed (theme=<optimized out>, model=0x8bb800) at gtk/fm-dir-tree-model.c:180
 g_closure_invoke (closure=0x8b3da0, return_value=0x0, n_param_values=1, param_values=0x7af900, invocation_hint=<optimized out>) at /build/buildd/glib2.0-2.29.90/./gobject/gclosure.c:774
 signal_emit_unlocked_R (node=<optimized out>, detail=0, instance=0x6db880, emission_return=0x0, instance_and_params=0x7af900) at /build/buildd/glib2.0-2.29.90/./gobject/gsignal.c:3272

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in pcmanfm (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace
Julien Lavergne (gilir)
visibility: private → public
Revision history for this message
Julien Lavergne (gilir) wrote :

Thank you for your bug report. Forwarded upstream.

description: updated
Changed in pcmanfm (Ubuntu):
status: New → Triaged
Revision history for this message
Axel FILMORE (axel-filmore) wrote :

I've also posted this to PCManFm mailing list :

I have a possible bug fix for this :
http://sourceforge.net/tracker/?func=detail&aid=3466416&group_id=156956&atid=801864

To reproduce the crash, open PCManFm, select the TreeView, that's important, it doesn't segfault in the default view.
Then, change the icon theme, when you set the new theme it crashes.

Here's the changes I've done :
@@ -88,7 +88,7 @@ static void item_reload_icon(FmDirTreeMo
         for(l = item->children; l; l=l->next)
         {
             child = (FmDirTreeItem*)l->data;
- item_reload_icon(model, l, tp);
+ item_reload_icon(model, child, tp);
             gtk_tree_path_next(tp);
         }
         gtk_tree_path_up(tp);
@@ -177,7 +177,7 @@ static void on_theme_changed(GtkIconThem
     GtkTreePath* tp = gtk_tree_path_new_first();
     for(l = model->roots; l; l=l->next)
     {
- item_reload_icon(model, l, tp);
+ item_reload_icon(model, l->data, tp);
         gtk_tree_path_next(tp);
     }
     gtk_tree_path_free(tp);

Item_reload_icon is a recursive function, it seems to crash in the second call line 80, in :
g_object_unref(item->icon);

There's also a compiler warning about line 180.

I'm not sure if these changes are correct, I'm not an expert but that works. :D

Can someone check this in the attached patch and merge if it's correct.

Regards.

--
Axel FILMORE

libfm.patch

diff -rup libfm/src/gtk/fm-dir-tree-model.c 01-libfm/src/gtk/fm-dir-tree-model.c
--- libfm/src/gtk/fm-dir-tree-model.c 2012-01-25 10:03:09.487929009 +0100
+++ 01-libfm/src/gtk/fm-dir-tree-model.c 2012-01-25 10:06:04.001892067 +0100
@@ -88,7 +88,7 @@ static void item_reload_icon(FmDirTreeMo
         for(l = item->children; l; l=l->next)
         {
             child = (FmDirTreeItem*)l->data;
- item_reload_icon(model, l, tp);
+ item_reload_icon(model, child, tp);
             gtk_tree_path_next(tp);
         }
         gtk_tree_path_up(tp);
@@ -177,7 +177,7 @@ static void on_theme_changed(GtkIconThem
     GtkTreePath* tp = gtk_tree_path_new_first();
     for(l = model->roots; l; l=l->next)
     {
- item_reload_icon(model, l, tp);
+ item_reload_icon(model, l->data, tp);
         gtk_tree_path_next(tp);
     }
     gtk_tree_path_free(tp);

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "libfm.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Julien Lavergne (gilir)
affects: pcmanfm (Ubuntu) → libfm (Ubuntu)
Changed in libfm (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.