Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Application hang on Android
Forum Updated to NodeBB v4.3 + New Features

Application hang on Android

Scheduled Pinned Locked Moved Solved Mobile and Embedded
3 Posts 2 Posters 2.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    David Demelier
    wrote on last edited by David Demelier
    #1

    Hello,

    I've successfully built an application for Android using Qt 5.11 and android-21 as API level. I've generated the application using QMake with the following project.pro and main.cpp file:

    QT += widgets
    SOURCES += src/main.cpp
    

    And main.cpp:

    #include <QApplication>
    #include <QGraphicsView>
    
    int main(int argc, char** argv)
    {
        QApplication app(argc, argv);
        QGraphicsView view;
    
        view.show();
    
        return app.exec();
    }
    

    The application builds and deploy correctly to the real android device (oneplus 5t) but hangs, my phone tells the application does not respond and ask me to quit/wait for it. It does the same on x86 and x86_64 architectures in Android Emulator. Strangely, in android emulator it works in armeabi-v7a.

    In Qt creator, the following Application output is shown:

    I zygote64: Late-enabling -Xcheck:jni
    I zygote64: The ClassLoaderContext is a special shared library.
    D Embryo  : preload org.qtproject.example.save_the_ball, 20ms, hwui=true, layout=false, decor=false
    V Font    : Change font:2
    W System  : ClassLoader referenced unknown path:
    I Qt      : qt started
    D OpenGLRenderer: HWUI GL Pipeline
    I zygote64: Do partial code cache collection, code=30KB, data=21KB
    I zygote64: After code cache collection, code=29KB, data=21KB
    I zygote64: Increasing code cache capacity to 128KB
    I zygote64: Do partial code cache collection, code=61KB, data=48KB
    I zygote64: After code cache collection, code=61KB, data=48KB
    I zygote64: Increasing code cache capacity to 256KB
    I zygote64: Compiler allocated 5MB to compile org.json.JSONObject org.qtproject.qt5.android.ExtractStyle.extractTextAppearanceInformations(java.lang.String, java.lang.String, android.util.AttributeSet, int)
    I zygote64: Do full code cache collection, code=124KB, data=88KB
    I zygote64: After code cache collection, code=111KB, data=68KB
    I Adreno  : QUALCOMM build                   : fcdb932, I1513509751
    I Adreno  : Build Date                       : 01/22/18
    I Adreno  : OpenGL ES Shader Compiler Version: EV031.22.00.01
    I Adreno  : Local Branch                     :
    I Adreno  : Remote Branch                    :
    I Adreno  : Remote Branch                    :
    I Adreno  : Reconstruct Branch               :
    D vndksupport: Loading /vendor/lib64/hw/gralloc.msm8998.so from current namespace instead of sphal namespace.
    I Adreno  : PFP: 0x005ff087, ME: 0x005ff063
    I zygote64: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
    I QtCore  : Start
    I OpenGLRenderer: Initialized EGL, version 1.4
    D OpenGLRenderer: Swap behavior 2
    D libGLESv1: Successfully load libGLESv2_oneplus.so, this=0x7fa796d008
    D OpenGLRenderer: Successfully load libhwui_plugin.so, this=0x7fa597f558
    I zygote64: Thread[3,tid=8423,WaitingInMainSignalCatcherLoop,Thread*=0x7f254c4400,peer=0x12d80088,"Signal Catcher"]: reacting to signal 3
    06-07 12:21:08.369  8409  8423 I zygote64:
    E zygote64: # HandleSigQuit # DumpForSigQuit # before # pid=8409
    E zygote64: # HandleSigQuit # DumpForSigQuit # after # pid=8409
    I zygote64: Wrote stack traces to '[tombstoned]'
    
    
    "org.qtproject.example.save_the_ball" died.
    
    J.HilkJ 1 Reply Last reply
    0
    • D David Demelier

      Hello,

      I've successfully built an application for Android using Qt 5.11 and android-21 as API level. I've generated the application using QMake with the following project.pro and main.cpp file:

      QT += widgets
      SOURCES += src/main.cpp
      

      And main.cpp:

      #include <QApplication>
      #include <QGraphicsView>
      
      int main(int argc, char** argv)
      {
          QApplication app(argc, argv);
          QGraphicsView view;
      
          view.show();
      
          return app.exec();
      }
      

      The application builds and deploy correctly to the real android device (oneplus 5t) but hangs, my phone tells the application does not respond and ask me to quit/wait for it. It does the same on x86 and x86_64 architectures in Android Emulator. Strangely, in android emulator it works in armeabi-v7a.

      In Qt creator, the following Application output is shown:

      I zygote64: Late-enabling -Xcheck:jni
      I zygote64: The ClassLoaderContext is a special shared library.
      D Embryo  : preload org.qtproject.example.save_the_ball, 20ms, hwui=true, layout=false, decor=false
      V Font    : Change font:2
      W System  : ClassLoader referenced unknown path:
      I Qt      : qt started
      D OpenGLRenderer: HWUI GL Pipeline
      I zygote64: Do partial code cache collection, code=30KB, data=21KB
      I zygote64: After code cache collection, code=29KB, data=21KB
      I zygote64: Increasing code cache capacity to 128KB
      I zygote64: Do partial code cache collection, code=61KB, data=48KB
      I zygote64: After code cache collection, code=61KB, data=48KB
      I zygote64: Increasing code cache capacity to 256KB
      I zygote64: Compiler allocated 5MB to compile org.json.JSONObject org.qtproject.qt5.android.ExtractStyle.extractTextAppearanceInformations(java.lang.String, java.lang.String, android.util.AttributeSet, int)
      I zygote64: Do full code cache collection, code=124KB, data=88KB
      I zygote64: After code cache collection, code=111KB, data=68KB
      I Adreno  : QUALCOMM build                   : fcdb932, I1513509751
      I Adreno  : Build Date                       : 01/22/18
      I Adreno  : OpenGL ES Shader Compiler Version: EV031.22.00.01
      I Adreno  : Local Branch                     :
      I Adreno  : Remote Branch                    :
      I Adreno  : Remote Branch                    :
      I Adreno  : Reconstruct Branch               :
      D vndksupport: Loading /vendor/lib64/hw/gralloc.msm8998.so from current namespace instead of sphal namespace.
      I Adreno  : PFP: 0x005ff087, ME: 0x005ff063
      I zygote64: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
      I QtCore  : Start
      I OpenGLRenderer: Initialized EGL, version 1.4
      D OpenGLRenderer: Swap behavior 2
      D libGLESv1: Successfully load libGLESv2_oneplus.so, this=0x7fa796d008
      D OpenGLRenderer: Successfully load libhwui_plugin.so, this=0x7fa597f558
      I zygote64: Thread[3,tid=8423,WaitingInMainSignalCatcherLoop,Thread*=0x7f254c4400,peer=0x12d80088,"Signal Catcher"]: reacting to signal 3
      06-07 12:21:08.369  8409  8423 I zygote64:
      E zygote64: # HandleSigQuit # DumpForSigQuit # before # pid=8409
      E zygote64: # HandleSigQuit # DumpForSigQuit # after # pid=8409
      I zygote64: Wrote stack traces to '[tombstoned]'
      
      
      "org.qtproject.example.save_the_ball" died.
      
      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      Hi @David-Demelier ,

      The application builds and deploy correctly to the real android device (oneplus 5t) but hangs, my phone tells the application does not respond and ask me to quit/wait for it. It does the same on x86 and x86_64 architectures in Android Emulator. Strangely, in android emulator it works in armeabi-v7a.

      You haven't stated for what cpu architecture you compile your app for, but from that quote up there my guess would be you compile your app for x86 and, looking at the onePlus cpu specks, all OnePlus deviced run ARM64-cpus

      change your compiler and associated Qt libary to arm v7 and you should be good to go.


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      1 Reply Last reply
      0
      • D Offline
        D Offline
        David Demelier
        wrote on last edited by
        #3

        For my oneplus 5t I use arm64-v8a, it works without problem using armeabi-v7a though :)

        Thanks!

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved