java.lang.NullPointerException: Attempt to invoke virtual method
'void com.google.android.gms.maps.GoogleMap.moveCamera(
com.google.android.gms.maps.CameraUpdate)'
on a null object reference
at org.azavea.otm.ui.MainMapFragment.lambda$null$3
(MainMapFragment.java:488)
It's probably a race condition.
Tame the asynchronous control flow to eliminate race conditions.
AFAIK, this fixes all race conditions except open question #1 below.
Unknown how many rollbar errors it will eliminate, but should
eliminate the original npe.
Use jDeferred to synchronize between asynchronous flows
Move most initialization from onCreateView to onActivityCreated
Move google api connect, map fetch, and add mode cancel to onStart
Update MapHelper to use current google availability api
Open questions:
Need a way to manage the MapHelper google api dialog to determine
whether the play store services problem gets resolved,
and fail catastrophically if it doesn't.
Need a way to test missing play store services without wrecking my phone.
Fails to fix # 297, clearing the filter repositions the camera
Probably shouldn't create new Deferred objects if they
already exist, but haven't noticed any negative effects of doing so
I don't know enough about the tile cache to be sure when it needs
to be cleared.
Rollbar registered the following error:
It's probably a race condition. Tame the asynchronous control flow to eliminate race conditions.
AFAIK, this fixes all race conditions except open question #1 below. Unknown how many rollbar errors it will eliminate, but should eliminate the original npe.
Refer to
Changes:
onActivityCreated
onStart
MapHelper
to use current google availability apiOpen questions:
MapHelper
google api dialog to determine whether the play store services problem gets resolved, and fail catastrophically if it doesn't.Deferred
objects if they already exist, but haven't noticed any negative effects of doing so--
Connects to #294