Difference between revisions of "Issue:AiSee crash due to several near edges"
From FollowTheScore
(fixed) |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
|Type = Bug | |Type = Bug | ||
|Extension = aiSee | |Extension = aiSee | ||
− | |Version = 2.2 | + | |Version = 2.2.12 |
|Description = there are several constellations of nearedges and bentnearedges which lead to a program crash | |Description = there are several constellations of nearedges and bentnearedges which lead to a program crash | ||
− | |Status = | + | |Status = fixed in aiSee 2.2.27 |
}} | }} | ||
Line 52: | Line 52: | ||
== Reply == | == Reply == | ||
− | Fixed in aiSee 3.0. We'll see if we can fix it for aiSee 2.2.x, too. | + | Fixed in aiSee 3.0. We'll see if we can fix it for aiSee 2.2.x, too. --[[User:Schwallex|Schwallex]] 15:46, 14 November 2007 (CET) |
+ | |||
+ | :Fixed. An updated version of aiSee will be made available shortly. | ||
+ | :--[[User:Schwallex|Schwallex]] 14:18, 21 November 2007 (CET) |
Latest revision as of 17:19, 11 December 2007
Description: | there are several constellations of nearedges and bentnearedges which lead to a program crash |
Extension / Version: | aiSee / 2.2.12 |
Type / Status: | Bug / fixed in aiSee 2.2.27 |
Problem
The following graph definition causes a memory violation:
graph: { title: "A" rightnearedge: { source:"A" target:"B" } leftnearedge: { source:"A" target:"C" } rightbentnearedge: { source:"A" target:"D" } }
There are more constellations which have the same effect. The following piece of php code tries to identify all dangerous constellations:
foreach ($edges as $edgeId => $edge) { $n=$ln=$rn=$b=$lb=$rb=0; $edgeKind = $edge['kind']; if ($edgeKind == 'near') $n++; else if ($edgeKind == 'leftnear') $ln++; else if ($edgeKind == 'rightnear') $rn++; else if ($edgeKind == 'bentnear') $b++; else if ($edgeKind == 'leftbentnear') $lb++; else if ($edgeKind == 'rightbentnear') $rb++; foreach ($edges as $nEdgeId => $nEdge) { $from = $edge['source']; if ($nEdgeId <= $edgeId || $nEdge['source'] != $from) continue; if ($nEdge['target'] == $edge['target']) { $this->error("near edges at '$from' point to the same other node '".$edge['target'],''); } $nEdgeKind = $nEdge['kind']; if ($nEdgeKind == 'near') $n++; else if ($nEdgeKind == 'leftnear') $ln++; else if ($nEdgeKind == 'rightnear') $rn++; else if ($nEdgeKind == 'bentnear') $b++; else if ($nEdgeKind == 'leftbentnear') $lb++; else if ($nEdgeKind == 'rightbentnear') $rb++; //$this->parser->errorText .= "checking $edgeKind edge $edgeId against $nEdgeKind edge $nEdgeId at $from: $n,$ln,$rn $b,$lb,$rb:\n"; if (($rn+$ln>=2 && $rb+$lb>=1) ) $this->error("too many near (bent) edges at '$from'",''); } }
Reply
Fixed in aiSee 3.0. We'll see if we can fix it for aiSee 2.2.x, too. --Schwallex 15:46, 14 November 2007 (CET)
- Fixed. An updated version of aiSee will be made available shortly.
- --Schwallex 14:18, 21 November 2007 (CET)