I've been struggling with the runOnFirstFix() method for quite a long time. And maybe the problem is in that first line that says Running deferred on first fix
.
The thing is, when the first fix gets executed and I am displaying some dialog in that moment, it crashes quite frequently.
I've extracted the following from the logcat:
I/Maps.MyLocationOverlay( 2425): Running deferred on first fix: com.MyApp.Map$2@43aef8e8
W/dalvikvm( 2425): threadid=23: thread exiting with uncaught exception (group=0x4001e170)
E/AndroidRuntime( 2425): Uncaught handler: thread Thread-24 exiting due to uncaught exception
E/AndroidRuntime( 2425): java.lang.NullPointerException
E/AndroidRuntime( 2425): at com.google.android.maps.MapController.animateTo(MapController.java:232)
E/AndroidRuntime( 2425): at com.google.android.maps.MapController.animateTo(MapController.java:203)
E/AndroidRuntime( 2425): at com.MyApp.Map$2.run(Map.java:129)
E/AndroidRuntime( 2425): at java.lang.Thread.run(Thread.java:1096)
I haven't found any reference to anything similar and that makes me suspect I am doing something wrong in a very basic level. Has anyone seen this before?