Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000979graphvizTcl/Tk Utilitiespublic2005-09-30 17:192011-04-28 04:03
Reportermichael hohn 
Assigned Toellson 
PrioritynormalSeveritycriticalReproducibilityalways
StatusclosedResolutionfixed 
PlatformOS*-*-OS Version
Summary0000979: segmentation fault from nextedge
Description



I'm running the script below to form and print a graph. When using
<CD>
        ed = gv.firstedge(G)
        ed = gv.nextedge(G, ed)
</CD>
it immediately gives
<CD>
    Process Python segmentation fault...
</CD>



Using gdb shows
<CD>
  [Switching to Thread 16384 (LWP 15444)]
  0x403d17d2 in nextout(Agraph_t*, Agedge_t*) (g=0x81a6480, e=0x0) at gv.cpp:606
</CD>
which is marked below:
<CD>
        Agedge_t *nextout(Agraph_t *g, Agedge_t *e)
        {
            Agnode_t *n;



            if (!g || !e)
                return NULL;
            e = agnxtout(g, e);
            if (e)
                return (e);






>>>>>>>>>>>>>>>> n = agnxtnode(g, e->tail);






            if (!n)
                return NULL;
            return agfstout(g, n);
        }
</CD>



The python input is
<CD>
    #
    # Raw gv wrapper demo for Python.
    #
    import gv



    modules = open("/proc/modules", 'r').readlines()



    G = gv.digraph("G")
    gv.setv(G, 'rankdir', 'LR')
    print gv.getv(G, 'rankdir')
    gv.setv(G, 'nodesep', '0.05')
    gv.setv(G, 'node', 'shape', 'box')
    gv.setv(G, 'node', 'width', '0')
    gv.setv(G, 'node', 'height', '0')
    gv.setv(G, 'node', 'margin', '.03')
    gv.setv(G, 'node', 'fontsize', '8')
    gv.setv(G, 'node', 'fontname', 'helvetica')



    gv.setv(G, 'edge', 'arrowsize', '.4')



    nodes = []
    edges = []
    for rec in modules:
        fields = rec.split()
        nd = gv.node(G, fields[0])
        for usedby in fields[3:None]:
            edges.append(gv.edge(nd, gv.node(G, usedby.strip("[]"))))
        nodes.append(nd)



    gv.layout(G, 'dot')



    print gv.getv(G, 'bb')



    #
    # Use provided traversal routines.
    #
    sg = gv.firstsubg(G)






    ed = gv.firstedge(G)
    ed = gv.nextedge(G, ed)
</CD>
TagsNo tags attached.
AUXILLARY-FILES
DATE-FIXED
FIX-COMMENT
FORMER-ID800
INPUT-FILE
OUTPUT-FILE
STATUS-COMMENTFixed (1 October 2005)
VERSION     2.6
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2011-04-28 04:03 user1 New Issue
2011-04-28 04:03 user1 Assigned To => user695


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