Qt app on Android x86



  • Hi,

    I try to port existing Qt App for Android. It's compiled and run without problems on Arm emulator and arm device. But when I've run it on the Android x86 emulator, I've got the crash: SIGSEGV when exception is thrown (inheritor of std::exception), catch is exist. Trying to debug problem I've found QtCreator build files with O2 and g flag, so a lot of variable is optimized. I've checked mkspecs/android-g++ and found 02 flag
    else: equals(ANDROID_TARGET_ARCH, x86):
    QMAKE_CFLAGS = -ffunction-sections -funwind-tables -O2 ...
    Environment: last NDK (r10d), Qt 5.4 prebuild and my custom build, Android x86 emulator (4.3, 4.2, 5.0 versions), gcc x86-4.8, Ubuntu x64-86.
    So two questions.

    1. Do you have any ideas why try/catch/throw don't work?
    2. Why O2 optimization switch on by default (for X86)?


  • Have you built the Qt Android for x86 toolchain yourself or is it downloaded? I've only used the prebuilt versions and it works fine on a physical device. With emulator however, I haven't been able to get the x86 apps work on a x86 emulator. I think it's due to some harware acceleration that is supposed to work on this emulator, but I never managed to set this up correctly.



  • Thanks for your reply. I've tried to use the pre built toolchain and my custom build. Both don't work. The most interesting I've got different errors in different parts of code: when throw std::exception, when qt parse qml file, et al. So I'm searching x86 tablet with android for testing... :-)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.