gdb --args /usr/local/Trolltech/Qt-4.7.0/examples/widgets/groupbox/groupbox -graphicssystem opengl GNU gdb (GDB) 7.0.50.20100202 ... Reading symbols from /usr/local/Trolltech/Qt-4.7.0/examples/widgets/groupbox/groupbox...done. ... (gdb) directory ../home/nvidia/qt/src/opengl/gl2paintengineex/ ... (gdb) r Starting program: /usr/local/Trolltech/Qt-4.7.0/examples/widgets/groupbox/groupbox -graphicssystem opengl ... ^C Program received signal SIGINT, Interrupt. 0x414394d4 in poll () from /lib/vfp/libc.so.6 (gdb) b QTriangulatingStroker::join(float const*) Breakpoint 1 at 0x422c3fc8: file gl2paintengineex/qtriangulatingstroker.cpp, line 317. (gdb) condition 1 pts[0] == 457 && pts[1] == 8 (gdb) r The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /usr/local/Trolltech/Qt-4.7.0/examples/widgets/groupbox/groupbox -graphicssystem opengl ... Breakpoint 1, QTriangulatingStroker::join (this=0x12f2ec, pts=0x8eede0e8) at gl2paintengineex/qtriangulatingstroker.cpp:317 317 normalVector(m_cx, m_cy, pts[0], pts[1], &m_nvx, &m_nvy); (gdb) s QTriangulatingStroker::normalVector (this=0x12f2ec, x1=457, y1=8, x2=457, y2=8, nx=0x12f300, ny=0x12f304) at gl2paintengineex/qtriangulatingstroker_p.h:123 123 float dx = x2 - x1; (gdb) bt #0 QTriangulatingStroker::normalVector (this=0x12f2ec, x1=457, y1=8, x2=457, y2=8, nx=0x12f300, ny=0x12f304) at gl2paintengineex/qtriangulatingstroker_p.h:123 #1 0x422c401c in QTriangulatingStroker::join (this=0x12f2ec, pts=0x8ea4c0e8) at gl2paintengineex/qtriangulatingstroker.cpp:317 #2 0x422c5618 in QTriangulatingStroker::process (this=0x12f2ec, path=..., pen=...) at gl2paintengineex/qtriangulatingstroker.cpp:164 #3 0x422b7e54 in QGL2PaintEngineExPrivate::stroke (this=0x12f0a8, path=..., pen=...) at gl2paintengineex/qpaintengineex_opengl2.cpp:1174 #4 0x422b8370 in QGL2PaintEngineEx::stroke (this=0x142288, path=..., pen=...) at gl2paintengineex/qpaintengineex_opengl2.cpp:1141 #5 0x403d4314 in QPaintEngineEx::drawPolygon (this=0x142288, points=0x16a690, pointCount=3, mode=QPaintEngine::PolylineMode) at painting/qpaintengineex.cpp:942 #6 0x403ef590 in QPainter::drawPolyline (this=0x8ea4df7c, points=0x16a690, pointCount=3) at painting/qpainter.cpp:4837 #7 0x40301220 in QPainter::drawPolyline (this=0x8ea4df7c, polyline=...) at ../../include/QtGui/../../src/gui/painting/qpainter.h:617 #8 0x403b243c in qDrawShadeLine (p=0x8ea4df7c, x1=0, y1=8, x2=457, y2=8, pal=..., sunken=true, lineWidth=1, midLineWidth=0) at painting/qdrawutil.cpp:138 #9 0x403b2834 in qDrawShadeLine (p=0x8ea4df7c, p1=..., p2=..., pal=..., sunken=true, lineWidth=1, midLineWidth=0) at painting/qdrawutil.cpp:579 #10 0x406d1c68 in QCommonStyle::drawPrimitive (this=0x533b0, pe=QStyle::PE_FrameGroupBox, opt=0x8ea4d4c0, p=0x8ea4df7c, widget=0x4f180) at styles/qcommonstyle.cpp:539 #11 0x407a53f8 in QWindowsStyle::drawPrimitive (this=0x533b0, pe=QStyle::PE_FrameGroupBox, opt=0x8ea4d4c0, p=0x8ea4df7c, w=0x4f180) at styles/qwindowsstyle.cpp:1787 #12 0x406ba114 in QCommonStyle::drawComplexControl (this=0x533b0, cc=QStyle::CC_GroupBox, opt=0x8ea4df24, p=0x8ea4df7c, widget=0x4f180) at styles/qcommonstyle.cpp:3685 #13 0x40799134 in QWindowsStyle::drawComplexControl (this=0x533b0, cc=QStyle::CC_GroupBox, opt=0x8ea4df24, p=0x8ea4df7c, widget=0x4f180) at styles/qwindowsstyle.cpp:3154 #14 0x407cdb88 in QStylePainter::drawComplexControl (this=0x8ea4df7c, cc=QStyle::CC_GroupBox, opt=...) at ../../include/QtGui/../../src/gui/painting/qstylepainter.h:94 #15 0x4083c29c in QGroupBox::paintEvent (this=0x4f180) at widgets/qgroupbox.cpp:327 #16 0x40218c98 in QWidget::event (this=0x4f180, event=0x8ea4e8a0) at kernel/qwidget.cpp:8230 #17 0x4083c1ec in QGroupBox::event (this=0x4f180, e=0x8ea4e8a0) at widgets/qgroupbox.cpp:397 #18 0x40174a78 in QApplicationPrivate::notify_helper (this=0x169d8, receiver=0x4f180, e=0x8ea4e8a0) at kernel/qapplication.cpp:4336 #19 0x40178204 in QApplication::notify (this=0x8ea4f6b0, receiver=0x4f180, e=0x8ea4e8a0) at kernel/qapplication.cpp:4301 #20 0x41085b64 in QCoreApplication::notifyInternal (this=0x8ea4f6b0, receiver=0x4f180, event=0x8ea4e8a0) at kernel/qcoreapplication.cpp:704 #21 0x40191aec in QCoreApplication::sendSpontaneousEvent (receiver=0x4f180, event=0x8ea4e8a0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:218 #22 0x40214cf8 in QWidgetPrivate::drawWidget (this=0x54550, pdev=0x567ac, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x56890) at kernel/qwidget.cpp:5313 #23 0x402157f8 in QWidgetPrivate::paintSiblingsRecursive (this=0x54320, pdev=0x567ac, siblings=..., index=0, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x56890) at kernel/qwidget.cpp:5520 #24 0x402152b0 in QWidgetPrivate::drawWidget (this=0x54320, pdev=0x567ac, rgn=..., offset=..., flags=5, sharedPainter=0x0, backingStore=0x56890) at kernel/qwidget.cpp:5366 #25 0x40525520 in QWidgetBackingStore::sync (this=0x56890) at painting/qbackingstore.cpp:1300 #26 0x40525820 in QWidgetBackingStore::sync (this=0x56890, exposedWidget=0x8ea4f69c, exposedRegion=...) at painting/qbackingstore.cpp:1105 #27 0x4020b990 in QWidgetPrivate::syncBackingStore (this=0x54320, region=...) at kernel/qwidget.cpp:1718 #28 0x40268108 in QETWidget::translatePaintEvent (this=0x8ea4f69c, event=0x8ea4f430) at kernel/qapplication_x11.cpp:5118 #29 0x4026abf4 in QApplication::x11ProcessEvent (this=0x8ea4f6b0, event=0x8ea4f430) at kernel/qapplication_x11.cpp:3437 #30 0x402ad8fc in x11EventSourceDispatch (s=0x1a128, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146 #31 0x414e5c48 in g_main_dispatch (context=0x2) at gmain.c:2012 #32 IA__g_main_context_dispatch (context=0x2) at gmain.c:2564 #33 0x414e8d7c in g_main_context_iterate (context=0x19f80, block=1, dispatch=1092618196, self=) at gmain.c:2645 #34 0x414e8f00 in IA__g_main_context_iteration (context=0x19f80, may_block=1) at gmain.c:2708 #35 0x410d8ae8 in QEventDispatcherGlib::processEvents (this=0x18580, flags=...) at kernel/qeventdispatcher_glib.cpp:412 #36 0x402acca4 in QGuiEventDispatcherGlib::processEvents (this=0x18580, flags=...) at kernel/qguieventdispatcher_glib.cpp:204 #37 0x410809c8 in QEventLoop::processEvents (this=0x8ea4f654, flags=...) at kernel/qeventloop.cpp:149 #38 0x41080cb8 in QEventLoop::exec (this=0x8ea4f654, flags=...) at kernel/qeventloop.cpp:201 #39 0x41086888 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981 #40 0x40178240 in QApplication::exec () at kernel/qapplication.cpp:3615 #41 0x0000bbac in main (argc=1, argv=0x8ea4f814) at main.cpp:51 (gdb) 124 float dy = y2 - y1; (gdb) 128 if (dx == 0) (gdb) 129 pw = m_width / qAbs(dy); (gdb) n 135 *nx = -dy * pw; (gdb) s 136 *ny = dx * pw; (gdb) 137 } (gdb) p *nx $1 = nan(0x400000) (gdb) p *ny $2 = nan(0x400000) (gdb) info locals dx = 0 dy = 0 pw = inf (gdb) n QTriangulatingStroker::join (this=0x12f2ec, pts=0x8eede0e8) at gl2paintengineex/qtriangulatingstroker.cpp:319 319 switch (m_join_style) { (gdb) 386 emitLineSegment(m_cx, m_cy, m_nvx, m_nvy); (gdb) 387 } (gdb) QTriangulatingStroker::process (this=0x12f2ec, path=..., pen=...) at gl2paintengineex/qtriangulatingstroker.cpp:165 165 lineTo(pts); (gdb) 166 pts += 2; (gdb) 163 while (pts < endPts) { (gdb) 169 endCapOrJoinClosed(startPts, pts-2, path.hasImplicitClose(), endsAtStart); (gdb) 216 } (gdb) QGL2PaintEngineExPrivate::stroke (this=0x12f0a8, path=..., pen=...) at gl2paintengineex/qpaintengineex_opengl2.cpp:1185 1185 if (opaque) { (gdb) 1186 prepareForDraw(opaque); (gdb) 1187 setVertexAttributePointer(QT_VERTEX_COORDS_ATTR, stroker.vertices()); (gdb) call stroker.vertices() $3 = (const float *) 0x1460b0 (gdb) call stroker.vertexCount() $4 = 26 (gdb) x/26f $3 0x1460b0: -0.5 8.5 -0.5 7.5 0x1460c0: 0 8.5 0 7.5 0x1460d0: 457 8.5 457 7.5 0x1460e0: nan(0x400000) nan(0x400000) -nan(0x400000) -nan(0x400000) 0x1460f0: nan(0x400000) nan(0x400000) -nan(0x400000) -nan(0x400000) 0x146100: nan(0x400000) -nan(0x400000) nan(0x400000) -nan(0x400000) 0x146110: nan(0x400000) -nan(0x400000) (gdb) n 1188 glDrawArrays(GL_TRIANGLE_STRIP, 0, stroker.vertexCount() / 2); (gdb) 1223 }