Qt Android application crash on cat connection established and failed to restart



  • When my application is running, I go through the Android Settings shortcut and turn off the Airplane mode. I can see that as soon as the data connection is established, the application died and restart automatically but the restart fails and I have only a white screen instead of my application main view. Following is the error Log. Any help would be very appreciated. Thanks.

    01-25 15:10:57.595 22035-22035/org.qtproject.example.QtTest D/COPPER: Going through OnPause
    01-25 15:10:57.595 22035-22035/org.qtproject.example.QtTest D/COPPER: Method [public void org.qtproject.qt5.android.QtActivityDelegate.onPause()]in invokeDelegate.
    01-25 15:10:57.595 22035-22035/org.qtproject.example.QtTest D/COPPER: Method [public void org.qtproject.qt5.android.QtActivityDelegate.onSaveInstanceState(android.os.Bundle)]in invokeDelegate.
    01-25 15:10:57.625 22035-22035/org.qtproject.example.QtTest D/COPPER: Going through OnStop
    01-25 15:10:57.625 22035-22035/org.qtproject.example.QtTest D/COPPER: Method [public void org.qtproject.qt5.android.QtActivityDelegate.onStop()]in invokeDelegate.
    01-25 15:10:57.625 22035-22035/org.qtproject.example.QtTest D/COPPER: Method [public java.lang.Object org.qtproject.qt5.android.QtActivityDelegate.onRetainNonConfigurationInstance()]in invokeDelegate.
    01-25 15:10:57.625 22035-22035/org.qtproject.example.QtTest D/COPPER: Going through OnDestroy
    01-25 15:10:57.625 22035-22035/org.qtproject.example.QtTest D/COPPER: Method [public void org.qtproject.qt5.android.QtActivityDelegate.onDestroy()]in invokeDelegate.
    01-25 15:10:57.735 22035-22035/org.qtproject.example.QtTest D/COPPER: Going through OnCreate
    01-25 15:10:57.775 22035-22035/org.qtproject.example.QtTest D/COPPER: Going through OnStart
    01-25 15:10:57.775 22035-22035/org.qtproject.example.QtTest D/COPPER: Method [public void org.qtproject.qt5.android.QtActivityDelegate.onRestoreInstanceState(android.os.Bundle)]in invokeDelegate.
    01-25 15:10:57.785 22035-22035/org.qtproject.example.QtTest D/COPPER: Going through OnResume
    01-25 15:10:57.785 22035-22035/org.qtproject.example.QtTest D/COPPER: Method [public void org.qtproject.qt5.android.QtActivityDelegate.onResume()]in invokeDelegate.
    01-25 15:10:58.015 22035-22035/org.qtproject.example.QtTest E/Qt JAVA: Surface 1 not found!
    01-25 15:10:58.055 22035-22035/org.qtproject.example.QtTest D/COPPER: Method [public boolean org.qtproject.qt5.android.QtActivityDelegate.onCreateOptionsMenu(android.view.Menu)]in invokeDelegate.
    01-25 15:10:58.055 22035-22035/org.qtproject.example.QtTest D/COPPER: Method [public boolean org.qtproject.qt5.android.QtActivityDelegate.onPrepareOptionsMenu(android.view.Menu)]in invokeDelegate.
    01-25 15:10:58.606 22035-22035/org.qtproject.example.QtTest D/COPPER: Going through OnPause
    01-25 15:10:58.606 22035-22035/org.qtproject.example.QtTest D/COPPER: Method [public void org.qtproject.qt5.android.QtActivityDelegate.onPause()]in invokeDelegate.
    01-25 15:10:58.606 22035-22035/org.qtproject.example.QtTest D/COPPER: Method [public void org.qtproject.qt5.android.QtActivityDelegate.onSaveInstanceState(android.os.Bundle)]in invokeDelegate.
    01-25 15:10:58.606 22035-22035/org.qtproject.example.QtTest W/System.err: java.lang.reflect.InvocationTargetException
    01-25 15:10:58.606 22035-22035/org.qtproject.example.QtTest W/System.err:     at java.lang.reflect.Method.invokeNative(Native Method)
    01-25 15:10:58.606 22035-22035/org.qtproject.example.QtTest W/System.err:     at java.lang.reflect.Method.invoke(Method.java:511)
    01-25 15:10:58.606 22035-22035/org.qtproject.example.QtTest W/System.err:     at org.qtproject.qt5.android.QtActivityDelegate.onSaveInstanceState(QtActivityDelegate.java:921)
    01-25 15:10:58.606 22035-22035/org.qtproject.example.QtTest W/System.err:     at java.lang.reflect.Method.invokeNative(Native Method)
    01-25 15:10:58.606 22035-22035/org.qtproject.example.QtTest W/System.err:     at java.lang.reflect.Method.invoke(Method.java:511)
    01-25 15:10:58.606 22035-22035/org.qtproject.example.QtTest W/System.err:     at org.qtproject.qt5.android.bindings.QtApplication.invokeDelegateMethod(QtApplication.java:155)
    01-25 15:10:58.606 22035-22035/org.qtproject.example.QtTest W/System.err:     at org.qtproject.qt5.android.bindings.QtApplication.invokeDelegate(QtApplication.java:144)
    01-25 15:10:58.606 22035-22035/org.qtproject.example.QtTest W/System.err:     at org.qtproject.qt5.android.bindings.QtActivity.onSaveInstanceState(QtActivity.java:1279)
    01-25 15:10:58.606 22035-22035/org.qtproject.example.QtTest W/System.err:     at android.app.Activity.performSaveInstanceState(Activity.java:1147)
    01-25 15:10:58.606 22035-22035/org.qtproject.example.QtTest W/System.err:     at android.app.Instrumentation.callActivityOnSaveInstanceState(Instrumentation.java:1216)
    01-25 15:10:58.606 22035-22035/org.qtproject.example.QtTest W/System.err:     at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3669)
    01-25 15:10:58.606 22035-22035/org.qtproject.example.QtTest W/System.err:     at android.app.ActivityThread.access$700(ActivityThread.java:144)
    01-25 15:10:58.606 22035-22035/org.qtproject.example.QtTest W/System.err:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1243)
    01-25 15:10:58.606 22035-22035/org.qtproject.example.QtTest W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:99)
    01-25 15:10:58.606 22035-22035/org.qtproject.example.QtTest W/System.err:     at android.os.Looper.loop(Looper.java:137)
    01-25 15:10:58.606 22035-22035/org.qtproject.example.QtTest W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:5074)
    01-25 15:10:58.606 22035-22035/org.qtproject.example.QtTest W/System.err:     at java.lang.reflect.Method.invokeNative(Native Method)
    01-25 15:10:58.606 22035-22035/org.qtproject.example.QtTest W/System.err:     at java.lang.reflect.Method.invoke(Method.java:511)
    01-25 15:10:58.616 22035-22035/org.qtproject.example.QtTest W/System.err:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
    01-25 15:10:58.616 22035-22035/org.qtproject.example.QtTest W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
    01-25 15:10:58.626 22035-22035/org.qtproject.example.QtTest W/System.err:     at dalvik.system.NativeStart.main(Native Method)
    01-25 15:10:58.626 22035-22035/org.qtproject.example.QtTest W/System.err: Caused by: java.lang.NullPointerException
    01-25 15:10:58.626 22035-22035/org.qtproject.example.QtTest W/System.err:     at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1410)
    01-25 15:10:58.626 22035-22035/org.qtproject.example.QtTest W/System.err:     at android.app.FragmentManagerImpl.saveAllState(FragmentManager.java:1608)
    01-25 15:10:58.626 22035-22035/org.qtproject.example.QtTest W/System.err:     at android.app.Activity.onSaveInstanceState(Activity.java:1199)
    01-25 15:10:58.626 22035-22035/org.qtproject.example.QtTest W/System.err:     at org.qtproject.qt5.android.bindings.QtActivity.super_onSaveInstanceState(QtActivity.java:1284)
    01-25 15:10:58.626 22035-22035/org.qtproject.example.QtTest W/System.err: 	... 21 more
    01-25 15:10:58.626 22035-22035/org.qtproject.example.QtTest D/COPPER: Going through OnStop
    01-25 15:10:58.636 22035-22035/org.qtproject.example.QtTest D/COPPER: Method [public void org.qtproject.qt5.android.QtActivityDelegate.onStop()]in invokeDelegate.
    01-25 15:10:58.636 22035-22035/org.qtproject.example.QtTest D/COPPER: Method [public java.lang.Object org.qtproject.qt5.android.QtActivityDelegate.onRetainNonConfigurationInstance()]in invokeDelegate.
    01-25 15:10:58.636 22035-22035/org.qtproject.example.QtTest D/COPPER: Going through OnDestroy
    01-25 15:10:58.636 22035-22035/org.qtproject.example.QtTest D/COPPER: Method [public void org.qtproject.qt5.android.QtActivityDelegate.onDestroy()]in invokeDelegate.
    01-25 15:10:58.646 22035-22035/org.qtproject.example.QtTest D/COPPER: Going through OnCreate
    01-25 15:10:58.656 22035-22035/org.qtproject.example.QtTest D/COPPER: Going through OnStart
    01-25 15:10:58.656 22035-22035/org.qtproject.example.QtTest D/COPPER: Method [public void org.qtproject.qt5.android.QtActivityDelegate.onRestoreInstanceState(android.os.Bundle)]in invokeDelegate.
    01-25 15:10:58.666 22035-22035/org.qtproject.example.QtTest D/COPPER: Going through OnResume
    01-25 15:10:58.666 22035-22035/org.qtproject.example.QtTest D/COPPER: Method [public void org.qtproject.qt5.android.QtActivityDelegate.onResume()]in invokeDelegate.
    01-25 15:10:58.796 22035-22035/org.qtproject.example.QtTest D/COPPER: Method [public boolean org.qtproject.qt5.android.QtActivityDelegate.onCreateOptionsMenu(android.view.Menu)]in invokeDelegate.
    01-25 15:10:58.796 22035-22035/org.qtproject.example.QtTest D/COPPER: Method [public boolean org.qtproject.qt5.android.QtActivityDelegate.onPrepareOptionsMenu(android.view.Menu)]in invokeDelegate.
    


  • Did you get any solution?
    I am having the same problem when unplugging a touch screen USB connection on an Android BOX.


Log in to reply
 

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