Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001532graphvizBuild/Installpublic2009-02-12 11:102011-04-28 04:03
ReporterGabriel Petrovay 
Assigned ToArif Bilgin 
PrioritynormalSeveritycriticalReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSx86-*-Windows VistaOS Version
Summary0001532: Vista+VS2008 - crash with graphviz-bin-2.21.20090211.0545
Description



The following code crashes on Windows Vista (up to date) + Visual Studio 2008
<CD>
//-------------------------------
#include <stdio.h>
#include <iostream>
#include "graphviz/types.h"
#include "graphviz/graph.h"



int main(int argc, char* a[]) {



  FILE *lFile = fopen("D:\\graph.txt", "r");



  if(!lFile)
    std::cerr << "Error opening the file!" << std::endl;



  Agraph_t *lGraph = agread(lFile);



  std::cout << "Success" << std::endl;
}
//-------------------------------
</CD>



Any DOT input crashes.
Steps To Reproduce

digraph graphname
{
    a -> b -> c;
    b -> d;
}
Additional Information

[arif]
You need to call aginit() before any graph library routines are called.
So your code should look like:
<CD>
#include <stdio.h>
#include <iostream>
#include "graphviz/types.h"
#include "graphviz/graph.h"

int main(int argc, char* a[]) {

  FILE *lFile = fopen("D:\\graph.txt", "r");

  if(!lFile)
    std::cerr << "Error opening the file!" << std::endl;
  else
  {
      aginit();
      Agraph_t *lGraph = agread(lFile);
      if(lGraph)
        std::cout << "Success" << std::endl;
  }
}
</CD>

TagsNo tags attached.
AUXILLARY-FILES
DATE-FIXED
FIX-COMMENT
FORMER-ID1573
INPUT-FILE
OUTPUT-FILE
STATUS-COMMENTFixed
VERSION     2.21.20090211.0545
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 => Arif Bilgin


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