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

Crash of QGraphicsDropShadowEffect::draw() under Mac OS X.

    XMLWordPrintable

    Details

    • Platform/s:
      macOS

      Description

      I try to put a shadow effect on my widget, but app crashes with EXC_BAD_ACCESS in QGraphicsDropShadowEffect::draw(). Just right before that, console says this:

      "QPainter::begin: Widget painting can only begin as a result of a paintEvent
      QPainter::translate: Painter not active"

      How to represent:

      Create project with widget, put a QLabel on it, then do this in c-tor:

      QGraphicsDropShadowEffect * shadow = new QGraphicsDropShadowEffect(this);
      shadow->setColor(Qt::red);
      shadow->setOffset(1, 1);
      setGraphicsEffect(shadow);

      App crashes on launch. Here is its backtrace:

      0 QGraphicsDropShadowEffect::draw
      1 QWidgetPrivate::drawWidget
      2 -[QCocoaView drawRect:]
      3 -[NSView _drawRect:clip:]
      4 -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:]
      5 -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:]
      6 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
      7 -[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
      8 -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:]
      9 -[NSView displayIfNeeded]
      10 -[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:]
      11 -[NSWindow _doOrderWindow:relativeTo:findKey:forCounter:force:isModal:]
      12 -[NSWindow orderWindow:relativeTo:]
      13 -[NSWindow makeKeyAndOrderFront:]
      14 QWidgetPrivate::show_sys
      15 QWidgetPrivate::show_helper
      16 QWidget::setVisible
      17 QWidget::show qwidget.h
      18 main main.cpp

        Attachments

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

          Activity

            People

            Assignee:
            rodal Samuel Rødal
            Reporter:
            silvansky Valentine Silvansky
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes