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

Signal to delete parent widget causes crash when a thread is running

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.6.3
    • 4.6.0, 4.6.1
    • None
    • Mac OS X
    • 65f993d679140fb2dc29b48c9d9d8d2fc5af893d

    Description

      Setup: A container widget with a button that deletes the container.
      Qt will crash when returning to the main event loop if a thread inside the container has started, but not finished running when the button is clicked (even though the delete code for the container waits for the thread to finish before deleting the thread and container). It doesn't crash if the thread hasn't started or has completed before the button is clicked.

      Backtrace:
      Program received signal EXC_BAD_ACCESS, Could not access memory.
      Reason: KERN_INVALID_ADDRESS at address: 0xc004ef7f
      0x00303026 in QObjectPrivate::resetCurrentSender ()
      (gdb) bt
      #0 0x00303026 in QObjectPrivate::resetCurrentSender ()
      #1 0x00303cff in QMetaObject::activate ()
      #2 0x01312b04 in QAbstractButton::clicked ()
      #3 0x0101d626 in QAbstractButtonPrivate::emitClicked ()
      #4 0x0101d73b in QAbstractButtonPrivate::click ()
      #5 0x0101d99c in QAbstractButton::mouseReleaseEvent ()
      #6 0x00c96ba3 in QWidget::event ()
      #7 0x0101e203 in QAbstractButton::event ()
      #8 0x010c14b1 in QPushButton::event ()
      #9 0x00c3dc5f in QApplicationPrivate::notify_helper ()
      #10 0x00c444c9 in QApplication::notify ()
      #11 0x002fe452 in QCoreApplication::notifyInternal ()
      #12 0x00bd55fd in QApplicationPrivate::globalEventProcessor ()
      #13 0x964ed13d in DispatchEventToHandlers ()
      #14 0x964ec57b in SendEventToEventTargetInternal ()
      #15 0x96508ecc in SendEventToEventTarget ()
      #16 0x9651b0a8 in ToolboxEventDispatcherHandler ()
      #17 0x964ed4f6 in DispatchEventToHandlers ()
      #18 0x964ec57b in SendEventToEventTargetInternal ()
      #19 0x96508ecc in SendEventToEventTarget ()
      #20 0x00beb644 in QEventDispatcherMac::processEvents ()
      #21 0x003dc3d1 in QEventLoop::processEvents ()
      #22 0x003dc5fd in QEventLoop::exec ()
      #23 0x003de95e in QCoreApplication::exec ()
      #24 0x00003b07 in main ()

      Attachments

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

        Activity

          People

            goffart Olivier Goffart (closed Nokia identity) (Inactive)
            dmillett Danielle Millett
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes