Android Question Howto find and fix exception "WeakReference.get()' on a null object reference"

fredo

Well-Known Member
Licensed User
Longtime User
FireBase Crash Reporting showed this:

02-06-_2017_12-38-16.png
B4X:
 Exception java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.lang.ref.WeakReference.get()' on a null object reference

anywheresoftware.b4a.Msgbox$DialogResponse.onClick (Msgbox.java:147)
com.android.internal.app.AlertController$AlertParams$3.onItemClick (AlertController.java:1228)
android.widget.AdapterView.performItemClick (AdapterView.java:346)
android.widget.AbsListView.performItemClick (AbsListView.java:1550)
android.widget.AbsListView$PerformClick.run (AbsListView.java:3830)
android.widget.AbsListView$3.run (AbsListView.java:5855)
android.os.Handler.handleCallback (Handler.java:739)
android.os.Handler.dispatchMessage (Handler.java:95)
android.os.Looper.loop (Looper.java:148)
android.app.ActivityThread.main (ActivityThread.java:7325)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1230)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1120)

Normally we would search the stacktrace for a line that refers to a file in \..\src\*.java so the corresponding line in the project file could be found. But there is no clue where to look for the problem...

What would be the best approach to fix this?

The last changes made in the project were only minor changes due to bugfixes. B4A V 7.01 was used to compile.
 

Attachments

  • 02-06-_2017_12-53-21.png
    02-06-_2017_12-53-21.png
    33 KB · Views: 486
Top