[Android-development] Qt 5.3.0 Example Crashing Android Nexus 2012

Eskil Abrahamsen Blomfeldt eskil.abrahamsen-blomfeldt at digia.com
Tue May 20 09:30:58 CEST 2014


On 05/20/2014 07:30 AM, mark diener wrote:
> Is there some experts who have a knack for debugging OpenGL stuff in 
> Android.

Hi,

Would you be able to report your bug findings at, in particular the bug 
on Nexus 7? Since this is a device we test on regularly I can safely say 
it's not a known issue to us:

     http://bugreports.qt-project.org

As for the Kindle Fire bug:

On the Kindle Fire 1st Gen, there's a known issue with any project due 
to a hard limitation on the number of libraries that can be loaded in a 
single process on that device. The only known way to work around this is 
to limit the number of libraries (especially plugins) you load on Android:

     http://qt-project.org/wiki/Qt_for_Android_known_issues

The reason you are seeing it with only the Qt Quick app is linked to the 
number of libraries/plugins in use, and the fact that Qt Quick is based 
on OpenGL and OpenGL seems to dynamically load extra libraries when it 
needs them, i.e. after Qt is done loading its libraries. If it tries to 
do this at a stage where the limit has already been exhausted, it will 
fail to load the necessary library and won't be able to compile the 
fragment/vertex shaders required by Qt Quick. That's why it looks like 
an OpenGL error. With a Qt Widgets app which reaches the limit, I'd 
expect to see other effects, such as failure to load certain plugins.

We are planning to have improved ways of tailoring exactly which plugins 
are included in the future.

> Is there any guidance for Qt Quick 2.0 support below Android 4.0, like 
> Android 2.x?  Or should I just forget about it and stick with Android 
> 4.0 and above?

Qt Quick should work fine on Android 2.3 devices and up. The reason you 
are hitting problems with Qt Quick and not with Qt Widgets is something 
else, as I noted above. The current limitations are on Qt Multimedia and 
Accessibility. Certain features in these two will require newer 
versions. Running an application which uses the features on an older 
device should only cause the features to be unavailable, though, it 
shouldn't cause any crashes.

Note that Android 2.2 and lower versions are not supported by Qt 5.


>
> It would be great to begin to ramp up on my Android debugging skills 
> but that would be accelerated by anybody already doing this sort of thing.
>
> I am running the Chapter1-basics example under the QtDeclarative 
> directory.
>
> In the Application Output and on Android Monitor Logcat, I can get 
> missing surface errors
> which cause the app to hang on exiting and require a "Terminate App" 
> dialog from the Android System task police.
>
>

Try to give a detailed description of what you do to reproduce the error 
in a bug report, and we can take it from there. If we are unable to 
reproduce it using the same steps, someone will ask you for more 
information in the bug report in hopes of tracking down the bug.

If you are quickly starting and closing the app repeatedly, it sounds 
like it could be a race condition in the startup or shutdown sequence of 
the application, since Qt applications on Android are always 
multithreaded (e.g. if the shutdown sequence is reached before the 
surface is created or something like that.) It's possible to build Qt as 
a debug build and run it in a debugger to get a breakpoint at the time 
when it crashes. This might even be easy to fix with a simple: if 
(surface == 0) return; or something like that, but we have to look more 
closely at it to know for sure.

-- Eskil

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/android-development/attachments/20140520/e020a9b5/attachment.html>


More information about the Android-development mailing list