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

Assert fail in qtriangulatingstroker drawing arc.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.3.2
    • GUI: Painting
    • None
    • VS2013 x64 Windows 10 *Debug* build. OpenGL desktop.

    Description

      The code below causes a 100% reproducible assert failure in the debug build. It seems to be a rounding issue during double-to-float conversion within qtriangulatingstroker.

      The assert is:
      ASSERT: "dx != 0 || dy != 0" in file [...]/src/gui/opengl/qtriangulatingstroker_p.h, line 129

      The object is a QGraphicsObject placed in a QGraphicsScene with a QGLWidget viewport. The release build appears un-affected (or the assert is benign).

      void myGraphicsObject::paint( QPainter * painter,
                                              const QStyleOptionGraphicsItem * option,
                                              QWidget * widget )
      {
          Q_UNUSED(option);
          Q_UNUSED(widget);
      
          const QRectF arcRect( 670.26338831832493, 1144.2051306797334, 48.0, 48.0 );
          const double arcStart = -2.6620260032633371e-005;
          const double arcLength = 119.81421651085529;
      
          QPainterPath arcPath;
          arcPath.arcMoveTo( arcRect, arcStart );
          arcPath.arcTo( arcRect, arcStart, arcLength );
      
          painter->drawPath( arcPath );
          return;
      }
      

      Attachments

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

        Activity

          People

            sletta Gunnar Sletta
            jds21 John Stark
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes