Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashing when tapping on the location button on a widget #156

Open
gbakeman opened this issue May 13, 2020 · 11 comments
Open

Crashing when tapping on the location button on a widget #156

gbakeman opened this issue May 13, 2020 · 11 comments

Comments

@gbakeman
Copy link

I'm getting AppCrashes when I tap on the location button on a widget. I think the location may be invalid since the widget is blank.

(Attached: log)
log-yourlocalweather.txt

@IriaSomobu
Copy link
Contributor

@tgp1994,

  1. Can this issue still be reproduced?
  2. Are you familiar with logcat?

@gbakeman
Copy link
Author

  1. I had reset the app data awhile ago to get it working again, but I was able to reproduce the issue just now. These were my steps:
  • Make sure the widget is set to a static, valid location (location Switch OpenWeatherMap API URLs to HTTPS #1 since we can only have one manual location at this time)
  • Go into the app, edit the locations list, and remove the static location
  • Go back to the widget, and try tapping the location button. I had to tap it a few times before my phone tells me the app is crashing.
  1. Please find a logcat log attached. :) It's filtered to the app name, hopefully that doesn't exclude anything you might be looking for?

Log-2020-08-10-03.35.33.zip

@IriaSomobu
Copy link
Contributor

Thanks for explanation, now I can reproduce this issue too.

The error is

08-11 01:59:24.550 E/AndroidRuntime(4338): FATAL EXCEPTION: main
08-11 01:59:24.550 E/AndroidRuntime(4338): Process: org.thosp.yourlocalweather, PID: 4338
08-11 01:59:24.550 E/AndroidRuntime(4338): java.lang.RuntimeException: Unable to start receiver org.thosp.yourlocalweather.widget.ExtLocationWithForecastWidgetProvider: java.lang.NullPointerException: Attempt to invoke virtual method 'long java.lang.Long.longValue()' on a null object reference
08-11 01:59:24.550 E/AndroidRuntime(4338): 	at android.app.ActivityThread.handleReceiver(ActivityThread.java:3087)
08-11 01:59:24.550 E/AndroidRuntime(4338): 	at android.app.ActivityThread.-wrap18(ActivityThread.java)
08-11 01:59:24.550 E/AndroidRuntime(4338): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1591)
08-11 01:59:24.550 E/AndroidRuntime(4338): 	at android.os.Handler.dispatchMessage(Handler.java:102)
08-11 01:59:24.550 E/AndroidRuntime(4338): 	at android.os.Looper.loop(Looper.java:154)
08-11 01:59:24.550 E/AndroidRuntime(4338): 	at android.app.ActivityThread.main(ActivityThread.java:6236)
08-11 01:59:24.550 E/AndroidRuntime(4338): 	at java.lang.reflect.Method.invoke(Native Method)
08-11 01:59:24.550 E/AndroidRuntime(4338): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:891)
08-11 01:59:24.550 E/AndroidRuntime(4338): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:781)
08-11 01:59:24.550 E/AndroidRuntime(4338): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'long java.lang.Long.longValue()' on a null object reference
08-11 01:59:24.550 E/AndroidRuntime(4338): 	at org.thosp.yourlocalweather.utils.AppPreference.setCurrentLocationId(AppPreference.java:546)
08-11 01:59:24.550 E/AndroidRuntime(4338): 	at org.thosp.yourlocalweather.widget.AbstractWidgetProvider.performActionOnReceiveForWidget(AbstractWidgetProvider.java:171)
08-11 01:59:24.550 E/AndroidRuntime(4338): 	at org.thosp.yourlocalweather.widget.AbstractWidgetProvider.onReceive(AbstractWidgetProvider.java:127)
08-11 01:59:24.550 E/AndroidRuntime(4338): 	at android.app.ActivityThread.handleReceiver(ActivityThread.java:3080)
08-11 01:59:24.550 E/AndroidRuntime(4338): 	... 8 more

@IriaSomobu
Copy link
Contributor

@tgp1994 cannot reproduce this bug on 622843a. Maybe you can?

@gbakeman
Copy link
Author

I'm seeing a lot of translation commits since the last release which I'm using, but I could give it a go if there's a test build available?

@IriaSomobu
Copy link
Contributor

Here you are:
YourLocationWeather-release.zip

Keep in mind that this APK signed different key when in 'releases' section, so Android might refuse to install this version. In this case you have to delete application and this APK.

@gbakeman
Copy link
Author

Thank you for posting that! I removed the old app and replaced it with that one. When I try to place any widget though, it says there was an error loading the widget. I haven't seen that before.

Screenshot_20200813-112448

@thuryn
Copy link
Owner

thuryn commented Oct 28, 2020

Could you, please, try to reproduce the issue on the version 5.6.1 (it's going to be released in hours.

@gbakeman
Copy link
Author

I'm sorry, but I don't currently have the ability to compile from source at this time. I'll need to wait for the release unless a compiled apk can be provided.

@inson1
Copy link
Contributor

inson1 commented Oct 9, 2023

@gbakeman What about now?

@gbakeman
Copy link
Author

gbakeman commented Oct 9, 2023

Hi @inson1 , I'm sorry but I've moved on to https://github.com/breezy-weather/breezy-weather. I have to wonder if this was fixed since no one else has commented since?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants