Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
None
-
6.5.6, 6.7.2
-
-
2024wk32s2FOQtforAndroid
Description
A crash occurs when QNativeInterface::QAndroidApplication::context() is invoked from a library on Android if there's a mismatch in Qt versions between the library (using Qt 6.5.6) and the application (using Qt 6.7.2).
To illustrate, I created a lightweight example where QtAndroidLibraryWrapper is built with Qt 6.5.6. If an application, such as TestAndroidLibraryWrapper, is built with 6.7.2 and invokes a function from this library that in turn calls QNativeInterface::QAndroidApplication::context(), the application crashes as demonstrated by the attached call stack.
However, direct calls to QNativeInterface::QAndroidApplication::context() from the application, regardless of the Qt version, do not lead to crashes. Similarly, if both the library and the application are compiled with the same version of Qt, the call proceeds without issues.
The issue specifically arises when a library compiled with Qt 6.5.6 is used by an application compiled with Qt 6.7.2, leading to a crash upon calling QNativeInterface::QAndroidApplication::context().
The library and application were both compiled for arm64-v8a architecture when I discovered this. I can't attach a zip of the repro as it is too large (~90MB), here is a repo link: https://github.com/bri12415/QtAndroidLibraryWrapper
Attachments
Issue Links
- mentioned in
-
Page Loading...