Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Application crash for deleteLater()
Qt 6.11 is out! See what's new in the release blog

Application crash for deleteLater()

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 2.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    topix93
    wrote on last edited by
    #1

    in my program i delete an object using:

    @myObj->deleteLater();
    QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete); @

    but sometimes i get this error:

    @>&"bt\n"

    ~"#0 0xb7029edc in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /home/bnm/Qt5.1.1/5.1.1/gcc/lib/libQt5Core.so.5\n"
    ~"#1 0xb7079282 in QTimerInfoList::activateTimers() () from /home/bnm/Qt5.1.1/5.1.1/gcc/lib/libQt5Core.so.5\n"
    ~"#2 0xb7079b38 in ?? () from /home/bnm/Qt5.1.1/5.1.1/gcc/lib/libQt5Core.so.5\n"
    ~"#3 0xb6572d46 in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0\n"
    ~"#4 0xb65730e5 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0\n"
    ~"#5 0xb65731c1 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0\n"
    ~"#6 0xb707a328 in QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) () from /home/bnm/Qt5.1.1/5.1.1/gcc/lib/libQt5Core.so.5\n"
    ~"#7 0xb3f44566 in ?? () from /home/bnm/Qt5.1.1/5.1.1/gcc/plugins/platforms/libqxcb.so\n"
    ~"#8 0xb70285e6 in QEventLoop::processEvents(QFlagsQEventLoop::ProcessEventsFlag) () from /home/bnm/Qt5.1.1/5.1.1/gcc/lib/libQt5Core.so.5\n"
    ~"#9 0xb7028a2c in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) () from /home/bertero/Qt5.1.1/5.1.1/gcc/lib/libQt5Core.so.5\n"
    ~"#10 0xb702d122 in QCoreApplication::exec() () from /home/bnm/Qt5.1.1/5.1.1/gcc/lib/libQt5Core.so.5\n"
    ~"#11 0xb7308d84 in QGuiApplication::exec() () from /home/bnm/Qt5.1.1/5.1.1/gcc/lib/libQt5Gui.so.5\n"
    ~"#12 0xb794bbb4 in QApplication::exec() () from /home/bnm/Qt5.1.1/5.1.1/gcc/lib/libQt5Widgets.so.5\n"
    ~"#13 0x08053561 in main (argc=1, argv=0xbffff7c4) at ../project/main.cpp:11\n"
    1434^done@

    What could be the problem?

    1 Reply Last reply
    0
    • N Offline
      N Offline
      NicuPopescu
      wrote on last edited by
      #2

      I can only guess that myObj is a QTimer's slot receiver, which is destroyed while timer is still running ...

      1 Reply Last reply
      0
      • T Offline
        T Offline
        topix93
        wrote on last edited by
        #3

        inside myobj there are some qtimer declared with:
        myTimer = new QTimer(this)

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved