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

Crash when exiting settings #49

Closed
nikobockerman opened this issue Oct 19, 2022 · 3 comments
Closed

Crash when exiting settings #49

nikobockerman opened this issue Oct 19, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@nikobockerman
Copy link

This might be related to #48 and to my inability to find any locations or to get any weather data. Anyway I faced a crash and got a stacktrace so reporting it here.

Reproduction steps:

Initial state: API Key added and it's accepted by QuickWeather, no locations added.

  1. Launch QuickWeather: opens settings as no locations are added
  2. Click > to enter Locations page
  3. Add a location
    • In my case I add a location through the map view (doesn't matter which but for example select some point inside Germany) and give a random name like ff
  4. Click > and Finish to enter main screen
    • At this point I only see a "loading" icon for a while after which I have only empty black page
  5. Enter settings again
  6. Click > to enter Locations page
  7. Remove the ff location
    • List of locations is now empty
  8. Use OS back gesture twice to exit from settings

Actual result

QuickWeather crashes instead of showing home screen or closing the app

Expected result

Some view to be shown or application to close. Anything but crashing.

More information

App version: 2.2.6 from F-Droid
OS: Android 13
Phone: Pixel 6a

Stack trace of the crash

type: crash
osVersion: google/bluejay/bluejay:13/TP1A.221005.003/2022101600:user/release-keys
package: com.ominous.quickweather:51
process: com.ominous.quickweather

java.lang.NullPointerException: Attempt to invoke interface method 'android.view.MenuItem android.view.MenuItem.setChecked(boolean)' on a null object reference
	at i3.b.d(SourceFile:671)
	at androidx.lifecycle.LiveData.b(Unknown Source:29)
	at androidx.lifecycle.LiveData.c(SourceFile:56)
	at androidx.lifecycle.LiveData.j(Unknown Source:14)
	at androidx.lifecycle.LiveData$a.run(Unknown Source:18)
	at android.os.Handler.handleCallback(Handler.java:942)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loopOnce(Looper.java:201)
	at android.os.Looper.loop(Looper.java:288)
	at android.app.ActivityThread.main(ActivityThread.java:7904)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
	at com.android.internal.os.ExecInit.main(ExecInit.java:49)
	at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
	at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:355)

@TylerWilliamson TylerWilliamson added the bug Something isn't working label Oct 19, 2022
@TylerWilliamson
Copy link
Owner

Hello, this is a known issue and only occurs after exiting settings and re-entering the main activity. The next time you open the app, it should go straight to settings and make you enter a location.

The above is more of a workaround though. I'll create a proper fix and include it in the next release

@TylerWilliamson
Copy link
Owner

It turns out that I already put in the fix I mentioned previously. The reason you had a crash was that the code happened on another thread, so I needed a similar fix in another place. That fix will be included in the next version

@TylerWilliamson
Copy link
Owner

Fixed in 2.2.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants