View Issue Details

IDProjectCategoryView StatusLast Update
0004625mantisbtrelationshipspublic2005-04-18 10:43
Reportermasc Assigned Tomasc  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformX86OSWindowsOS VersionWin2K
Product Versiongit trunk 
Fixed in Version0.19.1 
Summary0004625: Relationship graph: crash when the bug has no relationship
Description

When the bug has no relationship, the php crashes trying to open the relation graph, while it's all OK opening the dependancy graph.
I'm using WinGraphViz lastest version.

TagsNo tags attached.
Attached Files
neato-test.vbs (297 bytes)
workaround for 4625.diff (669 bytes)   
--- core/graphviz_api.php	2004-10-08 23:08:35.698529016 -0300
+++ core/graphviz_api.php	2004-10-08 23:13:24.448632328 -0300
@@ -270,6 +270,13 @@
 				# If we are under Windows, we use the COM interface provided
 				# by WinGraphviz. Thanks Paul!
 
+				# Issue #4625: Work around WinGraphviz bug that fails with
+				# graphs with zero or one node. It is probably too much to
+				# generate a graphic output just to explain it to the user,
+				# so we just return a null content.
+				if ( count( $this->nodes ) <= 1 )
+					return;
+
 				$t_graphviz = new COM( $this->graphviz_com_module );
 
 				# Check if we managed to instantiate the COM object.
workaround for 4625.diff (669 bytes)   

Activities

masc

masc

2004-09-28 08:06

reporter   ~0007789

Inviato memorandum a jferraz

Juliano, this for you! Still problem with WinGraphViz.

Marcello

jferraz

jferraz

2004-09-28 08:57

reporter   ~0007793

Hi masc,

Same thing... Can't reproduce this problem here (on Linux). I can't reboot into Windows right now, but I'll do it as soon as possible to check this. It is possible that this is related to 0004614.

masc

masc

2004-09-28 09:20

reporter   ~0007795

In this case I got a fatal error box directly from PHP (it seems like a division by 0...).
I guess it's related to the WinGraphViz more than with the 0004614.
If you can try to reproduce both the bugs under Windows, I think it's the best.

grangeway

grangeway

2004-10-02 10:14

reporter   ~0007875

It's the DLL itself imo..

masc

masc

2004-10-02 11:40

reporter   ~0007876

Juliano to avoid the crash you can disable (skip) the image generation in case of no relationships. In this way at least this bug can be fixed.
What do you think?

jferraz

jferraz

2004-10-03 07:47

reporter   ~0007881

Hi,
I'm currently away from my computer, so I can't do much. I'll check this and 0004614 as soon as I get back.

grangeway

grangeway

2004-10-03 17:30

reporter   ~0007882

$t_dot_source = 'digraph 0000055 { rankdir="LR"; node [ fontname="Arial", fontsize=8, shape="record", style="filled", height="0.2", width="0.4" ]; edge [ style="solid", color="#C00000", dir="back" ]; "0000055" [ label="0000055", color="#0000FF", style="bold, filled", fillcolor="#ffa0a0", URL="foo", tooltip="[new] 5" ]; }; "';

^ sample source that crashes

vboctor

vboctor

2004-10-05 18:14

manager   ~0007926

Form the notes, it seems that this issue is confirmed. So I marked it accordingly.

Masc, do you want to commit your workaround, just in case we release 0.19.1 before jferraz gets a change to look at this issue.

jferraz

jferraz

2004-10-08 13:51

reporter   ~0007961

Hi,

It looks like it is really a bug in WinGraphviz. Check the attached script, if i'm correct, it should cause a gpf. It happens just for WinGraphviz.neato, and only if graph has either no or a single node. It is not reproducible under either neato.exe or the linux version.

I'll contact the author of WinGraphviz, and ask him to check this as soon as possible. I'll upload a workaround patch today later. If it happens that the WinGraphviz author answers in time and releases a fixed version of it, we may leave it as is and just ask Mantis users to use the latest version.

jferraz

jferraz

2004-10-12 12:23

reporter   ~0007995

Four days passed and I received no answer from the author. I'm afraid that he is not maintaining WinGraphviz anymore.

grangeway

grangeway

2004-10-12 14:13

reporter   ~0007996

think I sent an email a 'few' days before you did on the same issue. Either way, from the lack of response, and also lack of response to a previous mail (about source code / performance of wingraphviz) sent to the graphviz list by someone else, I think we can assume we aren't going to get a fast response.

My understanding of the graphing is quite limited - this is an issue just with 'neato' graphs? - can we not just use 'dot' or whatever instead?

Other option (in the future ) if we don't get a response, might be to look at the c# lib ( http://www.codeproject.com/cs/miscctrl/quickgraph.asp ) that someone has done, and look at using the php .net support if it doesn't expore a COM object.

Either way, maybe we should add a $g_graphviz_exe to allow windows users to choose between 'some object interface' vs 'modifying their php executes files / granting access to cmd.exe' options

masc

masc

2004-10-13 01:36

reporter   ~0008006

Thanks Juliano, I will apply your workaround to CVS. At least, it avoids the crash.

masc

masc

2004-10-14 12:31

reporter   ~0008040

Commit workarount to CVS.
We keep the bug open hoping in a better resolution for the future.

Related Changesets

MantisBT: master 7a7d53a6

2004-10-14 13:24

masc


Details Diff
Workaround to partially fix bug 0004625

git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@3051 <a class="text" href="/?p=mantisbt.git;a=object;h=f5dc347c">f5dc347c</a>-c33d-0410-90a0-b07cc1902cb9
Affected Issues
0004625
mod - core/graphviz_api.php Diff File