Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-21087

[Reg 4.7 -> 4.8] Qt Creator crashes when debugging with expression evaluator present

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: Qt Creator 4.8.0-beta1
    • Fix Version/s: Qt Creator 4.8.0-beta1
    • Component/s: Debugger
    • Labels:
      None
    • Environment:
      Debian testing, GDB 8.1
      Windows 7, GDB 7.10 for MinGW 5.3.0
    • Platform/s:
      Linux/X11, Windows

      Description

      With Qt Creator built from the current master branch (as of commit 70fdbedbd8a8a4e00ef4e9ad282063115921a752), Qt Creator crashes on the attempt to start debugging when an expression evaluator has been set.

       Steps to reproduce:

      1) create a new project, e.g. Qt Console Application
      2) start debugging the auto-generated project -> the "Locals" and "Expressions" tabs are displayed in the debugger view
      3) switch to the "Expressions" view and double click to insert an expression
      4) insert an expression, e.g. just "1"
      5) abort/stop the current debugging session
      6) start debugging again

      Result: Qt Creator crashes
      Expected result: Debugging should start again.

      GDB backtrace:

      Thread 1 "qtcreator" received signal SIGSEGV, Segmentation fault.
      std::__atomic_base<int>::load (__m=std::memory_order_relaxed, this=0x6e006100530024) at /usr/include/c++/8/bits/atomic_base.h:396
      396             return __atomic_load_n(&_M_i, __m);
      (gdb) bt
      #0  std::__atomic_base<int>::load (__m=std::memory_order_relaxed, this=0x6e006100530024) at /usr/include/c++/8/bits/atomic_base.h:396
      #1  QAtomicOps<int>::load<int> (_q_value=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qatomic_cxx11.h:227
      #2  0x00007fffdd9417a4 in QBasicAtomicInteger<int>::load (this=0x6e006100530024) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qbasicatomic.h:103
      #3  0x00007fffdd944d41 in QWeakPointer<QObject>::data (this=0x5555588c3e80) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qsharedpointer_impl.h:569
      #4  0x00007fffdd9529fa in QPointer<QWidget>::data (this=0x5555588c3e80) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qpointer.h:86
      #5  0x00007fffdd97db00 in QPointer<QWidget>::operator-> (this=0x5555588c3e80) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qpointer.h:88
      #6  0x00007fffdd96c843 in Debugger::Internal::DebuggerEngine::updateLocalsWindow (this=0x55555abf7400, showReturn=false) at debuggerengine.cpp:841
      #7  0x00007fffdda39460 in Debugger::Internal::WatchHandler::updateLocalsWindow (this=0x55555b279520) at watchhandler.cpp:2388
      #8  0x00007fffdda37377 in Debugger::Internal::WatchHandler::watchExpression (this=0x55555b279520, exp=..., name=..., temporary=false) at watchhandler.cpp:2202
      #9  0x00007fffdda39657 in Debugger::Internal::WatchHandler::loadSessionDataForEngine (this=0x55555b279520) at watchhandler.cpp:2413
      #10 0x00007fffdda35f4c in Debugger::Internal::WatchHandler::WatchHandler (this=0x55555b279520, engine=0x55555abf7400) at watchhandler.cpp:1977
      #11 0x00007fffdd97a1a2 in Debugger::Internal::DebuggerEnginePrivate::DebuggerEnginePrivate (this=0x55555b2791c0, engine=0x55555abf7400) at debuggerengine.cpp:281
      #12 0x00007fffdd96c26c in Debugger::Internal::DebuggerEngine::DebuggerEngine (this=0x55555abf7400) at debuggerengine.cpp:786
      #13 0x00007fffddad7c74 in Debugger::Internal::CppDebuggerEngine::CppDebuggerEngine (this=0x55555abf7400) at ../../plugins/debugger/debuggerengine.h:532
      #14 0x00007fffddaa0c48 in Debugger::Internal::GdbEngine::GdbEngine (this=0x55555abf7400) at gdb/gdbengine.cpp:140
      #15 0x00007fffddac7c10 in Debugger::Internal::createGdbEngine () at gdb/gdbengine.cpp:4848
      #16 0x00007fffdd9d960f in Debugger::DebuggerRunTool::start (this=0x555558a39050) at debuggerruncontrol.cpp:578
      #17 0x00007fffdee585fe in ProjectExplorer::RunWorker::initiateStart (this=0x555558a39050) at runconfiguration.cpp:1872
      #18 0x00007fffdee6aaee in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (ProjectExplorer::RunWorker::*)()>::call(void (ProjectExplorer::RunWorker::*)(), ProjectExplorer::RunWorker*, void**) (
          f=(void (ProjectExplorer::RunWorker::*)(ProjectExplorer::RunWorker * const)) 0x7fffdee5853e <ProjectExplorer::RunWorker::initiateStart()>, o=0x555558a39050, arg=0x7fffffffcfb0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:134
      #19 0x00007fffdee69e18 in QtPrivate::FunctionPointer<void (ProjectExplorer::RunWorker::*)()>::call<QtPrivate::List<>, void>(void (ProjectExplorer::RunWorker::*)(), ProjectExplorer::RunWorker*, void**) (
          f=(void (ProjectExplorer::RunWorker::*)(ProjectExplorer::RunWorker * const)) 0x7fffdee5853e <ProjectExplorer::RunWorker::initiateStart()>, o=0x555558a39050, arg=0x7fffffffcfb0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:167
      #20 0x00007fffdee68706 in QtPrivate::QSlotObject<void (ProjectExplorer::RunWorker::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x555558751d20, r=0x555558a39050, a=0x7fffffffcfb0, ret=0x0)
          at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:396
      #21 0x00007ffff6c81586 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
      #22 0x00007ffff6c7602b in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
      #23 0x00007ffff77564a1 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
      #24 0x00007ffff775dae0 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
      #25 0x00007ffff6c4c579 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
      #26 0x00007ffff6c9d638 in QTimerInfoList::activateTimers() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
      #27 0x00007ffff6c9de94 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
      #28 0x00007ffff4d33287 in g_main_context_dispatch () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
      #29 0x00007ffff4d334c0 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
      #30 0x00007ffff4d3354c in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
      #31 0x00007ffff6c9e223 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
      #32 0x00007ffff2082e51 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
      #33 0x00007ffff6c4b24b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
      #34 0x00007ffff6c533c2 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
      #35 0x0000555555565ee6 in main (argc=1, argv=0x7fffffffdeb8) at main.cpp:627
      
      

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              orgads Orgad Shaneh
              Reporter:
              michaelweghorn Michael Weghorn
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes