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

Application crashes within qt-sources after deleting QGraphicsView on OSX

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.4.1, 5.9.1
    • Widgets: GraphicsView
    • None
    • macOS

    Description

      Hello. My application crashes within qt-sources.
      I've already asked question about this problem: http://stackoverflow.com/questions/30476905/qt-application-crashes-on-notifyinternalreceiver-event-in-osx-10-10-2 but I know more information now.

      I added debug code in qt-sources and understood:

      Application crashes in qtimerinfo_unix_p.cpp: QTimerInfoList::activateTimers()

      I understood that function tries to activate timer on wrong qt-object pointer (already deleted):

      Timer. Id: 8 Interval: 300
      TimerInfo ptr: 0x7fde9d5662b0
      Programm Crashes

      I've reimplemented QApplication::notify and understood, that

      TimerInfo ptr: 0x7fde9d5662b0

      registered by QGraphicsView::viewport():

      -- Timer Registered --
      Timer. Id: 8 Interval: 300
      TimerInfo ptr: 0x7fde9d5662b0
      TimerInfo obj: QWidget(0x7fde9a7940a0, name = "ViewViewportBad")
      TimerInfo obj parent: QGraphicsView(0x7fde9a7a44c0, name = "EditController view")
      --  --
      

      But why qt-object is incorrect?
      Until crash I found next notify:

      Parent ptr: QGraphicsView(0x7fde9a7a44c0, name = "EditController view") Object name: "EditController view"
      Receiver ptr: QWidget(0x7fde9a7940a0, name = "ViewViewportBad") Object name: "ViewViewportBad"
      Event ptr: QWidget(0x7fde9a7940a0, name = "ViewViewportBad") Type: 16
      

      It means that viewport already deleted (Qevent::type 16 = "Destroy"). (I trying to delete QGraphicsView in destructor of my class)

      What timers registered viewport?
      Why timers didn't deleted after destroying viewport?
      Ho to fix this bug?

      PS: application crashes every 5-10 runs

      Attachments

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

        Activity

          People

            bibr Andreas Aardal Hanssen
            fhdns anton
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes