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

Crash when using QPainter::drawRoundedRect

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P1: Critical
    • None
    • 6.0.2, 6.0.3, 6.0.4, 6.1.0, 6.1.1
    • GUI: Painting
    • None
    • Windows

    Description

      I'm getting the following crash when cross-compiling for Windows using mingw-w64 8.0.0 with GCC 10.3.0 and GCC 11.1. GCC 10.2.0 works without a crash.
      Qt 5.15.2 compiled with 10.3.0 and GCC 11.1 also works.

      With msvcrt:

       

      gdb: unknown target exception 0xc0000028 at 0x7ffc24f32266
      --Type <RET> for more, q to quit, c to continue without paging--
      Thread 1 received signal ?, Unknown signal.
      0x00007ffc24f32266 in ntdll!RtlRaiseStatus () from C:\Windows\SYSTEM32\ntdll.dll
      (gdb) bt
      #0 0x00007ffc24f32266 in ntdll!RtlRaiseStatus () from C:\Windows\SYSTEM32\ntdll.dll
      #1 0x00007ffc24e60bb3 in ntdll!RtlUnwindEx () from C:\Windows\SYSTEM32\ntdll.dll
      #2 0x00007ffc24912eed in msvcrt!_setjmpex () from C:\Windows\System32\msvcrt.dll
      #3 0x00007ffbc26e5b80 in gray_record_cell () from C:\Program Files\Strawberry Music Player Debug\Qt6Gui.dll
      #4 0x00007ffbc26e65ca in gray_render_line () from C:\Program Files\Strawberry Music Player Debug\Qt6Gui.dll
      #5 0x00007ffbc26e709f in gray_convert_glyph_inner.constprop ()
       from C:\Program Files\Strawberry Music Player Debug\Qt6Gui.dll
      #6 0x00007ffbc26e7627 in gray_convert_glyph () from C:\Program Files\Strawberry Music Player Debug\Qt6Gui.dll
      #7 0x00007ffbc27146be in QRasterPaintEnginePrivate::rasterize(QT_FT_Outline_*, void (*)(int, QT_FT_Span_ const*, void*), void*, QRasterBuffer*) () from C:\Program Files\Strawberry Music Player Debug\Qt6Gui.dll
      #8 0x00007ffbc2721748 in QRasterPaintEngine::fill(QVectorPath const&, QBrush const&) ()
       from C:\Program Files\Strawberry Music Player Debug\Qt6Gui.dll
      #9 0x00007ffbc2728c3b in QPaintEngineEx::stroke(QVectorPath const&, QPen const&) ()
       from C:\Program Files\Strawberry Music Player Debug\Qt6Gui.dll
      #10 0x00007ffbc2725f6c in QPaintEngineEx::drawRoundedRect(QRectF const&, double, double, Qt::SizeMode) ()
       from C:\Program Files\Strawberry Music Player Debug\Qt6Gui.dll
      #11 0x00007ff603cd5957 in QPainter::drawRoundedRect (this=0x4c091fad78, rect=..., xRadius=10, yRadius=10,
       mode=Qt::AbsoluteSize) at /home/jonas/mxe-shared/usr/x86_64-w64-mingw32.shared/qt6/include/QtGui/qpainter.h:613
      #12 0x00007ff603989956 in OSDPretty::paintEvent (this=0x198dd43ed40)
       at /home/jonas/Projects/strawberry/strawberry/src/osd/osdpretty.cpp:343
      #13 0x00007ffbc1cfa558 in QWidget::event(QEvent*) ()
       from C:\Program Files\Strawberry Music Player Debug\Qt6Widgets.dll
      #14 0x00007ffbc1cb5356 in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
       from C:\Program Files\Strawberry Music Player Debug\Qt6Widgets.dll
      #15 0x00007ffbc2e35e08 in QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) ()
       from C:\Program Files\Strawberry Music Player Debug\Qt6Core.dll
      #16 0x00007ffbc1cf30fb in QWidgetPrivate::sendPaintEvent(QRegion const&) ()
       from C:\Program Files\Strawberry Music Player Debug\Qt6Widgets.dll
      #17 0x00007ffbc1cf351b in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags<QWidgetPrivat--Type <RET> for more, q to quit, c to continue without paging--
      e::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) ()
       from C:\Program Files\Strawberry Music Player Debug\Qt6Widgets.dll
      #18 0x00007ffbc1d027d2 in QWidgetRepaintManager::paintAndFlush() ()
       from C:\Program Files\Strawberry Music Player Debug\Qt6Widgets.dll
      #19 0x00007ffbc1d03022 in QWidgetRepaintManager::sync(QWidget*, QRegion const&) ()
       from C:\Program Files\Strawberry Music Player Debug\Qt6Widgets.dll
      #20 0x00007ffbc1d0abda in QWidgetWindow::event(QEvent*) ()
       from C:\Program Files\Strawberry Music Player Debug\Qt6Widgets.dll
      #21 0x00007ffbc1cb5356 in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
       from C:\Program Files\Strawberry Music Player Debug\Qt6Widgets.dll
      #22 0x00007ffbc2e35e08 in QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) ()
       from C:\Program Files\Strawberry Music Player Debug\Qt6Core.dll
      #23 0x00007ffbc2627c38 in QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::ExposeEvent*) ()
       from C:\Program Files\Strawberry Music Player Debug\Qt6Gui.dll
      #24 0x00007ffbc2664d54 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
       from C:\Program Files\Strawberry Music Player Debug\Qt6Gui.dll
      #25 0x00007ffbc2f9401d in QEventDispatcherWin32::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
       from C:\Program Files\Strawberry Music Player Debug\Qt6Core.dll
      #26 0x00007ffbc2924735 in QWindowsGuiEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
       from C:\Program Files\Strawberry Music Player Debug\Qt6Gui.dll
      #27 0x00007ffbc2e3f783 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
       from C:\Program Files\Strawberry Music Player Debug\Qt6Core.dll
      #28 0x00007ffbc2e3e0a6 in QCoreApplication::exec() () from C:\Program Files\Strawberry Music Player Debug\Qt6Core.dll
      #29 0x00007ff6037d25e7 in main (argc=1, argv=0x198db5c5d20)
       at /home/jonas/Projects/strawberry/strawberry/src/main.cpp:305
       
      

       

      With ucrt:

       

      gdb: unknown target exception 0xc0000028 at 0x7ffc24f32266
      Thread 1 received signal ?, Unknown signal.
      0x00007ffc24f32266 in ntdll!RtlRaiseStatus () from C:\Windows\SYSTEM32\ntdll.dll
      (gdb) bt
      #0 0x00007ffc24f32266 in ntdll!RtlRaiseStatus () from C:\Windows\SYSTEM32\ntdll.dll
      #1 0x00007ffc24e60bb3 in ntdll!RtlUnwindEx () from C:\Windows\SYSTEM32\ntdll.dll
      #2 0x00007ffc22d2af0a in ucrtbase!.intrinsic_setjmpex () from C:\Windows\System32\ucrtbase.dll
      #3 0x00007ffbc1f95b80 in gray_record_cell () from C:\Program Files\Strawberry Music Player Debug\Qt6Gui.dll
      #4 0x00007ffbc1f965ca in gray_render_line () from C:\Program Files\Strawberry Music Player Debug\Qt6Gui.dll
      #5 0x00007ffbc1f9709f in gray_convert_glyph_inner.constprop () from C:\Program Files\Strawberry Music Player Debug\Qt6Gui.dll
      #6 0x00007ffbc1f97627 in gray_convert_glyph () from C:\Program Files\Strawberry Music Player Debug\Qt6Gui.dll
      #7 0x00007ffbc1fc46be in QRasterPaintEnginePrivate::rasterize(QT_FT_Outline_*, void (*)(int, QT_FT_Span_ const*, void*), void*, QRasterBuffer*) () from C:\Program Files\Strawberry Music Player Debug\Qt6Gui.dll
      #8 0x00007ffbc1fd1748 in QRasterPaintEngine::fill(QVectorPath const&, QBrush const&) () from C:\Program Files\Strawberry Music Player Debug\Qt6Gui.dll
      #9 0x00007ffbc1fd8c3b in QPaintEngineEx::stroke(QVectorPath const&, QPen const&) () from C:\Program Files\Strawberry Music Player Debug\Qt6Gui.dll
      #10 0x00007ffbc1fd5f6c in QPaintEngineEx::drawRoundedRect(QRectF const&, double, double, Qt::SizeMode) () from C:\Program Files\Strawberry Music Player Debug\Qt6Gui.dll
      #11 0x00007ff6be5955c7 in QPainter::drawRoundedRect (this=0x3cd1faf98, rect=..., xRadius=10, yRadius=10, mode=Qt::AbsoluteSize) at /home/jonas/mxe-shared/usr/x86_64-w64-mingw32.shared/qt6/include/QtGui/qpainter.h:613
      #12 0x00007ff6be249956 in OSDPretty::paintEvent (this=0x20204cf9380) at /home/jonas/Projects/strawberry/strawberry/src/osd/osdpretty.cpp:343
      #13 0x00007ffba962a558 in QWidget::event(QEvent*) () from C:\Program Files\Strawberry Music Player Debug\Qt6Widgets.dll
      #14 0x00007ffba95e5356 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from C:\Program Files\Strawberry Music Player Debug\Qt6Widgets.dll
      #15 0x00007ffbc4aa5e28 in QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) () from C:\Program Files\Strawberry Music Player Debug\Qt6Core.dll
      #16 0x00007ffba96230fb in QWidgetPrivate::sendPaintEvent(QRegion const&) () from C:\Program Files\Strawberry Music Player Debug\Qt6Widgets.dll
      #17 0x00007ffba962351b in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) ()
       from C:\Program Files\Strawberry Music Player Debug\Qt6Widgets.dll
      #18 0x00007ffba96327d2 in QWidgetRepaintManager::paintAndFlush() () from C:\Program Files\Strawberry Music Player Debug\Qt6Widgets.dll
      #19 0x00007ffba9633022 in QWidgetRepaintManager::sync(QWidget*, QRegion const&) () from C:\Program Files\Strawberry Music Player Debug\Qt6Widgets.dll
      #20 0x00007ffba963abda in QWidgetWindow::event(QEvent*) () from C:\Program Files\Strawberry Music Player Debug\Qt6Widgets.dll
      #21 0x00007ffba95e5356 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from C:\Program Files\Strawberry Music Player Debug\Qt6Widgets.dll
      #22 0x00007ffbc4aa5e28 in QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) () from C:\Program Files\Strawberry Music Player Debug\Qt6Core.dll
      #23 0x00007ffbc1ed7c38 in QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::ExposeEvent*) () from C:\Program Files\Strawberry Music Player Debug\Qt6Gui.dll
      #24 0x00007ffbc1f14d54 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from C:\Program Files\Strawberry Music Player Debug\Qt6Gui.dll
      #25 0x00007ffbc4c0403d in QEventDispatcherWin32::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from C:\Program Files\Strawberry Music Player Debug\Qt6Core.dll
      #26 0x00007ffbc21d4735 in QWindowsGuiEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from C:\Program Files\Strawberry Music Player Debug\Qt6Gui.dll
      #27 0x00007ffbc4aaf7a3 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from C:\Program Files\Strawberry Music Player Debug\Qt6Core.dll
      #28 0x00007ffbc4aae0c6 in QCoreApplication::exec() () from C:\Program Files\Strawberry Music Player Debug\Qt6Core.dll
      #29 0x00007ff6be0925e7 in main (argc=1, argv=0x20202db9570) at /home/jonas/Projects/strawberry/strawberry/src/main.cpp:305
      (gdb)
      #0 0x00007ffc24f32266 in ntdll!RtlRaiseStatus () from C:\Windows\SYSTEM32\ntdll.dll
      #1 0x00007ffc24e60bb3 in ntdll!RtlUnwindEx () from C:\Windows\SYSTEM32\ntdll.dll
      #2 0x00007ffc22d2af0a in ucrtbase!.intrinsic_setjmpex () from C:\Windows\System32\ucrtbase.dll
      #3 0x00007ffbc1f95b80 in gray_record_cell () from C:\Program Files\Strawberry Music Player Debug\Qt6Gui.dll
      #4 0x00007ffbc1f965ca in gray_render_line () from C:\Program Files\Strawberry Music Player Debug\Qt6Gui.dll
      #5 0x00007ffbc1f9709f in gray_convert_glyph_inner.constprop () from C:\Program Files\Strawberry Music Player Debug\Qt6Gui.dll
      #6 0x00007ffbc1f97627 in gray_convert_glyph () from C:\Program Files\Strawberry Music Player Debug\Qt6Gui.dll
      #7 0x00007ffbc1fc46be in QRasterPaintEnginePrivate::rasterize(QT_FT_Outline_*, void (*)(int, QT_FT_Span_ const*, void*), void*, QRasterBuffer*) () from C:\Program Files\Strawberry Music Player Debug\Qt6Gui.dll
      #8 0x00007ffbc1fd1748 in QRasterPaintEngine::fill(QVectorPath const&, QBrush const&) () from C:\Program Files\Strawberry Music Player Debug\Qt6Gui.dll
      #9 0x00007ffbc1fd8c3b in QPaintEngineEx::stroke(QVectorPath const&, QPen const&) () from C:\Program Files\Strawberry Music Player Debug\Qt6Gui.dll
      #10 0x00007ffbc1fd5f6c in QPaintEngineEx::drawRoundedRect(QRectF const&, double, double, Qt::SizeMode) () from C:\Program Files\Strawberry Music Player Debug\Qt6Gui.dll
      #11 0x00007ff6be5955c7 in QPainter::drawRoundedRect (this=0x3cd1faf98, rect=..., xRadius=10, yRadius=10, mode=Qt::AbsoluteSize) at /home/jonas/mxe-shared/usr/x86_64-w64-mingw32.shared/qt6/include/QtGui/qpainter.h:613
      #12 0x00007ff6be249956 in OSDPretty::paintEvent (this=0x20204cf9380) at /home/jonas/Projects/strawberry/strawberry/src/osd/osdpretty.cpp:343
      #13 0x00007ffba962a558 in QWidget::event(QEvent*) () from C:\Program Files\Strawberry Music Player Debug\Qt6Widgets.dll
      #14 0x00007ffba95e5356 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from C:\Program Files\Strawberry Music Player Debug\Qt6Widgets.dll
      #15 0x00007ffbc4aa5e28 in QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) () from C:\Program Files\Strawberry Music Player Debug\Qt6Core.dll
      #16 0x00007ffba96230fb in QWidgetPrivate::sendPaintEvent(QRegion const&) () from C:\Program Files\Strawberry Music Player Debug\Qt6Widgets.dll
      #17 0x00007ffba962351b in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) ()
       from C:\Program Files\Strawberry Music Player Debug\Qt6Widgets.dll
      #18 0x00007ffba96327d2 in QWidgetRepaintManager::paintAndFlush() () from C:\Program Files\Strawberry Music Player Debug\Qt6Widgets.dll
      #19 0x00007ffba9633022 in QWidgetRepaintManager::sync(QWidget*, QRegion const&) () from C:\Program Files\Strawberry Music Player Debug\Qt6Widgets.dll
      #20 0x00007ffba963abda in QWidgetWindow::event(QEvent*) () from C:\Program Files\Strawberry Music Player Debug\Qt6Widgets.dll
      #21 0x00007ffba95e5356 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from C:\Program Files\Strawberry Music Player Debug\Qt6Widgets.dll
      #22 0x00007ffbc4aa5e28 in QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) () from C:\Program Files\Strawberry Music Player Debug\Qt6Core.dll
      #23 0x00007ffbc1ed7c38 in QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::ExposeEvent*) () from C:\Program Files\Strawberry Music Player Debug\Qt6Gui.dll
      #24 0x00007ffbc1f14d54 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from C:\Program Files\Strawberry Music Player Debug\Qt6Gui.dll
      #25 0x00007ffbc4c0403d in QEventDispatcherWin32::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from C:\Program Files\Strawberry Music Player Debug\Qt6Core.dll
      #26 0x00007ffbc21d4735 in QWindowsGuiEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from C:\Program Files\Strawberry Music Player Debug\Qt6Gui.dll
      #27 0x00007ffbc4aaf7a3 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from C:\Program Files\Strawberry Music Player Debug\Qt6Core.dll
      #28 0x00007ffbc4aae0c6 in QCoreApplication::exec() () from C:\Program Files\Strawberry Music Player Debug\Qt6Core.dll
      #29 0x00007ff6be0925e7 in main (argc=1, argv=0x20202db9570) at /home/jonas/Projects/strawberry/strawberry/src/main.cpp:305
      (gdb)
      

       

      I set up the following example project that can reproduce the crash:

      https://github.com/jonaski/osdprettytest

       

      My cross compilation repo is here: https://github.com/strawberrymusicplayer/strawberry-mxe 
      Bumping the GCC version to 10.3.0 or GCC 11.1 will reproduce the crash.
      The only code changes I have to Qt 6.0.4 is adding some missing limits includes.

       

      Attachments

        Issue Links

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

          Activity

            People

              vgt Eirik Aavitsland
              jonaski Jonas Kvinge
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes