Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-79583

The stack overflows when the existing path is being removed from the segment with -= operation

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 5.10
    • GUI: Painting
    • None
    • Windows

    Description

      When rendering semi transparent figures, we remove overdrawn lines in code similar to the example attached. The code stack overflows with the following call stack:
      .....
        Qt5Guid.dll!QKdPointTree::build(int begin, int end, int depth) Line 691 C++
        Qt5Guid.dll!QKdPointTree::build(int begin, int end, int depth) Line 691 C++
        Qt5Guid.dll!QKdPointTree::build(int begin, int end, int depth) Line 691 C++
        Qt5Guid.dll!QKdPointTree::build(int begin, int end, int depth) Line 691 C++
        Qt5Guid.dll!QKdPointTree::QKdPointTree(const QPathSegments & segments) Line 623 C++
        Qt5Guid.dll!QPathSegments::mergePoints() Line 763 C++
        Qt5Guid.dll!QWingedEdge::intersectAndAdd() Line 798 C++
        Qt5Guid.dll!QWingedEdge::QWingedEdge(const QPainterPath & subject, const QPainterPath & clip) Line 868 C++
        Qt5Guid.dll!QPathClipper::clip(QPathClipper::Operation operation) Line 1613 C++
        Qt5Guid.dll!QPainterPath::subtracted(const QPainterPath & p) Line 3344 C++
        Qt5Guid.dll!QPainterPath::operator-(const QPainterPath & other) Line 2358 C++
        Qt5Guid.dll!QPainterPath::operator-=(const QPainterPath & other) Line 2408 C++
        tabvizrender.dll!rendering::QtLineMarkElement::DrawLineEdge(double x1, double y1, double width1, trt::core::TrtColor color1, double x2, double y2, double width2, trt::core::TrtColor color2, double strokewidth, QtDrawContext & painterContext, QPainterPath & linePath, bool flattenLayers, int left, int current, int right, bool isStepLineJoin) Line 14644 C++
       

      Source in DrawLineEdge:

      QPainterPath lineSegment;
      lineSegment.addPolygon(QPolygonF(points));
      int existingCount = existingPath.elementCount();
      lineSegment -= existingPath;

       

      To repo with the attached files:

      QDataStream existingPathStream;
       QDataStream lineSegmentStream;
      // Open the attached files into existingPathStream and lineSegmentStream
      QPainterPath lineSegment;
      QPainterPath existingPath;
      existingPathStream >> existingPath;
      lineSegmentStream >> lineSegment;
      lineSegment -= existingPath;

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vgt Eirik Aavitsland
            hkthom Howard
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes