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

ASSERT when using QPolygonF::united() on an polygon with infinite bounds

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 4.7.3
    • GUI: Painting
    • None

    Description

      Following example let QtGui assert with 'ASSERT: "finder.result() != -1" in file d:\dev\qt\qt-4.7\src\gui\painting\qpathclipper.cpp, line 782':

      #include <QPolygon>
      #include <limits>
      
      int main(int argc, char *argv[])
      {
          const float inf = std::numeric_limits<float>::infinity();
      
          QPolygonF polygon(QRectF(0, 0, 100, 100));
          QPolygonF polygon2(QRectF(0, 0, inf, 50));
      
          QPolygonF result = polygon.united(polygon2);
          Q_UNUSED(result)
      }
      

      Stack trace:

      0	qt_message_output	qglobal.cpp	2270	0x6503427d	
      1	qt_message	qglobal.cpp	2328	0x650343f9	
      2	qFatal	qglobal.cpp	2511	0x65034739	
      3	qt_assert	qglobal.cpp	2027	0x65033db9	
      4	QPathSegments::mergePoints	qpathclipper.cpp	782	0x644a8ea9	
      5	QWingedEdge::intersectAndAdd	qpathclipper.cpp	809	0x644a9073	
      6	QWingedEdge::QWingedEdge	qpathclipper.cpp	879	0x644a9473	
      7	QPathClipper::clip	qpathclipper.cpp	1652	0x644ac420	
      8	QPainterPath::united	qpainterpath.cpp	3181	0x644a0056	
      9	QPolygonF::united	qpolygon.cpp	949	0x644c599f	
      10	main	main.cpp	46	0xea113d	
      11	WinMain	qtmain_win.cpp	131	0xea246a	
      12	__tmainCRTStartup	crtexe.c	547	0xea19a0	
      13	WinMainCRTStartup	crtexe.c	371	0xea172f	
      14	BaseThreadInitThunk	kernel32		0x74a833ca	
      15	__RtlUserThreadStart	ntdll		0x76ec9ed2	
      16	_RtlUserThreadStart	ntdll		0x76ec9ea5	
      

      Attachments

        Issue Links

          Activity

            People

              rodal Samuel Rødal
              kkohne Kai Köhne
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: