Page MenuHomePhabricator

Crash in statistics when using malformed planar figures for masking
Closed, ResolvedPublic

Description

The statistics bundle does not verify if the planar figure chosen for masking has a non-zero area and this leads to a complete crash of the application.

How to reproduce:

  1. Load an image
  2. Open the Measurement View
  3. Draw a polygon ( i.e. a triangle ) and malform it by moving ALL polygon vertices toward a boundary of the image -> all vertices then lie on a single line
  4. Activate the statistics view and use the malformed figure as mask -> CRASH

Activating statistics view before malforming the figure, the crash occurs as soon as the last vertex of the polygon figure is placed on the boundary ( it is because the statistics is immediately updating after changes in the figure )

Event Timeline

Confirm that on windows. More specifically, the crash only occurs when aligning the figure on the upper boundary of the rendering window.

[2399ef]: Merge branch 'bug-13164-Handle-masking-with-degenerated-figures'

Merged commits:

2012-10-24 16:17:56 Jan Hering [0e7bd1]
Added check for degenerated planar figures

  • the InternalCalculateMaskFromPlanarFigure throws an exception if
  • the closed figure has only one non-zero extent, i.e. is collapsed to a
  • single line