Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.10.1
-
None
-
Alpine Linux 3.7
-
5d3ce3a64090ccd3c38b235edf6228f41d003274
Description
The QmlTestRunner crashes when performing the following, UI related test:
import QtQuick 2.3 import QtTest 1.0 TestCase { name: "ModuleImportTest" id: parent function test_load_ZZZZZDeveloperView() { var item = createTemporaryQmlObject(" import QtQuick 2.0; import Governikus.DeveloperView 1.0; DeveloperView {} ", parent); item.destroy(); } }
The QmlTestRunner is invoked like this:
/home/governikus/workspace/JM_default_Review_Linux/Compiler/g++/build/test/qml/QmlTestRunner -platform offscreen -vs -nocrashhandler -input /home/governikus/workspace/JM_default_Review_Linux/Compiler/g++/source/test/qml/test_module_imports.qml -import /home/governikus/workspace/JM_default_Review_Linux/Compiler/g++/source/resources/qml -file-selector android
The cause of the crash is a null pointer dereference since there is no $DISPLAY in the environment:
#0 QOffscreenX11Connection::QOffscreenX11Connection (this=0x55d61b0d1c60) at qoffscreenintegration_x11.cpp:84 displayName = {d = 0x7f4ab9a89500 <QArrayData::shared_null>} display = 0x0 #1 0x00007f4ab56a9268 in QOffscreenX11Integration::createPlatformOpenGLContext (this=0x7f4ab68541c0, context=0x7ffdcca6f070) at qoffscreenintegration_x11.cpp:72 No locals. #2 0x00007f4ab9df972d in QOpenGLContext::create() () from /home/governikus/workspace/JM_default_Review_Linux/Compiler/g++/libs/build.jenkins/dist/lib/libQt5Gui.so.5 No symbol table info available. #3 0x00007f4ab43e88f9 in QGfxShaderBuilder::QGfxShaderBuilder (this=0x55d61b0d1a60) at qgfxshaderbuilder.cpp:69 context = <incomplete type> surface = <incomplete type> oldContext = <optimized out> oldSurface = <optimized out> #4 0x00007f4ab43e4856 in qgfxshaderbuilder_provider () at plugin.cpp:58 No locals. #5 0x00007f4ab8d69649 in QQmlType::SingletonInstanceInfo::init(QQmlEngine*) () from /home/governikus/workspace/JM_default_Review_Linux/Compiler/g++/libs/build.jenkins/dist/lib/libQt5Qml.so.5 No symbol table info available. #6 0x00007f4ab8dd7077 in QV4::QQmlTypeWrapper::get(QV4::Managed const*, QV4::String*, bool*) () from /home/governikus/workspace/JM_default_Review_Linux/Compiler/g++/libs/build.jenkins/dist/lib/libQt5Qml.so.5 No symbol table info available. #7 0x00007f4ab8d2fe46 in QV4::Runtime::method_callProperty(QV4::ExecutionEngine*, int, QV4::CallData*) () from /home/governikus/workspace/JM_default_Review_Linux/Compiler/g++/libs/build.jenkins/dist/lib/libQt5Qml.so.5 No symbol table info available. #8 0x00007f4ab43d7598 in ?? () No symbol table info available. #9 0x0000000000000000 in ?? () No symbol table info available.
The QmlTestRunner crashes when performing the following, UI related test:
import QtQuick 2.3 import QtTest 1.0 TestCase { name: "ModuleImportTest" id: parent function test_load_ZZZZZDeveloperView() { var item = createTemporaryQmlObject(" import QtQuick 2.0; import Governikus.DeveloperView 1.0; DeveloperView {} ", parent); item.destroy(); } }
The QmlTestRunner is invoked like this:
/home/governikus/workspace/JM_default_Review_Linux/Compiler/g++/build/test/qml/QmlTestRunner -platform offscreen -vs -nocrashhandler -input /home/governikus/workspace/JM_default_Review_Linux/Compiler/g++/source/test/qml/test_module_imports.qml -import /home/governikus/workspace/JM_default_Review_Linux/Compiler/g++/source/resources/qml -file-selector android
The cause of the crash is a null pointer dereference since there is no $DISPLAY in the environment:
#0 QOffscreenX11Connection::QOffscreenX11Connection (this=0x55d61b0d1c60) at qoffscreenintegration_x11.cpp:84 displayName = {d = 0x7f4ab9a89500 <QArrayData::shared_null>} display = 0x0 #1 0x00007f4ab56a9268 in QOffscreenX11Integration::createPlatformOpenGLContext (this=0x7f4ab68541c0, context=0x7ffdcca6f070) at qoffscreenintegration_x11.cpp:72 No locals. #2 0x00007f4ab9df972d in QOpenGLContext::create() () from /home/governikus/workspace/JM_default_Review_Linux/Compiler/g++/libs/build.jenkins/dist/lib/libQt5Gui.so.5 No symbol table info available. #3 0x00007f4ab43e88f9 in QGfxShaderBuilder::QGfxShaderBuilder (this=0x55d61b0d1a60) at qgfxshaderbuilder.cpp:69 context = <incomplete type> surface = <incomplete type> oldContext = <optimized out> oldSurface = <optimized out> #4 0x00007f4ab43e4856 in qgfxshaderbuilder_provider () at plugin.cpp:58 No locals. #5 0x00007f4ab8d69649 in QQmlType::SingletonInstanceInfo::init(QQmlEngine*) () from /home/governikus/workspace/JM_default_Review_Linux/Compiler/g++/libs/build.jenkins/dist/lib/libQt5Qml.so.5 No symbol table info available. #6 0x00007f4ab8dd7077 in QV4::QQmlTypeWrapper::get(QV4::Managed const*, QV4::String*, bool*) () from /home/governikus/workspace/JM_default_Review_Linux/Compiler/g++/libs/build.jenkins/dist/lib/libQt5Qml.so.5 No symbol table info available. #7 0x00007f4ab8d2fe46 in QV4::Runtime::method_callProperty(QV4::ExecutionEngine*, int, QV4::CallData*) () from /home/governikus/workspace/JM_default_Review_Linux/Compiler/g++/libs/build.jenkins/dist/lib/libQt5Qml.so.5 No symbol table info available. #8 0x00007f4ab43d7598 in ?? () No symbol table info available. #9 0x0000000000000000 in ?? () No symbol table info available.
The tested QML component can be viewed here: https://github.com/Governikus/AusweisApp2/blob/community/resources/qml/Governikus/DeveloperView/DeveloperView.qml
In Order to load the correct QML components, the QmlTestRunner is build with the not-yet-release file selector patch from change I556ad7211ed4a0881150686270a9a4e69f68d1ee .