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

Critical crash when creating QPlainTextEdit when using styles/stylesheets.

    XMLWordPrintable

Details

    • All
    • c6af5b9c1 (dev), e9b187a83 (6.7), ff1f12d5a (6.6), 293772f5f (tqtc/lts-6.5), b47ad83d7 (6.6.2)

    Description

      I updated Qt to the latest 6.6 repo. I have a styled widgets application and it started crashing in the QPlainTextEdit constructor. 

      I've tracked the error to commit I5c32f5af8b284749732b610e56b4e3d8c8ed1946, QTBUG-1857 because of the change on line 2473 in qwidgettextcontrol.cpp. 

      I've added a number of screenshots of the stacktrace.

       

      In stacktrace2.png one sees that control is being constructed. Further in stacktrace5.png, q->setCursorWidth( minus 1 ) is called, which causes QApplication::style()>pixelMetric() to be called in stacktrace6.png. This is where the code was changed in the commit above, passing the parent widget. This causes QPlainTextEdit::isReadOnly() to be called in QStyleSheetStyle::renderRule line 2157, stacktrace8.png. At stacktrace9.png shows, d->control->textInteractionFlags() is tested. Howerver, d->control is still nullptr as it is still being constructed (stacktrace2.png).

       

      Attachments

        1. stacktrace1.png
          stacktrace1.png
          165 kB
        2. stacktrace2.png
          stacktrace2.png
          348 kB
        3. stacktrace3.png
          stacktrace3.png
          331 kB
        4. stacktrace4.png
          stacktrace4.png
          335 kB
        5. stacktrace5.png
          stacktrace5.png
          326 kB
        6. stacktrace6.png
          stacktrace6.png
          333 kB
        7. stacktrace7.png
          stacktrace7.png
          356 kB
        8. stacktrace8.png
          stacktrace8.png
          368 kB
        9. stacktrace9.png
          stacktrace9.png
          328 kB

        Issue Links

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

          Activity

            People

              chehrlic Christian Ehrlicher
              harald Harald Vistnes
              Votes:
              3 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: