PDA

View Full Version : [Android] Exception thrown if double tap before map loads



deleurapps
04.06.2015, 04:47
Ok, so I noticed one bug which is present in my application and in the sample skobbler app. If you double tap or long tap on the loading screen (where its just back and white squares) before the Surface View loads, the app throws an exception. Here is the error:

Process: com.skobbler.sdkdemo, PID: 3387
E/AndroidRuntime( 3387): java.lang.NullPointerException: Attempt to invoke virtual method 'void com.skobbler.ngx.map.SKMapSurfaceView.zoomInAt(com .skobbler.ngx.map.SKScreenPoint)' on a null object reference
E/AndroidRuntime( 3387): at com.skobbler.sdkdemo.activity.MapActivity.onDouble Tap(MapActivity.java:1979)
E/AndroidRuntime( 3387): at com.skobbler.ngx.map.SKMapSurfaceView$GestureDetec torListener.onDoubleTap(SourceFile:1162)
E/AndroidRuntime( 3387): at android.view.GestureDetector.onTouchEvent(GestureD etector.java:555)
E/AndroidRuntime( 3387): at com.skobbler.ngx.map.SKMapSurfaceView.onTouchEvent (SourceFile:782)
E/AndroidRuntime( 3387): at android.view.View.dispatchTouchEvent(View.java:844 4)
E/AndroidRuntime( 3387): at android.view.ViewGroup.dispatchTransformedTouchEve nt(ViewGroup.java:2436)
E/AndroidRuntime( 3387): at android.view.ViewGroup.dispatchTouchEvent(ViewGrou p.java:2119)
E/AndroidRuntime( 3387): at android.view.ViewGroup.dispatchTransformedTouchEve nt(ViewGroup.java:2436)
E/AndroidRuntime( 3387): at android.view.ViewGroup.dispatchTouchEvent(ViewGrou p.java:2119)
E/AndroidRuntime( 3387): at android.view.ViewGroup.dispatchTransformedTouchEve nt(ViewGroup.java:2436)
E/AndroidRuntime( 3387): at android.view.ViewGroup.dispatchTouchEvent(ViewGrou p.java:2119)
E/AndroidRuntime( 3387): at android.view.ViewGroup.dispatchTransformedTouchEve nt(ViewGroup.java:2436)
E/AndroidRuntime( 3387): at android.view.ViewGroup.dispatchTouchEvent(ViewGrou p.java:2119)
E/AndroidRuntime( 3387): at android.view.ViewGroup.dispatchTransformedTouchEve nt(ViewGroup.java:2436)
E/AndroidRuntime( 3387): at android.view.ViewGroup.dispatchTouchEvent(ViewGrou p.java:2119)
E/AndroidRuntime( 3387): at android.view.ViewGroup.dispatchTransformedTouchEve nt(ViewGroup.java:2436)
E/AndroidRuntime( 3387): at android.view.ViewGroup.dispatchTouchEvent(ViewGrou p.java:2119)
E/AndroidRuntime( 3387): at android.view.ViewGroup.dispatchTransformedTouchEve nt(ViewGroup.java:2436)
E/AndroidRuntime( 3387): at android.view.ViewGroup.dispatchTouchEvent(ViewGrou p.java:2119)
E/AndroidRuntime( 3387): at android.view.ViewGroup.dispatchTransformedTouchEve nt(ViewGroup.java:2436)
E/AndroidRuntime( 3387): at android.view.ViewGroup.dispatchTouchEvent(ViewGrou p.java:2119)
E/AndroidRuntime( 3387): at com.android.internal.policy.impl.PhoneWindow$Decor View.superDispatchTouchEvent(PhoneWindow.java:2383 )
E/AndroidRuntime( 3387): at com.android.internal.policy.impl.PhoneWindow.super DispatchTouchEvent(PhoneWindow.java:1724)
E/AndroidRuntime( 3387): at android.app.Activity.dispatchTouchEvent(Activity.j ava:2764)
E/AndroidRuntime( 3387): at com.android.internal.policy.impl.PhoneWindow$Decor View.dispatchTouchEvent(PhoneWindow.java:2332)
E/AndroidRuntime( 3387): at android.view.View.dispatchPointerEvent(View.java:8 655)
E/AndroidRuntime( 3387): at android.view.ViewRootImpl$ViewPostImeInputStage.pr ocessPointerEvent(ViewRootImpl.java:4238)
E/AndroidRuntime( 3387): at android.view.ViewRootImpl$ViewPostImeInputStage.on Process(ViewRootImpl.java:4094)
E/AndroidRuntime( 3387): at android.view.ViewRootImpl$InputStage.deliver(ViewR ootImpl.java:3635)
E/AndroidRuntime( 3387): at android.view.ViewRootImpl$InputStage.onDeliverToNe xt(ViewRootImpl.java:3694)
E/AndroidRuntime( 3387): at android.view.ViewRootImpl$InputStage.forward(ViewR ootImpl.java:3660)
E/AndroidRuntime( 3387): at android.view.ViewRootImpl$AsyncInputStage.forward( ViewRootImpl.java:3773)
E/AndroidRuntime( 3387): at android.view.ViewRootImpl$InputStage.apply(ViewRoo tImpl.java:3668)
E/AndroidRuntime( 3387): at android.view.ViewRootImpl$AsyncInputStage.apply(Vi ewRootImpl.java:3830)
E/AndroidRuntime( 3387): at android.view.ViewRootImpl$InputStage.deliver(ViewR ootImpl.java:3640)
E/AndroidRuntime( 3387): at android.view.ViewRootImpl$InputStage.onDeliverToNe xt(ViewRootImpl.java:3694)
E/AndroidRuntime( 3387): at android.view.ViewRootImpl$InputStage.forward(ViewR ootImpl.java:3660)
E/AndroidRuntime( 3387): at android.view.ViewRootImpl$InputStage.apply(ViewRoo tImpl.java:3668)
E/AndroidRuntime( 3387): at android.view.ViewRootImpl$InputStage.deliver(ViewR ootImpl.java:3640)
E/AndroidRuntime( 3387): at android.view.ViewRootImpl.deliverInputEvent(ViewRo otImpl.java:5940)
E/AndroidRuntime( 3387): at android.view.ViewRootImpl.doProcessInputEvents(Vie wRootImpl.java:5908)
E/AndroidRuntime( 3387): at android.view.ViewRootImpl.enqueueInputEvent(ViewRo otImpl.java:5872)
E/AndroidRuntime( 3387): at android.view.ViewRootImpl$WindowInputEventReceiver .onInputEvent(ViewRootImpl.java:6030)
E/AndroidRuntime( 3387): at android.view.InputEventReceiver.dispatchInputEvent (InputEventReceiver.java:211)
E/AndroidRuntime( 3387): at android.os.MessageQueue.nativePollOnce(Native Method)
E/AndroidRuntime( 3387): at android.os.MessageQueue.next(MessageQueue.java:153 )
E/AndroidRuntime( 3387): at android.os.Looper.loop(Looper.java:131)
E/AndroidRuntime( 3387): at android.app.ActivityThread.main(ActivityThread.jav a:5696)
E/AndroidRuntime( 3387): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 3387): at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime( 3387): at com.android.internal.os.ZygoteInit$MethodAndArgsCa ller.run(ZygoteInit.java:1028)
E/AndroidRuntime( 3387): at com.android.internal.os.ZygoteInit.main
E/ActivityManager( 1969): App crashed! Process: com.skobbler.sdkdemo

Adela_Silvia
04.06.2015, 14:35
We've reported the issue to our dev team. We'll get back with an answer asap, until then can you please let us know on which version of the SDK have you encounter this issue(2.4 or 2.5)?

deleurapps
04.06.2015, 20:13
This was on 2.5

Adela_Silvia
18.06.2015, 16:15
Hi deleurapps,

Indeed the issue reported by you it's a bug on our side. We will try to fix it for the next SDK release. Thank you for reporting it.