Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001955graphvizGraph Librariespublic2010-09-15 06:482011-04-28 04:03
ReporterPiotr N 
Assigned Togviz 
PrioritynormalSeveritycriticalReproducibilityalways
StatusacknowledgedResolutionopen 
PlatformOSx86-Windows-xp sp3OS Version
Summary0001955: agread crash
Description



Hi, I'm trying to use graphviz as a library in na qt/c++ app,
program crashes everytime I call agread function with a parameter
- file pointer to file containing definition of a graph in DOT langauge



I/ve also tried in plain C - and the error is still there



Here's my code:
<CD>
#include <stdio.h>
#include <stdlib.h>
#include <gvc.h>



int main(int argc, char** argv) {
    FILE *fp;
    GVC_t * gvc;
    Agraph_t * g;
    char line[80];



    gvc = gvContext();
    printf("1\n");
    fp = fopen("tmpgraph.gv", "r"); //w+
    printf("File opened\ncontent:\n");
    while(fgets(line, 80, fp) != NULL) {
        printf(line);
    }



    printf("\n 2\n");
    g = agread(fp);
    printf("3");
    return (EXIT_SUCCESS);
}
</CD>



3 is never printed.
Steps To Reproduce

digraph G {
START -> mag139[label="0000000767\nPW/41/10 Lp. 1"];
mag139 -> mag12[label="0000000767\nWZ/8/10 Lp. 1"];
mag139 [shape=circle,label="Mag 1"];
mag12 [shape=triangle,peripheries=2,label="Mag 2"];
}
Additional Information

[arif]
I assume you linked your program against the libraries that we provide in graphviz package.
Can you tell me if you use the debug or release libraries?
TagsNo tags attached.
AUXILLARY-FILES
DATE-FIXED
FIX-COMMENT
FORMER-ID2035
INPUT-FILE
OUTPUT-FILE
STATUS-COMMENT*
VERSION     2.26.3
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 => user1


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