Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002394graphvizGraph Librariespublic2013-11-27 13:502013-12-06 18:41
ReporterMike M 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
PlatformWindows 64bitOSWindowsOS Version7
Summary0002394: Different behaviour between static and dynamic linked libraries
DescriptionI use Graphviz to layout graphs in my application. When I use statically build libraries everthing is fine. Using the DLLs from the same built process and link against these, nodes are not placed correctly, when an edge label is outside the bounding rect spanned by all nodes. I can reproduce this with 2.34 and 2.35 from 25.11.2013.

I use Graphviz only internally, and display from the given coordinates, attached is a screenshot of the problem. Once "foo" is moved to the left and "bla bla" is right of "foo", everything is fine. It works when using the static libraries. Internally I use dot for layout and relayout the edges using neato.
Steps To ReproduceLink against static or dynamic libs. Display graph.
TagsNo tags attached.
AUXILLARY-FILES
DATE-FIXED
FIX-COMMENT
FORMER-ID
INPUT-FILE
OUTPUT-FILE
STATUS-COMMENT
VERSION2.34
Attached Filespng file icon graphviz.png [^] (30,736 bytes) 2013-11-27 13:50


7z file icon graphviz.7z [^] (1,228,138 bytes) 2013-12-05 11:27
txt file icon static.txt [^] (5,368 bytes) 2013-12-05 16:00 [Show Content]

- Relationships

-  Notes
User avatar (0000605)
ellson (administrator)
2013-11-27 13:58

There are multiple plugins that provide "png" output rendering, I'm wondering if the same plugin is being used in both cases? Could you run both cases with "-v"
User avatar (0000606)
Mike M (reporter)
2013-11-27 14:09
edited on: 2013-11-27 14:33

There is no output plugin used at all. I read the data directly from the agraph structure. I produce the output myself. Also I'm not able to build dot.exe, just the libs currently.

User avatar (0000622)
erg (administrator)
2013-12-05 09:04

I guess I'm missing something, but what is wrong with image in graphviz.png? How are the nodes not placed correctly? Thanks.
User avatar (0000623)
Mike M (reporter)
2013-12-05 09:09

E.g. the arrows to "baz" are off by a small amount, that is reproducible. Also for "bow" the arrow returning to the node is partially hidden, so one cannot see the arrow head.
User avatar (0000624)
erg (administrator)
2013-12-05 09:35

Okay, it would be helpful to have more information. Can you post your code to see if we can replicate this? Alternatively, can you call gvRender(gcc, g,"xdot",stdout) in the two cases to see if differences appear in that data? Thanks.
User avatar (0000626)
Mike M (reporter)
2013-12-05 11:27
edited on: 2013-12-05 13:54

Well, I tried but I cannot.

I can give you the xdot output in the statically linked case, but since it is working there, there is no point.

In the dynamically linked case, I linked additionally against xdot-4.dll but as soon as I want to render the xdot the program hangs. When I start my program libxdot is not loaded from the system however. I don't know if I need to have something in the code to force libxdot at runtime. The layout in my application works, but shows the same defects as described above.

Seems I have to stick with static linking.

I'll add my compiled libs to this thread, maybe that helps. They were compiled with mingw-builds using the dlls from GTK 64 and the additional dlls from mingw-builds ported64

User avatar (0000627)
erg (administrator)
2013-12-05 11:34

You don't need libxdot to render in xdot. The xdot renderer is part of gvplugin_core.dll.

Also, to follow up on John's request, you should be able to set Verbose = 1 in your code and see what trace s you get in the two instances.
User avatar (0000628)
Mike M (reporter)
2013-12-05 15:19

agsafeset(graph, "verbose", "1", "") doesn't do anything. I also tried "Verbose". How should I set to verbose?
User avatar (0000629)
erg (administrator)
2013-12-05 15:41

Sorry. I should have been clearer. You are using Graphviz as a library so you must be using some C or C++ code. In your main() function, add the code:

extern int Verbose;
Verbose = 1;
User avatar (0000630)
Mike M (reporter)
2013-12-05 15:58

I did that, and it gives some output with the working static version, but for the dynamic version it doesn't produce any output on terminal.
User avatar (0000632)
erg (administrator)
2013-12-06 12:47

Can you supply a simple version of your C program, plus the commands you use to build it? What version of ming are you using?

When I run ming's nm on your libraries, it reports that doesn't recognize the type of the .o files. So I can't link a test file with your libraries.
User avatar (0000633)
Mike M (reporter)
2013-12-06 18:41

I absolutely use no magic; may it be that you checked with a 32bit mingw? I use the 64bit compiler gcc 4.8.1 from mingw-builds. I build with makefiles (using qmake) or with eclipse, but that should make no difference they just link in the regular way. So, in qmake I would use LIBS += $${GRAPHVIZ_PATH}/lib/libcgraph.a
and so on for static linking and LIBS += -lcgraph and so on for dynamic linking.

- Issue History
Date Modified Username Field Change
2013-11-27 13:50 Mike M New Issue
2013-11-27 13:50 Mike M File Added: graphviz.png
2013-11-27 13:58 ellson Note Added: 0000605
2013-11-27 14:09 Mike M Note Added: 0000606
2013-11-27 14:33 Mike M Note Edited: 0000606 View Revisions
2013-12-05 09:04 erg Note Added: 0000622
2013-12-05 09:09 Mike M Note Added: 0000623
2013-12-05 09:35 erg Note Added: 0000624
2013-12-05 11:27 Mike M Note Added: 0000626
2013-12-05 11:27 Mike M File Added: graphviz.7z
2013-12-05 11:29 Mike M Note Edited: 0000626 View Revisions
2013-12-05 11:34 erg Note Added: 0000627
2013-12-05 13:54 Mike M Note Edited: 0000626 View Revisions
2013-12-05 15:19 Mike M Note Added: 0000628
2013-12-05 15:41 erg Note Added: 0000629
2013-12-05 15:58 Mike M Note Added: 0000630
2013-12-05 16:00 Mike M File Added: static.txt
2013-12-06 12:47 erg Note Added: 0000632
2013-12-06 18:41 Mike M Note Added: 0000633


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