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);


** Bug watch added: SourceForge.net Tracker #3466416
   http://sourceforge.net/support/tracker.php?aid=3466416

** Patch added: "libfm.patch"
   
https://bugs.launchpad.net/ubuntu/+source/pcmanfm/+bug/848896/+attachment/2693974/+files/libfm.patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/848896

Title:
  pcmanfm crashed with SIGSEGV in g_object_unref()

To manage notifications about this bug go to:
https://bugs.launchpad.net/pcmanfm/+bug/848896/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to