Qt Creator macOS lldb ENGINE RUN FAILED
-
Hello, I cannot seem to get the debugger to work on Qt Creator on macOS for whatever reason when I set the project to run in the terminal. Even for a simple C++ hello world application. I've tried finding what I can online but to no avail with the same error besides another forum post here which is unresolved.
https://forum.qt.io/topic/134263/debugger-fails-to-start-up-with-engine-run-failed
I'm running a MacBook Air with M1 processor and I am wondering if anyone else with such runs into the same problem or has found a solution for it. I am using the following if it's relevant:
Qt 6.5.2 for macOS
Qt Creator 11.0.2
Xcode 14.3.1I've tried lldb at locations /usr/bin/lldb and /Library/Developer/CommandLineTools/usr/bin/lldb in the kit configuration but got the same error.
The complete debugger log:
dStart parameters: 'test' mode: 1 dABI: arm-darwin-generic-mach_o-64bit dLanguages: c++ dExecutable: /Users/andreshung/Projects/playground/build-test-Qt_6_5_2_for_macOS-Debug/test [terminal] dDirectory: /Users/andreshung/Projects/playground/build-test-Qt_6_5_2_for_macOS-Debug dDebugger: /usr/bin/lldb dProject: /Users/andreshung/Projects/playground/test dAdditional Search Directories: dSysroot: dDebug Source Location: /usr/src/debug/qt5base/src/corelib:/usr/src/debug/qt5base/src/gui:/usr/src/debug/qt5base/src/network dDebugger settings: d/AdditionalArguments: (default: ) d/AdjustBreakpointLocations: true (default: true) d/AlwaysAdjustColumnWidths: true (default: true) d/AutoDerefPointers: true (default: true) d/AutoEnrichParameters: true (default: true) d/BreakEvent: (default: ) d/BreakOnAbort: false (default: false) d/BreakOnCatch: false (default: false) d/BreakOnCrtDbgReport: false (default: false) d/BreakOnFatal: false (default: false) d/BreakOnThrow: false (default: false) d/BreakOnWarning: false (default: false) d/BreakpointCorrection: true (default: true) d/BreakpointsFullPath: false (default: false) d/CDB_Console: false (default: false) d/CloseBuffersOnExit: false (default: false) d/CloseMemoryBuffersOnExit: true (default: true) d/DefaultArraySize: 100 (default: 100) d/DisplayStringLimit: 300 (default: 300) d/EnableReverseDebugging: false (default: false) d/ExtraDumperFile: (default: ) d/FirstChanceExceptionTaskEntry: true (default: true) d/FontSizeFollowsEditor: false (default: false) d/ForceLoggingToConsole: false (default: false) d/GdbCustomDumperCommands: (default: ) d/GdbPostAttachCommands: (default: ) d/GdbStartupCommands: (default: ) d/IgnoreFirstChanceAccessViolation: false (default: false) d/IntelFlavor: false (default: false) d/LoadGdbDumpers2: false (default: false) d/LoadGdbInit: true (default: true) d/LogTimeStamps: false (default: false) d/MaximalStackDepth: 20 (default: 20) d/MaximalStringLength: 10000 (default: 10000) d/MultiInferior: false (default: false) d/RaiseOnInterrupt: true (default: true) d/SecondChanceExceptionTaskEntry: true (default: true) d/ShowQObjectNames2: true (default: true) d/ShowQmlObjectTree: true (default: true) d/ShowQtNamespace: true (default: true) d/ShowStandardNamespace: true (default: true) d/ShowThreadNames: false (default: false) d/SkipKnownFrames: false (default: false) d/SortStructMembers: true (default: true) d/SourcePaths: (default: ) d/StationaryEditorWhileStepping: false (default: false) d/SwitchModeOnExit: false (default: false) d/SymbolPaths: (default: ) d/TargetAsync: false (default: false) d/UseAlternatingRowColours: false (default: false) d/UseAnnotations: true (default: true) d/UseCodeModel: true (default: true) d/UseDebuggingHelper: true (default: true) d/UseDynamicType: true (default: true) d/UseIndexCache: true (default: true) d/UseMessageBoxForSignals: true (default: true) d/UsePseudoTracepoints: true (default: true) d/UsePythonDumper: true (default: true) d/UseToolTips: true (default: true) d/UseToolTipsInBreakpointsView: false (default: false) d/UseToolTipsInLocalsView: false (default: false) d/UseToolTipsInStackView: true (default: true) d/WarnOnReleaseBuilds: true (default: true) d/WatchdogTimeout: 20 (default: 20) dState changed from DebuggerNotReady(0) to EngineSetupRequested(1) dCALL: SETUP ENGINE dSTARTING LLDB: /usr/bin/lldb Setting up inferior... <103loadDumpers({"token":103}) Attaching to 51394 (0) <104setupInferior({"attachpid":51394,"breakonmain":0,<environment suppressed>,"executable":"/Users/andreshung/Projects/playground/build-test-Qt_6_5_2_for_macOS-Debug/test","nativemixed":0,"platform":"","processargs":"","startmode":3,"symbolfile":"/Users/andreshung/Projects/playground/build-test-Qt_6_5_2_for_macOS-Debug/test","token":104,"useterminal":1,"workingdirectory":"/Users/andreshung/Projects/playground/build-test-Qt_6_5_2_for_macOS-Debug"}) <105setFallbackQtVersion({"token":105,"version":394498}) >(lldb) script sys.path.insert(1, '/Users/andreshung/Qt/Qt Creator.app/Contents/Resources/debugger') >(lldb) script from lldbbridge import * >@ >lldbversion="lldb-1403.0.17.67 >Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100)"@ >(lldb) script theDumper.loadDumpers({"token":103}) >@ >result={token="103",dumpers=[{type="QVariant (QVariantMap)",formats="17"},{type="Utils__Id"},{type="Debugger__Internal__GdbMi"},{type="Debugger__Internal__DisassemblerLine"},{type="Debugger__Internal__WatchData"},{type="Debugger__Internal__WatchItem"},{type="Debugger__Internal__BreakpointModelId"},{type="Debugger__Internal__ThreadId"},{type="CPlusPlus__ByteArrayRef"},{type="CPlusPlus__Identifier"},{type="CPlusPlus__Symbol"},{type="CPlusPlus__Class"},{type="CPlusPlus__IntegerType"},{type="CPlusPlus__FullySpecifiedType"},{type="CPlusPlus__NamedType"},{type="CPlusPlus__PointerType"},{type="CPlusPlus__TemplateNameId"},{type="CPlusPlus__QualifiedNameId"},{type="CPlusPlus__Literal"},{type="CPlusPlus__StringLiteral"},{type="CPlusPlus__Internal__Value"},{type="Utils__FilePath"},{type="Utils__FileName"},{type="Utils__ElfSection"},{type="Utils__Port"},{type="Utils__DictKey"},{type="Utf8String"},{type="CPlusPlus__Token"},{type="CPlusPlus__Internal__PPToken"},{type="ProString"},{type="ProKey"},{type="Core__GeneratedFile"},{type="ProjectExplorer__ProjectNode"},{type="CMakeProjectManager__Internal__CMakeProjectNode"},{type="QmakeProjectManager__QmakePriFileNode"},{type="QmakeProjectManager__QmakeProFileNode"},{type="std__array",formats="16"},{type="std__complex"},{type="std__once_flag"},{type="std__unique_ptr"},{type="std____1__array",formats="16"},{type="std____1__complex"},{type="std____1__deque"},{type="std____1__list"},{type="std____1__set"},{type="std____1__multiset"},{type="std____1__map",formats="17"},{type="std____1__multimap",formats="17"},{type="std____1__map__iterator"},{type="std____1__map__const_iterator"},{type="std____1__set__iterator"},{type="std____1__set_const_iterator"},{type="std____1__stack"},{type="std____1__string"},{type="std____1__wstring"},{type="std____1__basic_string"},{type="std____1__shared_ptr"},{type="std____1__weak_ptr"},{type="std____1__unique_ptr"},{type="std____1__unordered_map",formats="17"},{type="std____1__unordered_set"},{type="std____1__unordered_multiset"},{type="std____1__valarray",formats="16"},{type="std____1__vector",formats="16"},{type="std____1__once_flag"},{type="std____1__variant"},{type="std____1__optional"},{type="std____1__tuple"},{type="std__function"},{type="std__deque"},{type="std____debug__deque"},{type="std__list"},{type="std__list__QNX"},{type="std____debug__list"},{type="std____cxx11__list"},{type="std__map",formats="17"},{type="std____debug__map"},{type="std____debug__set"},{type="std__multiset"},{type="std____cxx1998__map"},{type="std__multimap",formats="17"},{type="std___Rb_tree_iterator"},{type="std___Rb_tree_const_iterator"},{type="std__map__iterator"},{type="__gnu_debug___Safe_iterator"},{type="std__map__const_iterator"},{type="std__set__iterator"},{type="std__set__const_iterator"},{type="std____cxx1998__set"},{type="std___Tree_const_iterator"},{type="std___Tree_iterator"},{type="std__set"},{type="std__set__QNX"},{type="std__stack"},{type="std____debug__stack"},{type="std__string",editable="true",formats="5, 6, 7, 8"},{type="std____weak_ptr"},{type="std__weak_ptr"},{type="std__shared_ptr"},{type="std__pair"},{type="std__unordered_map",formats="17"},{type="std____debug__unordered_map",formats="17"},{type="std__unordered_multimap",formats="17"},{type="std____debug__unordered_multimap",formats="17"},{type="std__unordered_set"},{type="std____debug__unordered_set"},{type="std__unordered_multiset"},{type="std____debug__unordered_multiset"},{type="std__valarray",formats="16"},{type="std__variant"},{type="std__vector",editable="true",formats="16"},{type="std____debug__vector",formats="16"},{type="std__initializer_list"},{type="string",editable="true"},{type="std__wstring",editable="true",formats="2, 4"},{type="std__basic_string"},{type="std____cxx11__basic_string"},{type="std____cxx11__string",editable="true",formats="5, 6, 7, 8"},{type="std____cxx11__wstring",editable="true",formats="2, 4"},{type="wstring",editable="true"},{type="__gnu_cxx__hash_set"},{type="uint8_t"},{type="int8_t"},{type="std__byte"},{type="std__optional"},{type="std__experimental__optional"},{type="std____ndk1__array",formats="16"},{type="std____ndk1__complex"},{type="std____ndk1__deque"},{type="std____ndk1__list"},{type="std____ndk1__set"},{type="std____ndk1__multiset"},{type="std____ndk1__map",formats="17"},{type="std____ndk1__multimap",formats="17"},{type="std____ndk1__map__iterator"},{type="std____ndk1__map__const_iterator"},{type="std____ndk1__set__iterator"},{type="std____ndk1__set_const_iterator"},{type="std____ndk1__stack"},{type="std____ndk1__string"},{type="std____ndk1__wstring"},{type="std____ndk1__basic_string"},{type="std____ndk1__shared_ptr"},{type="std____ndk1__weak_ptr"},{type="std____ndk1__unique_ptr"},{type="std____ndk1__unordered_map",formats="17"},{type="std____ndk1__unordered_set"},{type="std____ndk1__unordered_multiset"},{type="std____ndk1__valarray",formats="16"},{type="std____ndk1__vector",formats="16"},{type="std____ndk1__once_flag"},{type="cv__Size_"},{type="cv__Mat",formats="4"},{type="boost__bimaps__bimap"},{type="boost__optional"},{type="boost__shared_ptr"},{type="boost__container__list"},{type="boost__container__vector",formats="16"},{type="boost__container__static_vector",formats="16"},{type="boost__container__small_vector",formats="16"},{type="boost__gregorian__date"},{type="boost__posix_time__ptime"},{type="boost__posix_time__time_duration"},{type="boost__unordered__unordered_set"},{type="boost__variant"},{type="boost__container__devector"},{type="__m128"},{type="__m256"},{type="__m512"},{type="__m128d"},{type="__m256d"},{type="__m512d"},{type="__m128i"},{type="__m256i"},{type="__m512i"},{type="gsl__span"},{type="gsl__byte"},{type="Eigen__Matrix"},{type="NimStringDesc"},{type="NimGenericSequence__"},{type="TNimNode"},{type="KDSoapValue1"},{type="KDSoapValue"},{type="WTF__String"},{type="PyTypeObject"},{type="_typeobject"},{type="PyObject"},{type="PyVarObject"},{type="QtcDumperTest_FieldAccessByIndex"},{type="QtcDumperTest_PointerArray"},{type="QtcDumperTest_BufArray"},{type="QtcDumperTest_List__NodeX"},{type="QtcDumperTest_List"},{type="QtcDumperTest_String"},{type="QAtomicInt"},{type="QBasicAtomicInt"},{type="QAtomicPointer"},{type="QByteArray",editable="true",formats="5, 6, 7, 8"},{type="QBitArray"},{type="QChar"},{type="Qt__ItemDataRole"},{type="QStandardItemData"},{type="QStandardItem"},{type="QDate"},{type="QTime"},{type="QTimeZone"},{type="QDateTime"},{type="QDir"},{type="QEvent"},{type="QKeyEvent"},{type="QKeySequence"},{type="QFile"},{type="QFileInfo"},{type="QFixed"},{type="QFiniteStack",formats="16"},{type="QFlags"},{type="QHash",formats="17"},{type="QVariantHash"},{type="QHashNode",formats="17"},{type="QHash__const_iterator"},{type="QHash__iterator"},{type="QHostAddress"},{type="QIPv6Address"},{type="QList",formats="18, 19"},{type="QVariantList"},{type="QImage",formats="2, 4"},{type="QLinkedList"},{type="QLocale"},{type="QMapNode"},{type="QMap",formats="17"},{type="QMultiMap",formats="17"},{type="QVariantMap",formats="17"},{type="QMetaMethod"},{type="QMetaEnum"},{type="QMetaProperty"},{type="QMetaClassInfo"},{type="QMetaObject"},{type="QPair"},{type="QProcEnvKey"},{type="QPixmap"},{type="QMargins"},{type="QPoint"},{type="QPointF"},{type="QRect"},{type="QRectF"},{type="QRegExp"},{type="QRegion"},{type="QScopedPointer"},{type="QSet"},{type="QSharedData"},{type="QSharedDataPointer"},{type="QSize"},{type="QSizeF"},{type="QSizePolicy__Policy"},{type="QSizePolicy"},{type="QStack",formats="16"},{type="QPolygonF"},{type="QPolygon"},{type="QGraphicsPolygonItem"},{type="QString",editable="true",formats="2, 4"},{type="QSettingsKey"},{type="QStaticStringData"},{type="QTypedArrayData"},{type="QStringData"},{type="QAnyStringView"},{type="QStringView",formats="2, 4"},{type="QHashedString"},{type="QQmlRefCount"},{type="QStringRef"},{type="QStringList"},{type="QTemporaryFile"},{type="QTextCodec"},{type="QTextCursor"},{type="QTextDocument"},{type="QUrl",formats="2, 4"},{type="QUuid"},{type="QVariant"},{type="QVector",editable="true",formats="16"},{type="QVarLengthArray"},{type="QSharedPointer"},{type="QWeakPointer"},{type="QPointer"},{type="QXmlAttributes__Attribute"},{type="QXmlAttributes"},{type="QXmlStreamStringRef"},{type="QXmlStreamAttribute"},{type="QV4__Heap__Base"},{type="QV4__Heap__String"},{type="QV4__Object"},{type="QV4__FunctionObject"},{type="QV4__CompilationUnit"},{type="QV4__CallContext"},{type="QV4__ScriptFunction"},{type="QV4__SimpleScriptFunction"},{type="QV4__ExecutionContext"},{type="QQmlSourceLocation"},{type="QV4__String"},{type="QV4__Identifier"},{type="QV4__PropertyHash"},{type="QV4__InternalClass__Transition"},{type="QV4__InternalClassTransition"},{type="QV4__SharedInternalClassData"},{type="QV4__IdentifierTable"},{type="QV4_Object"},{type="QV4__Value"},{type="QV__PropertyHashData"},{type="QV__PropertyHash"},{type="QV4__Scoped"},{type="QV4__ScopedString"},{type="QJSValue"},{type="QQmlBinding"},{type="QTJSC__JSValue"},{type="QScriptValue"},{type="QQmlAccessorProperties__Properties"},{type="QJsonPrivate__qle_bitfield"},{type="QJsonPrivate__qle_signedbitfield"},{type="QJsonPrivate__q_littleendian"},{type="QJsonValue"},{type="QJsonArray"},{type="QJsonObject"},{type="QSqlResultPrivate"},{type="QSqlField"},{type="QLazilyAllocated"},{type="qfloat16"},{type="QCborArray"},{type="QCborMap"},{type="QCborValue"},{type="QCborValue_proxy"},{type="quint16_le"},{type="quint32_le"},{type="quint64_le"},{type="quint16_be"},{type="quint32_be"},{type="quint64_be"},],python="30906"}@ >103^ >(lldb) script theDumper.setupInferior({"attachpid":51394,"breakonmain":0,"environment":["5f5f43465f555345525f544558545f454e434f44494e473d30783146353a3078303a307830","5f5f434642756e646c654964656e7469666965723d6f72672e71742d70726f6a6563742e717463726561746f72","434f4d4d414e445f4d4f44453d756e697832303033","44594c445f4652414d45574f524b5f504154483d2f55736572732f616e6472657368756e672f51742f362e352e322f6d61636f732f6c6962","44594c445f4c4942524152595f504154483d2f55736572732f616e6472657368756e672f51742f362e352e322f6d61636f732f6c6962","484f4d453d2f55736572732f616e6472657368756e67","4c4f474e414d453d616e6472657368756e67","504154483d2f55736572732f616e6472657368756e672f51742f362e352e322f6d61636f732f62696e3a2f7573722f62696e3a2f62696e3a2f7573722f7362696e3a2f7362696e","51544449523d2f55736572732f616e6472657368756e672f51742f362e352e322f6d61636f73","5348454c4c3d2f62696e2f7a7368","5353485f415554485f534f434b3d2f707269766174652f746d702f636f6d2e6170706c652e6c61756e6368642e584d7a726a705646374b2f4c697374656e657273","544d504449523d2f7661722f666f6c646572732f6d5f2f683564386a6b6a7336366e6672733076346a6a7033715f7230303030676e2f542f","555345523d616e6472657368756e67","5850435f464c4147533d307830","5850435f534552564943455f4e414d453d6170706c69636174696f6e2e6f72672e71742d70726f6a6563742e717463726561746f722e323335333939392e32333935313832"],"executable":"/Users/andreshung/Projects/playground/build-test-Qt_6_5_2_for_macOS-Debug/test","nativemixed":0,"platform":"","processargs":"","startmode":3,"symbolfile":"/Users/andreshung/Projects/playground/build-test-Qt_6_5_2_for_macOS-Debug/test","token":104,"useterminal":1,"workingdirectory":"/Users/andreshung/Projects/playground/build-test-Qt_6_5_2_for_macOS-Debug"}) >@ >result={token="104",success="1",msg="success",exe="/Users/andreshung/Projects/playground/build-test-Qt_6_5_2_for_macOS-Debug/test"}@ >(lldb) script theDumper.setFallbackQtVersion({"token":105,"version":394498}) >104^ dTAKING OWNERSHIP OF BREAKPOINT 1 <106insertBreakpoint({"address":0,"command":"","condition":"","enabled":1,"expression":"","file":"/Users/andreshung/Projects/playground/class_sep14/main.cpp","function":"","id":"","ignorecount":0,"line":14,"modelid":1,"oneshot":0,"token":106,"type":1}) dTAKING OWNERSHIP OF BREAKPOINT 8 <107insertBreakpoint({"address":0,"command":"","condition":"","enabled":1,"expression":"","file":"/Users/andreshung/Projects/playground/test/main.cpp","function":"","id":"","ignorecount":0,"line":4,"modelid":8,"oneshot":0,"token":107,"type":1}) <108executeRoundtrip({"token":108}) >(lldb) script theDumper.insertBreakpoint({"address":0,"command":"","condition":"","enabled":1,"expression":"","file":"/Users/andreshung/Projects/playground/class_sep14/main.cpp","function":"","id":"","ignorecount":0,"line":14,"modelid":1,"oneshot":0,"token":106,"type":1}) >@ >result={token="106",lldbid="1",valid="1",hitcount="0",threadid="0",oneshot="0",condition="",enabled="1",valid="1",ignorecount="0",locations=[]}@ >(lldb) script theDumper.insertBreakpoint({"address":0,"command":"","condition":"","enabled":1,"expression":"","file":"/Users/andreshung/Projects/playground/test/main.cpp","function":"","id":"","ignorecount":0,"line":4,"modelid":8,"oneshot":0,"token":107,"type":1}) >@ >result={token="107",lldbid="2",valid="1",hitcount="0",threadid="0",oneshot="0",condition="",enabled="1",valid="1",ignorecount="0",locations=[]}@ >(lldb) script theDumper.executeRoundtrip({"token":108}) >@ >result={token="108",}@ >106^ dNO LOCATIONS (YET) FOR BP Type: 0 [enabled] [pending] Hit: 0 times >107^ dNO LOCATIONS (YET) FOR BP Type: 0 [enabled] [pending] Hit: 0 times >108^ dNOTE: ENGINE SETUP OK dState changed from EngineSetupRequested(1) to EngineRunRequested(3) dCALL: RUN ENGINE Running requested... <109runEngine({"token":109}) >(lldb) script theDumper.runEngine({"token":109}) >@ >state="enginerunfailed"@ dNOTE: ENGINE RUN FAILED Run failed. dState changed from EngineRunRequested(3) to EngineRunFailed(4) dState changed from EngineRunFailed(4) to EngineShutdownRequested(14) dCALL: SHUTDOWN ENGINE dQUIT DEBUGGER REQUESTED IN STATE 14 dLLDB PROCESS ERROR: 1 dNOTE: ENGINE SHUTDOWN FINISHED dState changed from EngineShutdownRequested(14) to EngineShutdownFinished(15) Debugger finished. dState changed from EngineShutdownFinished(15) to DebuggerFinished(16)If anyone has any idea of the problem and perhaps a solution or workaround, it'd be greatly appreciated.