Segmentation fault in qqmltypewrapper.cpp after upgrading to Qt 5.10
-
We have code which has been running on our systems using Qt 5.4.3 on an ARM processor for several years. We now need to upgrade to Qt5.10 and the same software compiled on the new toolchain generates segmentation fault errors within the qt libraries. The qt libraries and toolchain are built from yocto. The segmentation error occurs within qqmltypewrapper.cpp.
The crash occurs consistently with the same course of user interaction and seems to come immediately after a stackView.push command, which loads a sequence of qml files. Oddly, exactly the same code runs fine once, but crashes the second time it's run.
Can anyone guide me how to find what's causing a crash within qt libraries?
-
@debian I can run gdb, but that only tells me where in the Qt libraries it's crashing. It doesn't show what it is in the qml code that Qt doesn't like.
-
The stack trace leads back thrugh 40 calls within the Qt libraries to the CGuiApplication::exec() command which starts the qml application engine. I assume the problem must be in the qml code which the engine loads, but the stack trace doesn't show where. I can narrow down the qml files which are loaded when the crash occurs, but there is a lot of qml code and a lot of links back to properties and data objects in the C++ code, so identifying the source is like a needle in a haystack. Surely if there's a fault in the qml code, Qt should generate a fault, not just crash? I tried to attach a screenshot below showing the location of the crash and the call stack.
