Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.4.1
-
None
-
-
2023wkXXFOQtforAndroid
Description
Segmentation fault error is returned on android phone using C++ standalone application when the QCoreApplication is initialized. I did changes under src/corelib/kernel/qjnienvironment.cpp and src/corelib/kernel/qjniobject.cpp files where I fixed some unchecked pointers. These fixes solved the problem and my application no more crashes. The problem appeared because the JVM is not initialized when the Qt android is used with standalone application. I provide the modified files but I am not sure that this will be the proper solution because without JVM some functionalities will be lost. Maybe needed an additional build configuration for android without JVM?
Hopefully you will provide a proper fix for this problem, in the worst case please use my fixes. Until this problem will be clarified on your side I will use my shared patches in my project.
Qt base is built with the following cmake configuration:
- -DQT_HOST_PATH=/* Host build of the qt base */
- -DFEATURE_backtrace=OFF
- -DANDROID_PLATFORM=android-30
- -DANDROID_ABI=arm64-v8a
- -DCMAKE_INSTALL_PREFIX=/* Install dir */
- -DQT_QMAKE_TARGET_MKSPEC=android-clang
- -DANDROID_SDK_ROOT=/* Android SDK */
- -DANDROID_NDK_ROOT=/* Android NDK */
- -DQT_BUILD_EXAMPLES=FALSE
- -DQT_BUILD_TESTS=FALSE
- -G 'Ninja'
Attachments
Issue Links
- relates to
-
QTBUG-107807 When building an application on Android using the android_app config then -shared is incorrectly included
- Open