Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001111graphvizOtherpublic2006-04-24 13:022011-04-28 04:03
ReporterHorst Schirmeier 
Assigned Toerg 
PlatformOS*-*-OS Version
Summary0001111: gxl2dot fails to use "name" attribute properly

When trying to convert the Dagstuhl Middle Metamodel (DMM) GXL schema
(obtainable from [^]) to
the .dot format with gxl2dot (all versions, including CVS HEAD), I
noticed that the output was totally broken:

* All nodes but two were not assigned any edges.
* The remaining two nodes had dozens of edges assigned that looped back
  to the nodes themselves.

After reading the sources and debugging for a while, I learned that this
cannot work (and IMHO cannot have worked at any point) as you are
reusing the buffer for unique_name for every name="name" attribute you
get across when walking the XML input, the name never gets copied; that
is why all node ids map to the same (the last walked over) name when
using mapLookup().

The patch below fixes this by copying the value to newly allocated
memory before adding it to the map (and free()ing this memory before
destroying the dictionary).
TagsNo tags attached.
RCS file: /home/cvsroot/graphviz2/cmd/tools/gxl2dot.c,v
retrieving revision 1.2
diff -p -u -r1.2 gxl2dot.c
--- gxl2dot.c 24 Feb 2005 00:57:33 -0000 1.2
+++ gxl2dot.c 24 Apr 2006 00:55:00 -0000
@@ -166,8 +166,17 @@ static userdata_t *genUserdata(voi
STATUS-COMMENTFixed (24 April 2006)
VERSION     2.9
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 => erg

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