0

Seeing this in the wild in our application, but cannot reproduce on the bench. Stack trace below. Asking here because this seems to be the primary support forum for HERE maps.

I haven't been able to find anything on the HERE maps website or other SO questions that point to this same issue, so just curious if HERE support would like to chime in.

Device: SM-G935F Android version: 8.0.0

java.lang.NullPointerException: Attempt to read from field 'java.util.concurrent.Semaphore com.nokia.maps.e0.a' on a null object reference
at com.nokia.maps.e0.b(SourceFile:1)
at com.nokia.maps.e0$d.a(SourceFile:8)
at com.nokia.maps.e0$b.onSurfaceTextureSizeChanged(SourceFile:3)
at android.view.TextureView.onSizeChanged(TextureView.java:367)
at android.view.View.sizeChange(View.java:21006)
at android.view.View.setFrame(View.java:20948)
at android.view.View.layout(View.java:20851)
at com.here.android.mpa.mapping.MapView.onLayout(SourceFile:2)
at android.view.View.layout(View.java:20854)
at android.view.ViewGroup.layout(ViewGroup.java:6401)
at androidx.constraintlayout.widget.ConstraintLayout.onLayout(SourceFile:12)
at android.view.View.layout(View.java:20854)
at android.view.ViewGroup.layout(ViewGroup.java:6401)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at android.view.View.layout(View.java:20854)
at android.view.ViewGroup.layout(ViewGroup.java:6401)
at androidx.constraintlayout.widget.ConstraintLayout.onLayout(SourceFile:12)
at android.view.View.layout(View.java:20854)
at android.view.ViewGroup.layout(ViewGroup.java:6401)
at androidx.coordinatorlayout.widget.CoordinatorLayout.onLayoutChild(SourceFile:55)
at androidx.coordinatorlayout.widget.CoordinatorLayout.onLayout(SourceFile:8)
at android.view.View.layout(View.java:20854)
at android.view.ViewGroup.layout(ViewGroup.java:6401)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at android.view.View.layout(View.java:20854)
at android.view.ViewGroup.layout(ViewGroup.java:6401)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1791)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1635)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1544)
at android.view.View.layout(View.java:20854)
at android.view.ViewGroup.layout(ViewGroup.java:6401)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at android.view.View.layout(View.java:20854)
at android.view.ViewGroup.layout(ViewGroup.java:6401)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1791)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1635)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1544)
at android.view.View.layout(View.java:20854)
at android.view.ViewGroup.layout(ViewGroup.java:6401)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at com.android.internal.policy.DecorView.onLayout(DecorView.java:945)
at android.view.View.layout(View.java:20854)
at android.view.ViewGroup.layout(ViewGroup.java:6401)
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2956)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2643)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1780)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7827)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:911)
at android.view.Choreographer.doCallbacks(Choreographer.java:723)
at android.view.Choreographer.doFrame(Choreographer.java:658)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6944)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Yann
  • 1
  • Could you let us know the type and version of SDK used in the app? Also, any information, like what actions performed before the exception, log's before or after the exception, will also help us investigate the issue. –  Jun 22 '20 at 02:59
  • It seems to occur immediately after the route is downloaded (onCalculateRouteFinished called). At this point, I populate a LiveData value with the route and call /* Create a MapRoute so that it can be placed on the map */ mapRoute = MapRoute(route) /* Add the MapRoute to the map */ map?.addMapObject(mapRoute) I'm not sure if this is the exact point at which the issue occurs, but this may be what is triggering the layout update of the AndroidXMapFragment – Yann Jun 24 '20 at 03:18
  • In terms of the SDK, it's the Here maps Premium SDK version 3.13.2_86 – Yann Jun 25 '20 at 01:09
  • Does this answer your question? [What is a NullPointerException, and how do I fix it?](https://stackoverflow.com/questions/218384/what-is-a-nullpointerexception-and-how-do-i-fix-it) – Peter Duniho Nov 04 '20 at 03:25

1 Answers1

0

It seems like LiveData source has some null values. the array or variable that collecting the data does receiving null values and it hasn't been handled at your end. The error says null pointer exception for the reference. It doesn't seen coming from the mSDK premium. can look further if code snippets could be shared.

  • Hello! I can confirm from my application logs that the LiveData value is not null, and in fact contains a valid. Also the assertion that "It doesn't seen coming from the mSDK premium" seems bizarre, considering the first three lines of the stack trace are _entirely_ SDK code, as is the site of the NPE itself. Finally, the object that appears to be null is a java.util.concurrent.Semaphore (com.nokia.maps.e0.a), which is never used in our application code. Due to code obfuscation, I can't see which class corresponds to com.nokia.maps.e0, but it appears to be a TextureView. – Yann Jun 25 '20 at 07:29
  • Please help in sharing some code snippets so that we could look further –  Jun 25 '20 at 17:30