Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002467graphvizGraph Librariespublic2014-07-05 15:552014-08-04 15:54
Reporterstvdedal 
Assigned Toerg 
PrioritylowSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Summary0002467: Segmentation fault when gvLayout() called after gvFreeLayout()
Descriptionverrsion: graphviz-2.30.1

Segmentation fault when gvLayout() called after gvFreeLayout()
See minimal example in "step to reproduce".

I need to relayout created graph again, so I do:

1) greate graph
2) gvLayout()
3) graph modifications: add/remove nodes or edges
4) gvFreeLayout()
5) gvLayout() <---- SIGSEG

Steps To Reproduce1) minimal example:

================= gvLayout_SIGSEG.c ======================
#include <graphviz/cgraph.h>
#include <graphviz/gvc.h>

int main(int argc, char** argv)
{
    GVC_t* gvc = gvContext();

    Agraph_t* g1 = agopen("g1", Agundirected, NULL);
    agnode(g1, "n1", 1);
    agnode(g1, "n2", 1);

    gvFreeLayout(gvc, g1);
    gvLayout(gvc, g1, "dot");

    return 0;
}


==========================================================

2) compiling:

gcc -Wall gvLayout_SIGSEG.c -lgvc -lcgraph -lcdt -I/usr/include/graphviz

3) run

$ ./a.out
Segmentation fault

4) call trace

$ gdb -q ./a.out
Reading symbols from /home/dedal/programming/etoile/src/graphview/test/a.out...done.
(gdb) r
Starting program: /home/dedal/programming/etoile/src/graphview/test/a.out
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
Traceback (most recent call last):
  File "/usr/share/gdb/auto-load/usr/lib64/libgobject-2.0.so.0.3200.4-gdb.py", line 9, in <module>
    from gobject import register
  File "/usr/share/glib-2.0/gdb/gobject.py", line 3, in <module>
    import gdb.backtrace
ImportError: No module named backtrace
Warning: couldn't activate thread debugging using libthread_db: Cannot find new threads: generic error
warning: File "/lib64/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7932cf4 in agdictsym () from /usr/lib64/libcgraph.so.6
(gdb) bt
#0 0x00007ffff7932cf4 in agdictsym () from /usr/lib64/libcgraph.so.6
0000001 0x00007ffff7933526 in agget () from /usr/lib64/libcgraph.so.6
0000002 0x00007ffff7b6521d in gvLayoutJobs () from /usr/lib64/libgvc.so.6
0000003 0x00007ffff7b6adb2 in gvLayout () from /usr/lib64/libgvc.so.6
0000004 0x0000000000400918 in main ()
(gdb)
TagsNo tags attached.
AUXILLARY-FILES
DATE-FIXED
FIX-COMMENT
FORMER-ID
INPUT-FILE
OUTPUT-FILE
STATUS-COMMENT
VERSION2.30.1
Attached Filesc file icon gvLayout_SIGSEG.c (Attachment missing)

- Relationships

-  Notes
User avatar (0000786)
erg (administrator)
2014-08-04 15:54

I believe this was fixed in 2.32.

- Issue History
Date Modified Username Field Change
2014-07-05 15:55 stvdedal New Issue
2014-07-05 15:55 stvdedal File Added: gvLayout_SIGSEG.c
2014-08-04 15:54 erg Note Added: 0000786
2014-08-04 15:54 erg Assigned To => erg
2014-08-04 15:54 erg Status new => resolved
2014-08-04 15:54 erg Resolution open => fixed
2014-08-04 15:54 erg Steps to Reproduce Updated View Revisions


MantisBT 1.2.5[^]
Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker