[Github-comments] [geany/geany-plugins] Project Organizer close project segfault (#579)

msaf1980 notifications at xxxxx
Mon Jun 5 08:57:47 UTC 2017


Segmentation fault when close project with enabled Project Orginizer plugin 

Program received signal SIGSEGV, Segmentation fault.
0x00007fffc78d2b25 in expand_path (utf8_expanded_path=0x7ec5c0 "", select=select at entry=0) at prjorg-sidebar.c:1168
1168		foreach_slist (elem, prj_org->roots)

(gdb) backtrace
#0  0x00007fffc78d2b25 in expand_path (utf8_expanded_path=0x7ec5c0 "", select=select at entry=0) at prjorg-sidebar.c:1168
#1  0x00007fffc78d2cf2 in expand_on_idle (ptr=0x1570780) at prjorg-sidebar.c:1224
#2  0x00007ffff5061d7a in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#3  0x00007ffff50620b8 in g_main_context_iterate.isra.24 () at /lib64/libglib-2.0.so.0
#4  0x00007ffff506238a in g_main_loop_run () at /lib64/libglib-2.0.so.0
#5  0x00007ffff73ef867 in gtk_main () at /lib64/libgtk-x11-2.0.so.0
#6  0x00007ffff79a4991 in main_lib (argc=2, argv=0x7fffffffde78) at libmain.c:1233
#7  0x00007ffff4a5cb35 in __libc_start_main () at /lib64/libc.so.6
#8  0x000000000040070e in _start ()

(gdb) info frame
Stack level 0, frame at 0x7fffffffdb60:
 rip = 0x7fffc78d2b25 in expand_path (prjorg-sidebar.c:1168); saved rip 0x7fffc78d2cf2
 called by frame at 0x7fffffffdb80
 source language c.
 Arglist at 0x7fffffffdac8, args: utf8_expanded_path=0x7ec5c0 "", select=select at entry=0
 Locals at 0x7fffffffdac8, Previous frame's sp is 0x7fffffffdb60
 Saved registers:
  rbx at 0x7fffffffdb28, rbp at 0x7fffffffdb30, r12 at 0x7fffffffdb38, r13 at 0x7fffffffdb40, r14 at 0x7fffffffdb48, r15 at 0x7fffffffdb50, rip at 0x7fffffffdb58

Simply workaround - add check for blank utf8_expanded_path (function expand_path in prjorg-sidebar.c)

static gboolean expand_path(gchar *utf8_expanded_path, gboolean select)
{
        GtkTreeIter root_iter, found_iter;
        gchar *utf8_path = NULL;
        gchar **path_split;
        GSList *elem;
        GtkTreeModel *model;

        /* Fix error on close project */
        if (utf8_expanded_path == NULL || *utf8_expanded_path == '\0')
            return FALSE;
        /* END - Fix error on close project */

        model = GTK_TREE_MODEL(s_file_store);

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/issues/579
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20170605/cf99e4f1/attachment.html>


More information about the Github-comments mailing list