You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 15, 2023. It is now read-only.
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.github.palmcalc2019.palmcalc/com.github.palmcalc2019.palmcalc.PalmCalcActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object android.content.Context.getSystemService(java.lang.String)' on a null object reference
at com.github.palmcalc2019.unit.AbstractWheelTextAdapter.<init>(AbstractWheelTextAdapter.java:75)
at com.github.palmcalc2019.unit.AbstractWheelTextAdapter.<init>(AbstractWheelTextAdapter.java:65)
at com.github.palmcalc2019.unit.AbstractWheelTextAdapter.<init>(AbstractWheelTextAdapter.java:60)
at com.github.palmcalc2019.unit.ArrayWheelAdapter.<init>(ArrayWheelAdapter.java:43)
at com.github.palmcalc2019.unit.AndroidQAActivity.IntwheelSelector(AndroidQAActivity.java:434)
at com.github.palmcalc2019.unit.AndroidQAActivity.onStart(AndroidQAActivity.java:124)
The text was updated successfully, but these errors were encountered:
medavox
changed the title
Crash on Samsun S5 running Android 6.0.1
Crash on Samsung S5 running Android 6.0.1
Jun 18, 2019
caused by passing global static Context object to a new class instance.
The value of the ctx variable is old, from the last program run.
So when this is passed to a new ArrayWheelAdapter instance, which tries to use it to get a layout inflater, the context being used is null, and an NPE is caused.
key method (was AndroidQAActivity.java:434, now somewhere in ConverterFragment):
The text was updated successfully, but these errors were encountered: