Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001126 [tweak] Any minor always 04-28-05 03:58 04-28-05 23:16
Reporter tedka View Status public  
Assigned To
Priority normal Resolution fixed  
Status resolved  
Summary 0001126: CMatrixTransform gets divide by zero error
Description During innocent use of a CPolygonPlayer, I got a divide by zero error. Just evaluate this code to see it.

| oldBox newBox |
oldBox := 17.38304088577985@3 corner: 17.38304088577985@168. /> newBox := 3@3 corner: 31.0@168.
CMatrixTransform localRect: oldBox toGlobal: newBox.

It happened during (CPolygonPlayer onBorderChanged), and the polygon was a triangle pointing straight up. It was an arrowhead.
Additional Information
Attached Files

- Relationships

- Notes
(0001439 - 204 - 204 - 204 - 204 - 204 - 204)
andreas
04-28-05 05:11

Well, yes, trying to create a transform which scales from a zero-width rectangle up to a non-zero width rectangle will result in a division by zero. Unless I am missing something I don't see the bug here.
 
(0001445 - 223 - 235 - 235 - 235 - 235 - 235)
tedka
04-28-05 23:10

Just execute this to see the problem. This is what a pen does to get an arrowhead on the end of a trail.

(CPolygonPlayer new) vertices: {100@100. 130@100}; closed: false; borderWidth: 5; arrowStyle: #forward; arrowForms
 
(0001446 - 32 - 32 - 32 - 32 - 32 - 32)
andreas
04-28-05 23:16

Now fixed. Thanks for reporting.
 

- Issue History
Date Modified Username Field Change
04-28-05 03:58 tedka New Issue
04-28-05 05:11 andreas Note Added: 0001439
04-28-05 05:11 andreas Status new => feedback
04-28-05 23:10 tedka Note Added: 0001445
04-28-05 23:16 andreas Status feedback => resolved
04-28-05 23:16 andreas Resolution open => fixed
04-28-05 23:16 andreas Assigned To  => andreas
04-28-05 23:16 andreas Note Added: 0001446
04-28-05 23:16 andreas Assigned To andreas =>


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
45 total queries executed.
34 unique queries executed.
Powered by Mantis Bugtracker