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

RMB over QGraphicsTextItem causes a crash

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P1: Critical
    • None
    • 5.15.2
    • Widgets: GraphicsView
    • None

    Description

      To reproduce:

      1. Run examples/widgets/graphicsview/diagramscene example
      2. Create text item
      3. Try to open context menu over the text item -> crash.

      Call stack:

      #0  0x00007ffff7859e53 in QFlags<Qt::WindowType>::operator& (this=0x18d, other=Qt::WindowType_Mask)
          at ../../include/QtCore/../../../../qt-515/qtbase/src/corelib/global/qflags.h:146
      #1  0x00007ffff785914b in QWidget::windowType (this=0x6d6d30)
          at ../../include/QtWidgets/../../../../qt-515/qtbase/src/widgets/kernel/qwidget.h:769
      #2  0x00007ffff7859174 in QWidget::isWindow (this=0x6d6d30)
          at ../../include/QtWidgets/../../../../qt-515/qtbase/src/widgets/kernel/qwidget.h:777
      #3  0x00007ffff78916a2 in QWidget::window (this=0x6d6d30)
          at /home/jarek/dev/qt-515/qtbase/src/widgets/kernel/qwidget.cpp:4139
      #4  0x00007ffff7ad6c29 in QWidgetTextControlPrivate::contextMenuEvent (this=0x7fffe0007b70, screenPos=..., 
          docPos=..., contextWidget=0x0) at /home/jarek/dev/qt-515/qtbase/src/widgets/widgets/qwidgettextcontrol.cpp:1945
      #5  0x00007ffff7ad33e5 in QWidgetTextControl::processEvent (this=0x6e27e0, e=0x7fffffffb8e0, transform=..., 
          contextWidget=0x0) at /home/jarek/dev/qt-515/qtbase/src/widgets/widgets/qwidgettextcontrol.cpp:1133
      #6  0x00007ffff7ad2821 in QWidgetTextControl::processEvent (this=0x6e27e0, e=0x7fffffffb8e0, coordinateOffset=..., 
          contextWidget=0x0) at /home/jarek/dev/qt-515/qtbase/src/widgets/widgets/qwidgettextcontrol.cpp:998
      #7  0x00007ffff7c425a2 in QGraphicsTextItemPrivate::sendControlEvent (this=0x6e3ab0, e=0x7fffffffb8e0)
          at /home/jarek/dev/qt-515/qtbase/src/widgets/graphicsview/qgraphicsitem.cpp:9966
      #8  0x00007ffff7c39b29 in QGraphicsTextItem::contextMenuEvent (this=0x6d6d30, event=0x7fffffffb8e0)
          at /home/jarek/dev/qt-515/qtbase/src/widgets/graphicsview/qgraphicsitem.cpp:10405
      #9  0x00007ffff7c32934 in QGraphicsItem::sceneEvent (this=0x6d6d40, event=0x7fffffffb8e0)
          at /home/jarek/dev/qt-515/qtbase/src/widgets/graphicsview/qgraphicsitem.cpp:6898
      #10 0x00007ffff7c39550 in QGraphicsTextItem::sceneEvent (this=0x6d6d30, event=0x7fffffffb8e0)
          at /home/jarek/dev/qt-515/qtbase/src/widgets/graphicsview/qgraphicsitem.cpp:10280
      #11 0x00007ffff7c5bacc in QGraphicsScenePrivate::sendEvent (this=0x5ecd40, item=0x6d6d40, event=0x7fffffffb8e0)
          at /home/jarek/dev/qt-515/qtbase/src/widgets/graphicsview/qgraphicsscene.cpp:1258
      #12 0x00007ffff7c62330 in QGraphicsScene::contextMenuEvent (this=0x654500, contextMenuEvent=0x7fffffffb8e0)
          at /home/jarek/dev/qt-515/qtbase/src/widgets/graphicsview/qgraphicsscene.cpp:3603
      #13 0x00007ffff7c6174b in QGraphicsScene::event (this=0x654500, event=0x7fffffffb8e0)
          at /home/jarek/dev/qt-515/qtbase/src/widgets/graphicsview/qgraphicsscene.cpp:3390
      #14 0x00007ffff7855859 in QApplicationPrivate::notify_helper (this=0x4491e0, receiver=0x654500, e=0x7fffffffb8e0)
          at /home/jarek/dev/qt-515/qtbase/src/widgets/kernel/qapplication.cpp:3632
      #15 0x00007ffff7852d0f in QApplication::notify (this=0x7fffffffd690, receiver=0x654500, e=0x7fffffffb8e0)
          at /home/jarek/dev/qt-515/qtbase/src/widgets/kernel/qapplication.cpp:2972
      #16 0x00007ffff69b8378 in QCoreApplication::notifyInternal2 (receiver=0x654500, event=0x7fffffffb8e0)
          at /home/jarek/dev/qt-515/qtbase/src/corelib/kernel/qcoreapplication.cpp:1064
      #17 0x00007ffff69b8d10 in QCoreApplication::sendEvent (receiver=0x654500, event=0x7fffffffb8e0)
          at /home/jarek/dev/qt-515/qtbase/src/corelib/kernel/qcoreapplication.cpp:1459
      #18 0x00007ffff7c9bc92 in QGraphicsView::contextMenuEvent (this=0x633460, event=0x7fffffffc4a0)
          at /home/jarek/dev/qt-515/qtbase/src/widgets/graphicsview/qgraphicsview.cpp:3040
      #19 0x00007ffff789f68b in QWidget::event (this=0x633460, event=0x7fffffffc4a0)
          at /home/jarek/dev/qt-515/qtbase/src/widgets/kernel/qwidget.cpp:8823
      #20 0x00007ffff798eae3 in QFrame::event (this=0x633460, e=0x7fffffffc4a0)
          at /home/jarek/dev/qt-515/qtbase/src/widgets/widgets/qframe.cpp:550
      #21 0x00007ffff7992694 in QAbstractScrollArea::viewportEvent (this=0x633460, e=0x7fffffffc4a0)
          at /home/jarek/dev/qt-515/qtbase/src/widgets/widgets/qabstractscrollarea.cpp:1095
      #22 0x00007ffff7c9baa0 in QGraphicsView::viewportEvent (this=0x633460, event=0x7fffffffc4a0)
          at /home/jarek/dev/qt-515/qtbase/src/widgets/graphicsview/qgraphicsview.cpp:3014
      #23 0x00007ffff7993a6b in QAbstractScrollAreaPrivate::viewportEvent (this=0x632bb0, event=0x7fffffffc4a0)
          at /home/jarek/dev/qt-515/qtbase/src/widgets/widgets/qabstractscrollarea_p.h:111
      #24 0x00007ffff7993b38 in QAbstractScrollAreaFilter::eventFilter (this=0x607850, o=0x631a20, e=0x7fffffffc4a0)
          at /home/jarek/dev/qt-515/qtbase/src/widgets/widgets/qabstractscrollarea_p.h:122
      #25 0x00007ffff69b879d in QCoreApplicationPrivate::sendThroughObjectEventFilters (receiver=0x631a20, 
          event=0x7fffffffc4a0) at /home/jarek/dev/qt-515/qtbase/src/corelib/kernel/qcoreapplication.cpp:1190
      #26 0x00007ffff785582d in QApplicationPrivate::notify_helper (this=0x4491e0, receiver=0x631a20, e=0x7fffffffc4a0)
          at /home/jarek/dev/qt-515/qtbase/src/widgets/kernel/qapplication.cpp:3626
      #27 0x00007ffff7853f07 in QApplication::notify (this=0x7fffffffd690, receiver=0x631a20, e=0x7fffffffc4a0)
          at /home/jarek/dev/qt-515/qtbase/src/widgets/kernel/qapplication.cpp:3238
      #28 0x00007ffff69b8378 in QCoreApplication::notifyInternal2 (receiver=0x631a20, event=0x7fffffffc4a0)
          at /home/jarek/dev/qt-515/qtbase/src/corelib/kernel/qcoreapplication.cpp:1064
      #29 0x00007ffff69b8404 in QCoreApplication::forwardEvent (receiver=0x631a20, event=0x7fffffffc4a0, 
          originatingEvent=0x7fffffffcfd0) at /home/jarek/dev/qt-515/qtbase/src/corelib/kernel/qcoreapplication.cpp:1079
      #30 0x00007ffff78cdf7e in QWidgetWindow::handleMouseEvent (this=0x632170, event=0x7fffffffcfd0)
          at /home/jarek/dev/qt-515/qtbase/src/widgets/kernel/qwidgetwindow.cpp:691
      #31 0x00007ffff78cc6ea in QWidgetWindow::event (this=0x632170, event=0x7fffffffcfd0)
          at /home/jarek/dev/qt-515/qtbase/src/widgets/kernel/qwidgetwindow.cpp:300
      #32 0x00007ffff7855859 in QApplicationPrivate::notify_helper (this=0x4491e0, receiver=0x632170, e=0x7fffffffcfd0)
          at /home/jarek/dev/qt-515/qtbase/src/widgets/kernel/qapplication.cpp:3632
      #33 0x00007ffff7852d0f in QApplication::notify (this=0x7fffffffd690, receiver=0x632170, e=0x7fffffffcfd0)
          at /home/jarek/dev/qt-515/qtbase/src/widgets/kernel/qapplication.cpp:2972
      #34 0x00007ffff69b8378 in QCoreApplication::notifyInternal2 (receiver=0x632170, event=0x7fffffffcfd0)
          at /home/jarek/dev/qt-515/qtbase/src/corelib/kernel/qcoreapplication.cpp:1064
      #35 0x00007ffff69b8d4a in QCoreApplication::sendSpontaneousEvent (receiver=0x632170, event=0x7fffffffcfd0)
          at /home/jarek/dev/qt-515/qtbase/src/corelib/kernel/qcoreapplication.cpp:1471
      #36 0x00007ffff6eebdcb in QGuiApplicationPrivate::processMouseEvent (e=0x6e1970)
          at /home/jarek/dev/qt-515/qtbase/src/gui/kernel/qguiapplication.cpp:2282
      #37 0x00007ffff6eeb019 in QGuiApplicationPrivate::processWindowSystemEvent (e=0x6e1970)
          at /home/jarek/dev/qt-515/qtbase/src/gui/kernel/qguiapplication.cpp:2002
      #38 0x00007ffff6ecb6a2 in QWindowSystemInterface::sendWindowSystemEvents (flags=...)
          at /home/jarek/dev/qt-515/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:1169
      #39 0x00007fffe6421167 in xcbSourceDispatch (source=0x5169f0)
          at /home/jarek/dev/qt-515/qtbase/src/plugins/platforms/xcb/qxcbeventdispatcher.cpp:105
      #40 0x00007ffff3dfc96f in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
      #41 0x00007ffff3e4e758 in g_main_context_iterate.constprop () from /lib64/libglib-2.0.so.0
      #42 0x00007ffff3df9d43 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
      #43 0x00007ffff6a472c6 in QEventDispatcherGlib::processEvents (this=0x5100d0, flags=...)
          at /home/jarek/dev/qt-515/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:423
      #44 0x00007fffe6421384 in QXcbGlibEventDispatcher::processEvents (this=0x5100d0, flags=...)
          at /home/jarek/dev/qt-515/qtbase/src/plugins/platforms/xcb/qxcbeventdispatcher.cpp:143
      #45 0x00007ffff69b4e5f in QEventLoop::processEvents (this=0x7fffffffd4a0, flags=...)
          at /home/jarek/dev/qt-515/qtbase/src/corelib/kernel/qeventloop.cpp:139
      #46 0x00007ffff69b516c in QEventLoop::exec (this=0x7fffffffd4a0, flags=...)
          at /home/jarek/dev/qt-515/qtbase/src/corelib/kernel/qeventloop.cpp:232
      #47 0x00007ffff69b8b67 in QCoreApplication::exec ()
          at /home/jarek/dev/qt-515/qtbase/src/corelib/kernel/qcoreapplication.cpp:1372
      #48 0x00007ffff6eeaa7c in QGuiApplication::exec ()
          at /home/jarek/dev/qt-515/qtbase/src/gui/kernel/qguiapplication.cpp:1867
      #49 0x00007ffff785270f in QApplication::exec ()
          at /home/jarek/dev/qt-515/qtbase/src/widgets/kernel/qapplication.cpp:2824
      #50 0x0000000000416df0 in main (argv=1, args=0x7fffffffd7a8)
          at ../../dev/qt-dev/qtbase/examples/widgets/graphicsview/diagramscene/main.cpp:64
      

      Attachments

        Issue Links

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

          Activity

            People

              bibr Andreas Aardal Hanssen
              jkobus Jarek Kobus
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes