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

Coffee example crashes at startup in debug when Qt Creator is attached

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • None
    • 6.3.1
    • QML: Tooling
    • Windows 11 (x64). Qt Creator 7.0.2.
    • Windows

    Description

      The "Coffee Machine Example" project is crashing at startup in debug mode if Qt Creator is attached.

      Steps to reproduce on Windows:

      • From Qt Creator 7.0.2 open the "Coffe Machine Example"
      • Build in debug mode using Qt 6.3.1.
      • Start with debugger attached (press "arrow with bug" button).
      • Observe ASSERT: "this->isMutable() || b == e" in file C:\Users\qt\work\qt\qtbase\include\QtCore\../../src/corelib/tools/qarraydataops.h, line 320
      20:19:10: Debugging C:\Qt\Examples\Qt-6.3.1\demos\build-coffee-Desktop_Qt_6_3_1_MSVC2019_64bit-Debug\debug\coffee.exe "-qmljsdebugger=port:51685,block,services:DebugMessages,QmlDebugger,V8Debugger,QmlInspector,DebugTranslation" ...
      onecore\net\netprofiles\service\src\nsp\dll\namespaceserviceprovider.cpp(550)\nlansp_c.dll!00007FFBA079C759: (caller: 00007FFBE172388E) LogHr(1) tid(990) 8007277C No such service is known. The service cannot be found in the specified name space.
      QML Debugger: Waiting for connection on port 51685...
      onecore\net\netprofiles\service\src\nsp\dll\namespaceserviceprovider.cpp(550)\nlansp_c.dll!00007FFBA079C759: (caller: 00007FFBE172388E) LogHr(2) tid(990) 8007277C No such service is known. The service cannot be found in the specified name space.
      mincore\com\oleaut32\dispatch\ups.cpp(2126)\OLEAUT32.dll!00007FFBE2EF1924: (caller: 00007FFBE2EF1A5A) ReturnHr(1) tid(4208) 8002801D Library not registered.
      ASSERT: "this->isMutable() || b == e" in file C:\Users\qt\work\qt\qtbase\include\QtCore\../../src/corelib/tools/qarraydataops.h, line 320
      Debug Error!
      
      Program: C:\Qt\6.3.1\msvc2019_64\bin\Qt6Cored.dll
      Module: 6.3.1
      File: C:\Users\qt\work\qt\qtbase\include\QtCore\../../src/corelib/tools/qarraydataops.h
      Line: 320
      
      ASSERT: "this->isMutable() || b == e" in file C:\Users\qt\work\qt\qtbase\include\QtCore\../../src/corelib/tools/qarraydataops.h, line 320
      
      (Press Retry to debug the application)
      

      Call stack:
      1 qt_message_fatal qlogging.cpp 1873 0x7ffb8f674784
      2 QMessageLogger::fatal qlogging.cpp 882 0x7ffb8f672c28
      3 qt_assert qglobal.cpp 3304 0x7ffb8f65fb69
      4 QtPrivate::QGenericArrayOps<QString>::copyAppend qarraydataops.h 321 0x7ffb905679eb
      5 QArrayDataPointer<QString>::reallocateAndGrow qarraydatapointer.h 240 0x7ffb9056d022
      6 QArrayDataPointer<QString>::detach qarraydatapointer.h 167 0x7ffb90568734
      7 QList<QString>::detach qlist.h 437 0x7ffb90568860
      8 QList<QString>::begin qlist.h 623 0x7ffb90566bd9
      9 QList<QString>::first qlist.h 643 0x7ffb905af926
      10 QFont::family qfont.cpp 823 0x7ffb90a8b83d
      11 QQuickFontValueType::family qquickvaluetypes.cpp 893 0x7ffb7f82f1c9
      12 QQuickFontValueType::qt_static_metacall moc_qquickvaluetypes_p.cpp 1379 0x7ffb7f82e4a0
      13 QMetaProperty::read qmetaobject.cpp 3265 0x7ffb8f78d9e9
      14 QQmlWatchProxy::notifyValueChanged qqmlwatcher.cpp 112 0x7ffbb7c11014
      15 QQmlWatcher::addPropertyWatch qqmlwatcher.cpp 179 0x7ffbb7c10b2e
      16 QQmlWatcher::addWatch qqmlwatcher.cpp 128 0x7ffbb7c1061a
      17 QQmlEngineDebugServiceImpl::processMessage qqmlenginedebugservice.cpp 574 0x7ffbb7bea9ea
      18 QtPrivate::FunctorCall<QtPrivate::IndexesList<0>,QtPrivate::List<QByteArray const &>,void,void (__cdecl QQmlEngineDebugServiceImpl:: *)(QByteArray const &)>::call qobjectdefs_impl.h 171 0x7ffbb7c04643
      19 QtPrivate::FunctionPointer<void (__cdecl QQmlEngineDebugServiceImpl:: *)(QByteArray const &)>::call<QtPrivate::List<QByteArray const &>,void> qobjectdefs_impl.h 209 0x7ffbb7bf5cd8
      20 QtPrivate::QSlotObject<void (__cdecl QQmlEngineDebugServiceImpl:: *)(QByteArray const &),QtPrivate::List<QByteArray const &>,void>::impl qobjectdefs_impl.h 420 0x7ffbb7c098f2
      21 QtPrivate::QSlotObjectBase::call qobjectdefs_impl.h 399 0x7ffb8f798383
      22 QMetaCallEvent::placeMetaCall qobject.cpp 624 0x7ffb8f82ff91
      23 QObject::event qobject.cpp 1356 0x7ffb8f825ad6
      24 QCoreApplicationPrivate::notify_helper qcoreapplication.cpp 1234 0x7ffb8f75d8a2
      25 doNotify qcoreapplication.cpp 1163 0x7ffb8f7601a3
      26 QCoreApplication::notify qcoreapplication.cpp 1147 0x7ffb8f75a1d8
      27 QGuiApplication::notify qguiapplication.cpp 1956 0x7ffb906604ef
      28 QCoreApplication::notifyInternal2 qcoreapplication.cpp 1067 0x7ffb8f75c1b7
      29 QCoreApplication::sendEvent qcoreapplication.cpp 1484 0x7ffb8f75985b
      30 QCoreApplicationPrivate::sendPostedEvents qcoreapplication.cpp 1845 0x7ffb8f75e534
      31 QEventDispatcherWin32::sendPostedEvents qeventdispatcher_win.cpp 906 0x7ffb8fb794ef
      32 QWindowsGuiEventDispatcher::sendPostedEvents qwindowsguieventdispatcher.cpp 80 0x7ffb90d679d5
      33 QEventDispatcherWin32::processEvents qeventdispatcher_win.cpp 476 0x7ffb8fb777ef
      34 QWindowsGuiEventDispatcher::processEvents qwindowsguieventdispatcher.cpp 72 0x7ffb90d6798b
      35 QEventLoop::processEvents qeventloop.cpp 137 0x7ffb8f781aec
      36 QEventLoop::exec qeventloop.cpp 218 0x7ffb8f781dd4
      37 QCoreApplication::exec qcoreapplication.cpp 1388 0x7ffb8f7595fa
      38 QGuiApplication::exec qguiapplication.cpp 1888 0x7ffb9066047a
      39 main main.cpp 64 0x7ff6537829f1
      40 WinMain qtentrypoint_win.cpp 97 0x7ff653785812
      41 invoke_main exe_common.inl 107 0x7ff653783cf2
      42 __scrt_common_main_seh exe_common.inl 288 0x7ff653783bde
      43 __scrt_common_main exe_common.inl 331 0x7ff653783a9e
      44 WinMainCRTStartup exe_winmain.cpp 17 0x7ff653783d8e
      45 BaseThreadInitThunk KERNEL32 0x7ffbe1dd54e0
      46 RtlUserThreadStart ntdll 0x7ffbe378485b

      Interesting observation: The crash does not occur if starting the application in debug mode using the "play" button. Maybe the problem therefore reside in Qt Creator?

      Attachments

        Issue Links

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

          Activity

            People

              sami.shalayel Sami Shalayel
              forderud Fredrik Orderud
              Votes:
              3 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes