Bug? InputMultiList on rotation crash

Scantech

Well-Known Member
Licensed User
Longtime User
Crash happens with some of the apps. InputMultiList list shown then rotate screen and it crashes. Also, when the list pops up and leave it untouched for 5 seconds or more then cancel on the outside will cause it to crash.

Error occurred on line: 753 (Main)
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean anywheresoftware.b4a.objects.ViewWrapper.getVisible()' on a null object reference
at scantech.cardiagnosticpro.main._activity_pause(main.java:4296)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:710)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:339)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:249)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:139)
at anywheresoftware.b4a.ShellBA$2.run(ShellBA.java:116)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6682)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)

Line 753 code is as follows in "Pause" event and pnlLogView is initialized at "Create" event.
B4X:
rotDiagReport = pnlLogView.Visible

Adding this will resolve the problem (Sometimes..weird??)
B4X:
    If pnlLogView.IsInitialized Then                 'added this to prevent crashes.  ??? what happened
        rotDiagReport = pnlLogView.Visible            'DIAGNOSTIC LOG REPORT FOR ROTATION
    End If

Here are couple of errors in the log
Logger connected to: samsung SM-G920P
--------- beginning of crash
--------- beginning of main
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
MAP READ
MAP READ
this app was NOT downloaded from the google play store
Checking In-App only FirstTime will Apply/////////////////////
** Activity (main) Resume **
Billing service connected.
Checking for in-app billing 3 support.
In-app billing version 3 supported for scantech.cardiagnosticpro
Subscriptions AVAILABLE.
true, Setup successful. (response: 0:OK)
Subscriptions supported: true
Starting async operation: refresh inventory
Querying owned items, item type: inapp
Package name: scantech.cardiagnosticpro
Calling getPurchases with continuation token: null
Owned items response: 0
Continuation token: null
Querying SKU details.
queryPrices: nothing to do because there are no SKUs.
Querying owned items, item type: subs
Package name: scantech.cardiagnosticpro
Calling getPurchases with continuation token: null
Owned items response: 0
Continuation token: null
Querying SKU details.
queryPrices: nothing to do because there are no SKUs.
Ending async operation: refresh inventory
*** Service (comserial) Create ***
** Service (comserial) Start **
true
(MyMap) {}
** Activity (main) Pause, UserClosed = false **
No wakelock.
** Activity (main) Create, isFirst = false **
MAP READ
Checking In-App only FirstTime will Apply/////////////////////
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
No wakelock.
** Activity (main) Create, isFirst = false **
MAP READ
Checking In-App only FirstTime will Apply/////////////////////
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
No wakelock.
** Activity (main) Create, isFirst = false **
MAP READ
Checking In-App only FirstTime will Apply/////////////////////
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
No wakelock.
** Activity (main) Create, isFirst = false **
MAP READ
Checking In-App only FirstTime will Apply/////////////////////
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = true **
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
MAP READ
MAP READ
this app was NOT downloaded from the google play store
Checking In-App only FirstTime will Apply/////////////////////
** Activity (main) Resume **
Billing service connected.
Checking for in-app billing 3 support.
In-app billing version 3 supported for scantech.cardiagnosticpro
Subscriptions AVAILABLE.
true, Setup successful. (response: 0:OK)
Subscriptions supported: true
Starting async operation: refresh inventory
Querying owned items, item type: inapp
Package name: scantech.cardiagnosticpro
Calling getPurchases with continuation token: null
Owned items response: 0
Continuation token: null
Querying SKU details.
queryPrices: nothing to do because there are no SKUs.
Querying owned items, item type: subs
Package name: scantech.cardiagnosticpro
Calling getPurchases with continuation token: null
Owned items response: 0
Continuation token: null
Querying SKU details.
queryPrices: nothing to do because there are no SKUs.
Ending async operation: refresh inventory
*** Service (comserial) Create ***
** Service (comserial) Start **
true
(MyMap) {}
** Activity (main) Pause, UserClosed = false **
No wakelock.
** Activity (main) Create, isFirst = false **
MAP READ
Checking In-App only FirstTime will Apply/////////////////////
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
No wakelock.
** Activity (main) Create, isFirst = false **
MAP READ
Checking In-App only FirstTime will Apply/////////////////////
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
Error occurred on line: 753 (Main)
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean anywheresoftware.b4a.objects.ViewWrapper.getVisible()' on a null object reference
at scantech.cardiagnosticpro.main._activity_pause(main.java:4296)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:710)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:339)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:249)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:139)
at anywheresoftware.b4a.ShellBA$2.run(ShellBA.java:116)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6682)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
MAP READ
MAP READ
this app was NOT downloaded from the google play store
Checking In-App only FirstTime will Apply/////////////////////
** Activity (main) Resume **
Billing service connected.
Checking for in-app billing 3 support.
In-app billing version 3 supported for scantech.cardiagnosticpro
Subscriptions AVAILABLE.
true, Setup successful. (response: 0:OK)
Subscriptions supported: true
Starting async operation: refresh inventory
Querying owned items, item type: inapp
Package name: scantech.cardiagnosticpro
Calling getPurchases with continuation token: null
Owned items response: 0
Continuation token: null
Querying SKU details.
queryPrices: nothing to do because there are no SKUs.
Querying owned items, item type: subs
Package name: scantech.cardiagnosticpro
Calling getPurchases with continuation token: null
Owned items response: 0
Continuation token: null
Querying SKU details.
queryPrices: nothing to do because there are no SKUs.
Ending async operation: refresh inventory
*** Service (comserial) Create ***
** Service (comserial) Start **
true
(MyMap) {}
** Activity (main) Pause, UserClosed = false **
No wakelock.
** Activity (main) Create, isFirst = false **
MAP READ
Checking In-App only FirstTime will Apply/////////////////////
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
No wakelock.
** Activity (main) Create, isFirst = false **
MAP READ
Checking In-App only FirstTime will Apply/////////////////////
** Activity (main) Resume **
PageChanged: 0
PageCreated: 0
-16776961
** Activity (main) Pause, UserClosed = false **
No wakelock.
** Activity (main) Create, isFirst = false **
MAP READ
Checking In-App only FirstTime will Apply/////////////////////
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
No wakelock.
** Activity (main) Create, isFirst = false **
MAP READ
Checking In-App only FirstTime will Apply/////////////////////
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
No wakelock.
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
false
No wakelock.
** Activity (main) Create, isFirst = false **
MAP READ
Checking In-App only FirstTime will Apply/////////////////////
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
false
No wakelock.
** Activity (main) Create, isFirst = false **
MAP READ
Checking In-App only FirstTime will Apply/////////////////////
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
false
No wakelock.
** Activity (main) Create, isFirst = false **
MAP READ
Checking In-App only FirstTime will Apply/////////////////////
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
false
No wakelock.
** Activity (main) Create, isFirst = false **
MAP READ
Checking In-App only FirstTime will Apply/////////////////////
** Activity (main) Resume **
-16776961
** Activity (main) Pause, UserClosed = false **
false
No wakelock.
** Activity (main) Create, isFirst = false **
MAP READ
-16776961
Checking In-App only FirstTime will Apply/////////////////////
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
false
No wakelock.
** Activity (main) Create, isFirst = false **
MAP READ
-16776961
Checking In-App only FirstTime will Apply/////////////////////
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
true
No wakelock.
** Activity (main) Create, isFirst = false **
MAP READ
Checking In-App only FirstTime will Apply/////////////////////
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
true
No wakelock.
** Activity (main) Create, isFirst = false **
MAP READ
Checking In-App only FirstTime will Apply/////////////////////
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = true **
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
MAP READ
MAP READ
this app was NOT downloaded from the google play store
Checking In-App only FirstTime will Apply/////////////////////
** Activity (main) Resume **
*** Service (comserial) Create ***
** Service (comserial) Start **
Billing service connected.
Checking for in-app billing 3 support.
In-app billing version 3 supported for scantech.cardiagnosticpro
Subscriptions AVAILABLE.
true, Setup successful. (response: 0:OK)
Subscriptions supported: true
Starting async operation: refresh inventory
Querying owned items, item type: inapp
Package name: scantech.cardiagnosticpro
Calling getPurchases with continuation token: null
Owned items response: 0
Continuation token: null
Querying SKU details.
queryPrices: nothing to do because there are no SKUs.
Querying owned items, item type: subs
Package name: scantech.cardiagnosticpro
Calling getPurchases with continuation token: null
Owned items response: 0
Continuation token: null
Querying SKU details.
queryPrices: nothing to do because there are no SKUs.
Ending async operation: refresh inventory
true
(MyMap) {}
** Activity (main) Pause, UserClosed = false **
false
No wakelock.
** Activity (main) Create, isFirst = false **
MAP READ
Checking In-App only FirstTime will Apply/////////////////////
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
false
No wakelock.
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
false
No wakelock.
** Activity (main) Create, isFirst = false **
MAP READ
Checking In-App only FirstTime will Apply/////////////////////
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
false
No wakelock.
** Activity (main) Create, isFirst = false **
MAP READ
Checking In-App only FirstTime will Apply/////////////////////
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
false
No wakelock.
** Activity (main) Create, isFirst = false **
MAP READ
Checking In-App only FirstTime will Apply/////////////////////
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
false
No wakelock.
main_vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv5 (java line: 31964)
anywheresoftware.b4a.B4AUncaughtException
at anywheresoftware.b4a.Msgbox.msgbox(Msgbox.java:168)
at anywheresoftware.b4a.keywords.Common.InputMultiList(Common.java:696)
at scantech.cardiagnosticpro.main._vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv5(main.java:31964)
at scantech.cardiagnosticpro.main$ResumableSub_ProfileDeleteOptions.resume(main.java:32106)
at scantech.cardiagnosticpro.main._vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv1(main.java:31995)
at scantech.cardiagnosticpro.main$ResumableSub_mnuProfile_Click.resume(main.java:29697)
at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:240)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:180)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:166)
at anywheresoftware.b4a.keywords.Common$3.onClick(Common.java:540)
at com.android.internal.app.AlertController$AlertParams$3.onItemClick(AlertController.java:1257)
at android.widget.AdapterView.performItemClick(AdapterView.java:339)
at android.widget.AbsListView.performItemClick(AbsListView.java:1705)
at android.widget.AbsListView$PerformClick.run(AbsListView.java:4171)
at android.widget.AbsListView$13.run(AbsListView.java:6735)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6682)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
MAP READ
MAP READ
this app was NOT downloaded from the google play store
Checking In-App only FirstTime will Apply/////////////////////
** Activity (main) Resume **
Billing service connected.
Checking for in-app billing 3 support.
In-app billing version 3 supported for scantech.cardiagnosticpro
Subscriptions AVAILABLE.
true, Setup successful. (response: 0:OK)
Subscriptions supported: true
Starting async operation: refresh inventory
Querying owned items, item type: inapp
Package name: scantech.cardiagnosticpro
Calling getPurchases with continuation token: null
Owned items response: 0
Continuation token: null
Querying SKU details.
queryPrices: nothing to do because there are no SKUs.
Querying owned items, item type: subs
Package name: scantech.cardiagnosticpro
Calling getPurchases with continuation token: null
Owned items response: 0
Continuation token: null
Querying SKU details.
queryPrices: nothing to do because there are no SKUs.
Ending async operation: refresh inventory
*** Service (comserial) Create ***
** Service (comserial) Start **
true
(MyMap) {}
** Activity (main) Pause, UserClosed = false **
false
No wakelock.
** Activity (main) Resume **

No wakelock.
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
No wakelock.
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
No wakelock.
main_profiledeletechoose (B4A line: 21980)
End Sub
anywheresoftware.b4a.B4AUncaughtException
at anywheresoftware.b4a.Msgbox.msgbox(Msgbox.java:168)
at anywheresoftware.b4a.keywords.Common.InputMultiList(Common.java:696)
at scantech.cardiagnosticpro.main._profiledeletechoose(main.java:43082)
at scantech.cardiagnosticpro.main$ResumableSub_ProfileDeleteOptions.resume(main.java:43254)
at scantech.cardiagnosticpro.main._profiledeleteoptions(main.java:43129)
at scantech.cardiagnosticpro.main$ResumableSub_mnuProfile_Click.resume(main.java:40036)
at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:240)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:180)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:166)
at anywheresoftware.b4a.keywords.Common$3.onClick(Common.java:540)
at com.android.internal.app.AlertController$AlertParams$3.onItemClick(AlertController.java:1257)
at android.widget.AdapterView.performItemClick(AdapterView.java:339)
at android.widget.AbsListView.performItemClick(AbsListView.java:1705)
at android.widget.AbsListView$PerformClick.run(AbsListView.java:4171)
at android.widget.AbsListView$13.run(AbsListView.java:6735)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6682)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
 
Last edited:
Top