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

calling QGraphicsItem::childrenBoundingRect() crashs because of pure virtual method call

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P1: Critical P1: Critical
    • None
    • 5.15.2
    • Widgets: GraphicsView
    • None
    • Linux/X11

       QGraphicsItem sends events before it is finally constructed!

      Procedure to reproduce crash:

      1. Run QtCreator (from within QtCreator debugger to see call stack)
      2. Create a new (scratch) model
      3. Drag a "Boundary" element onto diagram
      4. Enlarge boundary
      5. Click into label field and enter some letters
      6. Without leaving the label field (do not click outside), drag another "Item" element into the boundary.
      7. QtCreator crashs!

      The call stack shows a __cxa_pure_virtual call after calling QGraphicsItem::childrenBoundingRect() from within qmt::ObjectItem::boundingRect(). If you look further up the call stack you find a call to the constructor QGraphicsRectItem::QGraphicsRectItem(QGraphicsItem*). In between you see some handling of a FocusIn event. It looks like this event is sent before the QGraphicsRectItem() is finally constructed and some methods are still pure virtual.

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

            gilead Jochen Becher
            gilead Jochen Becher
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes