PDA

View Full Version : Android: SKCircle - Single Tap - Crash



kimyll
18.03.2015, 16:37
Added a SKCircle to a map view. Then I launched the app and tapped the circle. Result is a crash every time. Is this a bug or what is going on?

mapView.addCircle(circle);

->

03-18 15:02:59.368: D/SKMaps(14109): SKMapSurfaceView----SINGLE TAP CONFIRMED NONE
03-18 15:02:59.368: D/SkobblerNG(14109): NG_IsCCPAtPosition(229.333328, 126.666664, 20.000000) = 0
03-18 15:02:59.368: D/SKMaps(14109): SKMapSurfaceView----Check north indicator 4 688.0 380.0 0 0 0 0
03-18 15:02:59.368: E/SKMaps(14109): SKMapSurfaceView---- CHECK MAP INFO customPoiId=-1
03-18 15:02:59.398: D/AndroidRuntime(14109): Shutting down VM
03-18 15:02:59.398: W/dalvikvm(14109): threadid=1: thread exiting with uncaught exception (group=0x4184cda0)
03-18 15:02:59.398: E/AndroidRuntime(14109): FATAL EXCEPTION: main
03-18 15:02:59.398: E/AndroidRuntime(14109): Process: fi.test.map2, PID: 14109
03-18 15:02:59.398: E/AndroidRuntime(14109): java.lang.NullPointerException
03-18 15:02:59.398: E/AndroidRuntime(14109): at com.skobbler.ngx.map.SKMapSurfaceView.b(SourceFile :70)
03-18 15:02:59.398: E/AndroidRuntime(14109): at com.skobbler.ngx.map.SKMapSurfaceView$GestureDetec torListener.onSingleTapConfirmed(SourceFile:1095)
03-18 15:02:59.398: E/AndroidRuntime(14109): at android.view.GestureDetector$GestureHandler.handle Message(GestureDetector.java:315)
03-18 15:02:59.398: E/AndroidRuntime(14109): at android.os.Handler.dispatchMessage(Handler.java:10 2)
03-18 15:02:59.398: E/AndroidRuntime(14109): at android.os.Looper.loop(Looper.java:157)
03-18 15:02:59.398: E/AndroidRuntime(14109): at android.app.ActivityThread.main(ActivityThread.jav a:5356)
03-18 15:02:59.398: E/AndroidRuntime(14109): at java.lang.reflect.Method.invokeNative(Native Method)
03-18 15:02:59.398: E/AndroidRuntime(14109): at java.lang.reflect.Method.invoke(Method.java:515)
03-18 15:02:59.398: E/AndroidRuntime(14109): at com.android.internal.os.ZygoteInit$MethodAndArgsCa ller.run(ZygoteInit.java:1265)
03-18 15:02:59.398: E/AndroidRuntime(14109): at com.android.internal.os.ZygoteInit.main(ZygoteInit .java:1081)
03-18 15:02:59.398: E/AndroidRuntime(14109): at dalvik.system.NativeStart.main(Native Method)

kimyll
19.03.2015, 14:06
Seems that I forgot setMapSurfaceListener.

dandronic
19.03.2015, 14:20
So now the issue is fixed?

kimyll
19.03.2015, 18:22
Yes, this issue is fixed.

This line was missing:
mapView.setMapSurfaceListener(this);