forecastie icon indicating copy to clipboard operation
forecastie copied to clipboard

Crash at startup without internet connection

Open Rbagman opened this issue 5 years ago • 3 comments

java.lang.RuntimeException: Unable to start activity ComponentInfo{cz.martykan.forecastie/cz.martykan.forecastie.activities.MainActivity}: java.lang.NullPointerException at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2413) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2471) at android.app.ActivityThread.access$900(ActivityThread.java:175) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1308) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:146) at android.app.ActivityThread.main(ActivityThread.java:5602) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099) at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.NullPointerException at java.lang.StringToReal.parseFloat(StringToReal.java:285) at java.lang.Float.parseFloat(Float.java:300) at cz.martykan.forecastie.activities.MainActivity.updateTodayWeatherUI(MainActivity.java:464) at cz.martykan.forecastie.activities.MainActivity.onStart(MainActivity.java:213) at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1177) at android.app.Activity.performStart(Activity.java:5461) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2386) ... 12 more

Rbagman avatar Apr 28 '19 10:04 Rbagman

Yeah, I've been getting this too. It previously happened some while ago, I thought it was fixed. Maybe we introduced a bug somewhere. #336 for example. Probably others.

robinpaulson avatar Aug 12 '19 09:08 robinpaulson

@Rbagman I could not reproduce this issue on virtual device. Do you still experience it?

igor-cali avatar Nov 10 '19 11:11 igor-cali

My guess here is malformed data which Forecastie can't process. Perhaps better error-checking and graceful error-catching would help? As I menitoned elsewhere, perhaps OWM offers parity checking/CRC for data downloads.

robinpaulson avatar Nov 14 '19 01:11 robinpaulson