OneBusAway / onebusaway-android

The official Android app for OneBusAway
http://www.onebusaway.org/
Other
475 stars 292 forks source link

[Crash] - NullPointerException in UIUtils.getAllSituations #1278

Open amrhossamdev opened 1 week ago

amrhossamdev commented 1 week ago

Summary:

The app crashed with a java.lang.NullPointerException when trying to get the length of a null situation array.

How can we reproduce the issue?

  1. Navigate to the Arrivals List.
  2. Wait for the arrival list to load.

it's not guaranteed it'll happen.

Observed behavior:

The app crashes with a NullPointerException.

Stacktrace

Fatal Exception: java.lang.NullPointerException
Attempt to get length of null array
org.onebusaway.android.util.UIUtils.getAllSituations (UIUtils.java:105)
org.onebusaway.android.ui.ArrivalsListFragment.onLoadFinished (ArrivalsListFragment.java)
org.onebusaway.android.ui.ArrivalsListFragment.onLoadFinished (ArrivalsListFragment.java)
org.onebusaway.android.ui.ArrivalsListFragment.onLoadFinished (ArrivalsListFragment.java)
org.onebusaway.android.ui.ArrivalsListFragment.onLoadFinished (ArrivalsListFragment.java)
androidx.loader.app.LoaderManagerImpl$LoaderObserver.onChanged (LoaderManagerImpl.java:46)
androidx.loader.content.Loader.deliverResult (Loader.java:4)
org.onebusaway.android.ui.ArrivalsListLoader.deliverResult (ArrivalsListLoader.java)
org.onebusaway.android.ui.ArrivalsListLoader.deliverResult (ArrivalsListLoader.java)
org.onebusaway.android.ui.ArrivalsListLoader.deliverResult (ArrivalsListLoader.java)
org.onebusaway.android.ui.ArrivalsListLoader.deliverResult (ArrivalsListLoader.java)

Device and Android version:

App Version: 2.14.4 (148) OS Version: Android 14 Device Model: Pixel 6a

amrhossamdev commented 1 week ago

Currently can't reproduce... I will keep that open.