QCAD Bugtracker

  • Status Closed
  • Percent Complete
  • Task Type Bug Report
  • Category ECMAScript
  • Assigned To
  • Operating System Windows 7
  • Severity Low
  • Priority Very Low
  • Reported Version 3.26.2
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: QCAD Bugtracker
Opened by CVH - 03.07.2021
Last edited by Andrew - 09.07.2021

FS#2256 - Getting the end direction of a zero-length polyline leads to AppCrash


With an RPolyline shape.
That is trimmed by RPolyline.trimEndPoint(cutPoint1, RVector.invalid, false);
And what is turned into a null-shape having only one single vertex.
Getting the end orientation of such a shape lead to an Application Crach.

RPolyline.getDirection1(); Doesn’t fail and returns 0.0rad.
RPolyline.getDirection2(); Fails critical.

I would have expected 0.0rad or ‘undefined’ for both.

One can circumvent that with simply testing the nature of the RPolyline before getting the end direction, and this each time required.


Closed by  Andrew
09.07.2021 19:30
Reason for closing:  Fixed


Available keyboard shortcuts


Task Details

Task Editing