Why QT C++ application get crash ?
-
when my code is reach to destructor of QmlEngineUtility it get crash .
QmlEngineUtility::~QmlEngineUtility { }
Below i written the stack and break point output:
1 QThreadStorageData::get() const 0x7ffff3eb952b 2 QOpenGLContext::currentContext() 0x7ffff49af988 3 QSurface::~QSurface() 0x7ffff497bb4c 4 QWindow::~QWindow() 0x7ffff497994f 5 QQuickWindow::~QQuickWindow() 0x7ffff785bb54 6 QQmlPrivate::QQmlElement<QQuickWindowQmlImpl>::~QQmlElement() 0x7fffd200677d 7 QQmlApplicationEnginePrivate::cleanUp() 0x7ffff5ce014e 8 QQmlApplicationEngine::~QQmlApplicationEngine() 0x7ffff5ce0198 9 QQmlApplicationEngine::~QQmlApplicationEngine() 0x7ffff5ce01b9 10 QtSharedPointer::CustomDeleter<QQmlApplicationEngine, QtSharedPointer::NormalDeleter>::execute qsharedpointer_impl.h 187 0x404387 11 QtSharedPointer::ExternalRefCountWithCustomDeleter<QQmlApplicationEngine, QtSharedPointer::NormalDeleter>::deleter qsharedpointer_impl.h 205 0x4041bb 12 QtSharedPointer::ExternalRefCountData::destroy qsharedpointer_impl.h 149 0x403c7d 13 QSharedPointer<QQmlApplicationEngine>::deref qsharedpointer_impl.h 458 0x4042bc 14 QSharedPointer<QQmlApplicationEngine>::deref qsharedpointer_impl.h 453 0x4040b4 15 QSharedPointer<QQmlApplicationEngine>::~QSharedPointer qsharedpointer_impl.h 310 0x403e14 16 QmlEngineUtility::~QmlEngineUtility QmlEngineUtility.cpp 27 0x40ab1a 17 __run_exit_handlers 0x7ffff74621e6
-
@Qt-embedded-developer said in Why QT C++ application get crash ?:
QSharedPointer<QQmlApplicationEngine>::~QSharedPointer
You were informed about the problems when using automatic pointers with Qt objects in your last question: https://forum.qt.io/topic/154869/what-is-difference-between-std-unique_ptr-v-s-std-make_unique?_=1709130823393
-
@Qt-embedded-developer Can you show an absolutely minimal example of your code which produces this?
-
-
@Qt-embedded-developer said in Why QT C++ application get crash ?:
QSharedPointer<QQmlApplicationEngine>::~QSharedPointer
You were informed about the problems when using automatic pointers with Qt objects in your last question: https://forum.qt.io/topic/154869/what-is-difference-between-std-unique_ptr-v-s-std-make_unique?_=1709130823393
-