Android Question App freezes and causes device to forcefully reboot

roderiko4

Member
Hello, I'm new to this community and I need help to solve this problem...

I'm making an app for an specific purpose and for that I made the app an kiosk app. I needed the app to be able to receive phone calls normally so I made it so the app unlock itself when it received a phone call. For some weird reason when the device gets a phone call while locked, the entire device stops responding and after a while it reboots itself.

phone call unlock code:
Sub PE_PhoneStateChanged (State As String, IncomingNumber As String, Intent As Intent)
    Select State
        Case "IDLE" ' Idle state.
        Case "RINGING" ' Ringing state.

            Log("sono sono sono")
            If IsPaused (Main) = False Then
                CallSubDelayed(Main,"Unlock")
            End If
      End Select

unlock sub from main activity:
Sub Unlock
    GetContext.RunMethod("stopLockTask", Null)
    WriteLockState(False)
End Sub

Here's the error message :
error message:
java.lang.RuntimeException: android.os.DeadSystemException
    at android.os.PowerManager$WakeLock.release(PowerManager.java:2236)
    at android.os.PowerManager$WakeLock$1.run(PowerManager.java:2097)
    at android.os.Handler.handleCallback(Handler.java:883)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loop(Looper.java:214)
    at android.app.ActivityThread.main(ActivityThread.java:7405)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:502)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:980)
Caused by: android.os.DeadSystemException
    ... 9 more
 

roderiko4

Member
I ran some tests like you said, and now it crashed after 1 phone call: I call, my device unlocks itself to show phone call properly, call ends, device locks itself again, and I call AGAIN then my device freezes and reboots. The logs showed the same error message as above
 
Upvote 0

roderiko4

Member
I ran some tests like you said, and now it crashed after 1 phone call: I call, my device unlocks itself to show phone call properly, call ends, device locks itself again, and I call AGAIN then my device freezes and reboots. The logs showed the same error message as above
Now I tried doing a test again and the app could unlock itself after receiving 4+ calls, but now I call it again and it freezes...this is inconsistent

EDIT: I forgot I should've posted my device specs, I hope it helps
Lenovo TB-8505X
Android 10
 
Last edited:
Upvote 0

roderiko4

Member
Did another test and I got this new error message:
B4X:
main_lock (java line: 2024)
java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4j.object.JavaObject.RunMethod(JavaObject.java:132)
    at redmaster.citofono.v2.main._lock(main.java:2024)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213)
    at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:1082)
    at anywheresoftware.b4a.keywords.Common.CallSubNew(Common.java:1029)
    at redmaster.citofono.v2.listener._timer1_tick(listener.java:370)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213)
    at anywheresoftware.b4a.objects.Timer$TickTack.run(Timer.java:105)
    at android.os.Handler.handleCallback(Handler.java:883)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loop(Looper.java:214)
    at android.app.ActivityThread.main(ActivityThread.java:7405)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:502)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:980)
Caused by: java.lang.RuntimeException: android.os.DeadSystemException
    at android.app.admin.DevicePolicyManager.setLockTaskPackages(DevicePolicyManager.java:8035)
    ... 18 more
Caused by: android.os.DeadSystemException
    ... 19 more
main_lock (java line: 2024)
java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4j.object.JavaObject.RunMethod(JavaObject.java:132)
    at redmaster.citofono.v2.main._lock(main.java:2024)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213)
    at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:1082)
    at anywheresoftware.b4a.keywords.Common.CallSubNew(Common.java:1029)
    at redmaster.citofono.v2.listener._timer1_tick(listener.java:370)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213)
    at anywheresoftware.b4a.objects.Timer$TickTack.run(Timer.java:105)
    at android.os.Handler.handleCallback(Handler.java:883)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loop(Looper.java:214)
    at android.app.ActivityThread.main(ActivityThread.java:7405)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:502)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:980)
Caused by: java.lang.RuntimeException: android.os.DeadSystemException
    at android.app.admin.DevicePolicyManager.setLockTaskPackages(DevicePolicyManager.java:8035)
    ... 18 more
Caused by: android.os.DeadSystemException
    ... 19 more
 
Upvote 0

MbedAndroid

Well-Known Member
Licensed User
Longtime User
suddenly i got this today via Firebase. android.os.DeadSystemException
No really a clue. Galaxy 7, android 10. Seeing the posts on stackoverflow most are related to android 10.
android.app.ApplicationPackageManager.getPackageInfoAsUser (ApplicationPackageManager.java:273)


android.app.ApplicationPackageManager.getPackageInfo (ApplicationPackageManager.java:244)


gr.a :)com.google.android.gms.dynamite_mapsdynamite@212621081@21.26.21 (120400-0):1)

com.google.maps.api.android.lib6.impl.fb.g :)com.google.android.gms.dynamite_mapsdynamite@212621081@21.26.21 (120400-0):2)


com.google.android.gms.maps.internal.o.aX :)com.google.android.gms.dynamite_mapsdynamite@212621081@21.26.21 (120400-0):22)

dy.onTransact :)com.google.android.gms.dynamite_mapsdynamite@212621081@21.26.21 (120400-0):4)

android.os.Binder.transact (Binder.java:949)


com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1100)
 
Upvote 0
Top