Page MenuHomeGitPull.it

Fix crash caused by NullPointerException on org.osmdroid.views.MapView.getMapCenter() (MapFragment.java:290) on version 1.18.3
Open, HighPublic

Description

Dear Developers of the amazing Free/Libre and Open Source app Libre BusTO ,
Please triage my crash:

version code:
45

version name:
1.18.3

android version:
13

phone:
Pixel 6

brand:
google

stack:
java.lang.NullPointerException: Attempt to invoke virtual method 'org.osmdroid.api.IGeoPoint org.osmdroid.views.MapView.getMapCenter()' on a null object reference
	at it.reyboz.bustorino.fragments.MapFragment.saveMapState(MapFragment.java:290)
	at it.reyboz.bustorino.fragments.MapFragment.onSaveInstanceState(MapFragment.java:307)
	at androidx.fragment.app.Fragment.performSaveInstanceState(Fragment.java:3183)
	at androidx.fragment.app.FragmentStateManager.saveBasicState(FragmentStateManager.java:680)
	at androidx.fragment.app.FragmentStateManager.saveState(FragmentStateManager.java:646)
	at androidx.fragment.app.FragmentStore.saveActiveFragments(FragmentStore.java:214)
	at androidx.fragment.app.FragmentManager.saveAllStateInternal(FragmentManager.java:2318)
	at androidx.fragment.app.FragmentManager.lambda$attachController$0$FragmentManager(FragmentManager.java:2572)
	at androidx.fragment.app.-$$Lambda$FragmentManager$XfPeDpLzKWrJr916TDyhue4S3eM.saveState(Unknown Source:2)
	at androidx.savedstate.SavedStateRegistry.performSave(SavedStateRegistry.java:227)
	at androidx.savedstate.SavedStateRegistryController.performSave(SavedStateRegistryController.java:74)
	at androidx.activity.ComponentActivity.onSaveInstanceState(ComponentActivity.java:336)
	at android.app.Activity.performSaveInstanceState(Activity.java:2221)
	at android.app.Instrumentation.callActivityOnSaveInstanceState(Instrumentation.java:1601)
	at android.app.ActivityThread.callActivityOnSaveInstanceState(ActivityThread.java:5792)
	at android.app.ActivityThread.callActivityOnStop(ActivityThread.java:5190)
	at android.app.ActivityThread.performStopActivityInner(ActivityThread.java:5156)
	at android.app.ActivityThread.handleStopActivity(ActivityThread.java:5221)
	at android.app.servertransaction.StopActivityItem.execute(StopActivityItem.java:43)
	at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
	at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2308)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loopOnce(Looper.java:201)
	at android.os.Looper.loop(Looper.java:288)
	at android.app.ActivityThread.main(ActivityThread.java:7878)
	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)

I was doing:

Switch between apps

Thank you for fixing! :)

Ilma M.

Generated with https://lab.reyboz.it/libre-busto/crash-report/ (P15)