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. Debugging in the Qt Event Loop?
Forum Updated to NodeBB v4.3 + New Features

Debugging in the Qt Event Loop?

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 5.5k 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.
  • S Offline
    S Offline
    SimonL
    wrote on 15 Jul 2011, 04:45 last edited by
    #1

    Every now and then when debugging in gdb or Visual Studio we come across something that is purely in the Qt Event Loop ie comes from main then QApplication::Exec() normally these issues are still our fault however from the debugger we struggle to work out the issue the latest listed below is a wait in a delete. Does anyone have any suggestions for debugging such issues? We normally run Multi threaded code but using internal threads rather then Qt as some code must run on embedded hardware that cannot support Qt.

    @#0 0xf7773430 in __kernel_vsyscall ()
    #1 0xf6569423 in __lll_lock_wait_private () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/lowlevellock.S:95
    #2 0xf64fe527 in _L_lock_9667 () from /lib32/libc.so.6
    #3 0xf64fcd56 in __libc_free (mem=0xa180770) at malloc.c:3736
    #4 0xf66dd7b1 in operator delete(void*) () from /usr/lib32/libstdc++.so.6
    #5 0xf68f47b2 in QEvent::~QEvent (this=0xa180770, __in_chrg=<value optimised out>) at kernel/qcoreevent.cpp:296
    #6 0xf68ef900 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x9fede70) at kernel/qcoreapplication.cpp:1389
    #7 0xf68ef505 in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1266
    #8 0xf6cd8e4c in QCoreApplication::sendPostedEvents () at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
    #9 0xf6927470 in postEventSourceDispatch (s=0x9ff0d10) at kernel/qeventdispatcher_glib.cpp:277
    #10 0xf632e855 in g_main_context_dispatch () from /lib32/libglib-2.0.so.0
    #11 0xf6332668 in ?? () from /lib32/libglib-2.0.so.0
    #12 0xf6332848 in g_main_context_iteration () from /lib32/libglib-2.0.so.0
    #13 0xf69284a2 in QEventDispatcherGlib::processEvents (this=0x9fee930, flags=...) at kernel/qeventdispatcher_glib.cpp:415
    #14 0xf6ce55aa in QGuiEventDispatcherGlib::processEvents (this=0x9fee930, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
    #15 0xf68ebb43 in QEventLoop::processEvents (this=0xffba60bc, flags=...) at kernel/qeventloop.cpp:149
    #16 0xf68ebc88 in QEventLoop::exec (this=0xffba60bc, flags=...) at kernel/qeventloop.cpp:201
    #17 0xf68eee75 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1009
    #18 0xf6c05e26 in QApplication::exec () at kernel/qapplication.cpp:3719
    #19 0x080b81b2 in main (argc=2, argv=0xffba6214) at /users/leess/ws/91-00250/var/PC/src/main.cpp:74@

    1 Reply Last reply
    0
    • L Offline
      L Offline
      loladiro
      wrote on 15 Jul 2011, 09:22 last edited by
      #2

      You could set a conditional breakpoint on "QCoreApplication::postEvent":http://doc.qt.nokia.com/latest/qcoreapplication.html#postEvent checking for receiver=0, event_type=0, etc. . If you need more information as to what exactly happened, you could have a look at "reverse debugging":http://www.gnu.org/software/gdb/news/reversible.html

      EDIT: fixed second link

      1 Reply Last reply
      0

      1/2

      15 Jul 2011, 04:45

      • Login

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