Number: 1404
Title: Cannot Render Multiple Graphs in Threads
Submitter: AJ Palkovic
Date: Wed Jul 30 16:24:14 2008
Subsys: Output generation
Version: 2.20.2
System: x86-Linux-Fedora Core 9
Severity: major
Problem:
I am trying to render multiple graphviz graphs with the included gtk plugin in threads. The first graph will always show up. However, when I try to launch the second graph, it will not open until the first graph is called. I have attached a very small sample python script that demonstrates the problem. Here I was just using one of the sample dot files included with graphviz, and that does not work either. Even an empty dot file as the same problem.

Also, when I called gv.render, with or without a thread, I have to press the close button twice. After the first time, the window appears again and then clicking the close button a second time closes it.


import gv, thread
graph = gv.read("graphviz-2.20.2/graphs/directed/world.dot")
gv.layout(graph, "dot")
thread.start_new(gv.render, (graph, "gtk"))		#this graph works fine (although for some reason you have to press the close button twice)
thread.start_new(gv.render, (graph, "gtk"))		#this graph will not show up until the first one closes

Input:
Any dot file, even an empty one should suffice.
Owner: *
Status: *