<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Crash in com.esri.arcgisruntime.internal.jni.CoreMapView.nativeLocationToScreen in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/crash-in-com-esri-arcgisruntime-internal-jni/m-p/1256896#M5963</link>
    <description>&lt;P&gt;Good afternoon,&lt;/P&gt;&lt;P&gt;We have an app, which uses&amp;nbsp;com.esri.arcgisruntime:arcgis-android:100.15.0. It is published in Google Play.&lt;/P&gt;&lt;P&gt;Google Play console tells that we have quite a lot of crashes here:&lt;/P&gt;&lt;PRE&gt;Exception com.esri.arcgisruntime.ArcGISRuntimeException: Null pointer.: map_point.get_spatial_reference()
  at com.esri.arcgisruntime.internal.jni.CoreMapView.nativeLocationToScreen
  at com.esri.arcgisruntime.internal.jni.CoreMapView.a (SourceFile:8)
  at com.esri.arcgisruntime.internal.mapping.view.p.a (SourceFile:31)
  at com.esri.arcgisruntime.mapping.view.MapView.locationToScreen (SourceFile:5)
  at com.esri.arcgisruntime.mapping.view.Callout$d.onLayout (SourceFile:8)
  at android.view.View.layout (View.java:24958)
  at android.view.ViewGroup.layout (ViewGroup.java:6784)
  at com.esri.arcgisruntime.mapping.view.MapView.onLayout (SourceFile:8)
  at android.view.View.layout (View.java:24958)
  at android.view.ViewGroup.layout (ViewGroup.java:6784)
  at android.widget.FrameLayout.layoutChildren (FrameLayout.java:332)
  at android.widget.FrameLayout.onLayout (FrameLayout.java:270)
  at android.view.View.layout (View.java:24958)
  at android.view.ViewGroup.layout (ViewGroup.java:6784)
  at android.widget.FrameLayout.layoutChildren (FrameLayout.java:332)
  at android.widget.FrameLayout.onLayout (FrameLayout.java:270)
  at android.view.View.layout (View.java:24958)
  at android.view.ViewGroup.layout (ViewGroup.java:6784)
  at androidx.drawerlayout.widget.DrawerLayout.onLayout (DrawerLayout.java:1263)
  at android.view.View.layout (View.java:24958)
  at android.view.ViewGroup.layout (ViewGroup.java:6784)
  at android.widget.FrameLayout.layoutChildren (FrameLayout.java:332)
  at android.widget.FrameLayout.onLayout (FrameLayout.java:270)
  at android.view.View.layout (View.java:24958)
  at android.view.ViewGroup.layout (ViewGroup.java:6784)
  at androidx.appcompat.widget.ActionBarOverlayLayout.onLayout (ActionBarOverlayLayout.java:536)
  at android.view.View.layout (View.java:24958)
  at android.view.ViewGroup.layout (ViewGroup.java:6784)
  at android.widget.FrameLayout.layoutChildren (FrameLayout.java:332)
  at android.widget.FrameLayout.onLayout (FrameLayout.java:270)
  at android.view.View.layout (View.java:24958)
  at android.view.ViewGroup.layout (ViewGroup.java:6784)
  at android.widget.LinearLayout.setChildFrame (LinearLayout.java:1829)
  at android.widget.LinearLayout.layoutVertical (LinearLayout.java:1673)
  at android.widget.LinearLayout.onLayout (LinearLayout.java:1582)
  at android.view.View.layout (View.java:24958)
  at android.view.ViewGroup.layout (ViewGroup.java:6784)
  at android.widget.FrameLayout.layoutChildren (FrameLayout.java:332)
  at android.widget.FrameLayout.onLayout (FrameLayout.java:270)
  at com.android.internal.policy.DecorView.onLayout (DecorView.java:1418)
  at android.view.View.layout (View.java:24958)
  at android.view.ViewGroup.layout (ViewGroup.java:6784)
  at android.view.ViewRootImpl.performLayout (ViewRootImpl.java:4787)
  at android.view.ViewRootImpl.performTraversals (ViewRootImpl.java:4115)
  at android.view.ViewRootImpl.doTraversal (ViewRootImpl.java:2991)
  at android.view.ViewRootImpl$TraversalRunnable.run (ViewRootImpl.java:10665)
  at android.view.Choreographer$CallbackRecord.run (Choreographer.java:1301)
  at android.view.Choreographer$CallbackRecord.run (Choreographer.java:1309)
  at android.view.Choreographer.doCallbacks (Choreographer.java:923)
  at android.view.Choreographer.doFrame (Choreographer.java:852)
  at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:1283)
  at android.os.Handler.handleCallback (Handler.java:942)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at android.os.Looper.loopOnce (Looper.java:226)
  at android.os.Looper.loop (Looper.java:313)
  at android.app.ActivityThread.main (ActivityThread.java:8741)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:571)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1067)&lt;/PRE&gt;&lt;P&gt;Most of these crashes occur in "&lt;SPAN class=""&gt;POCO vayu" device. Can you elaborate what to do? How to debug that if it happens in some internal SDK module IMHO?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 10 Feb 2023 08:42:43 GMT</pubDate>
    <dc:creator>D_R_</dc:creator>
    <dc:date>2023-02-10T08:42:43Z</dc:date>
    <item>
      <title>Crash in com.esri.arcgisruntime.internal.jni.CoreMapView.nativeLocationToScreen</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/crash-in-com-esri-arcgisruntime-internal-jni/m-p/1256896#M5963</link>
      <description>&lt;P&gt;Good afternoon,&lt;/P&gt;&lt;P&gt;We have an app, which uses&amp;nbsp;com.esri.arcgisruntime:arcgis-android:100.15.0. It is published in Google Play.&lt;/P&gt;&lt;P&gt;Google Play console tells that we have quite a lot of crashes here:&lt;/P&gt;&lt;PRE&gt;Exception com.esri.arcgisruntime.ArcGISRuntimeException: Null pointer.: map_point.get_spatial_reference()
  at com.esri.arcgisruntime.internal.jni.CoreMapView.nativeLocationToScreen
  at com.esri.arcgisruntime.internal.jni.CoreMapView.a (SourceFile:8)
  at com.esri.arcgisruntime.internal.mapping.view.p.a (SourceFile:31)
  at com.esri.arcgisruntime.mapping.view.MapView.locationToScreen (SourceFile:5)
  at com.esri.arcgisruntime.mapping.view.Callout$d.onLayout (SourceFile:8)
  at android.view.View.layout (View.java:24958)
  at android.view.ViewGroup.layout (ViewGroup.java:6784)
  at com.esri.arcgisruntime.mapping.view.MapView.onLayout (SourceFile:8)
  at android.view.View.layout (View.java:24958)
  at android.view.ViewGroup.layout (ViewGroup.java:6784)
  at android.widget.FrameLayout.layoutChildren (FrameLayout.java:332)
  at android.widget.FrameLayout.onLayout (FrameLayout.java:270)
  at android.view.View.layout (View.java:24958)
  at android.view.ViewGroup.layout (ViewGroup.java:6784)
  at android.widget.FrameLayout.layoutChildren (FrameLayout.java:332)
  at android.widget.FrameLayout.onLayout (FrameLayout.java:270)
  at android.view.View.layout (View.java:24958)
  at android.view.ViewGroup.layout (ViewGroup.java:6784)
  at androidx.drawerlayout.widget.DrawerLayout.onLayout (DrawerLayout.java:1263)
  at android.view.View.layout (View.java:24958)
  at android.view.ViewGroup.layout (ViewGroup.java:6784)
  at android.widget.FrameLayout.layoutChildren (FrameLayout.java:332)
  at android.widget.FrameLayout.onLayout (FrameLayout.java:270)
  at android.view.View.layout (View.java:24958)
  at android.view.ViewGroup.layout (ViewGroup.java:6784)
  at androidx.appcompat.widget.ActionBarOverlayLayout.onLayout (ActionBarOverlayLayout.java:536)
  at android.view.View.layout (View.java:24958)
  at android.view.ViewGroup.layout (ViewGroup.java:6784)
  at android.widget.FrameLayout.layoutChildren (FrameLayout.java:332)
  at android.widget.FrameLayout.onLayout (FrameLayout.java:270)
  at android.view.View.layout (View.java:24958)
  at android.view.ViewGroup.layout (ViewGroup.java:6784)
  at android.widget.LinearLayout.setChildFrame (LinearLayout.java:1829)
  at android.widget.LinearLayout.layoutVertical (LinearLayout.java:1673)
  at android.widget.LinearLayout.onLayout (LinearLayout.java:1582)
  at android.view.View.layout (View.java:24958)
  at android.view.ViewGroup.layout (ViewGroup.java:6784)
  at android.widget.FrameLayout.layoutChildren (FrameLayout.java:332)
  at android.widget.FrameLayout.onLayout (FrameLayout.java:270)
  at com.android.internal.policy.DecorView.onLayout (DecorView.java:1418)
  at android.view.View.layout (View.java:24958)
  at android.view.ViewGroup.layout (ViewGroup.java:6784)
  at android.view.ViewRootImpl.performLayout (ViewRootImpl.java:4787)
  at android.view.ViewRootImpl.performTraversals (ViewRootImpl.java:4115)
  at android.view.ViewRootImpl.doTraversal (ViewRootImpl.java:2991)
  at android.view.ViewRootImpl$TraversalRunnable.run (ViewRootImpl.java:10665)
  at android.view.Choreographer$CallbackRecord.run (Choreographer.java:1301)
  at android.view.Choreographer$CallbackRecord.run (Choreographer.java:1309)
  at android.view.Choreographer.doCallbacks (Choreographer.java:923)
  at android.view.Choreographer.doFrame (Choreographer.java:852)
  at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:1283)
  at android.os.Handler.handleCallback (Handler.java:942)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at android.os.Looper.loopOnce (Looper.java:226)
  at android.os.Looper.loop (Looper.java:313)
  at android.app.ActivityThread.main (ActivityThread.java:8741)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:571)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1067)&lt;/PRE&gt;&lt;P&gt;Most of these crashes occur in "&lt;SPAN class=""&gt;POCO vayu" device. Can you elaborate what to do? How to debug that if it happens in some internal SDK module IMHO?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2023 08:42:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/crash-in-com-esri-arcgisruntime-internal-jni/m-p/1256896#M5963</guid>
      <dc:creator>D_R_</dc:creator>
      <dc:date>2023-02-10T08:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: Crash in com.esri.arcgisruntime.internal.jni.CoreMapView.nativeLocationToScreen</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/crash-in-com-esri-arcgisruntime-internal-jni/m-p/1257140#M5964</link>
      <description>&lt;P&gt;Are you explicitly calling&amp;nbsp;MapView.locationToScreen(Point) &lt;A href="https://developers.arcgis.com/android/api-reference/reference/com/esri/arcgisruntime/mapping/view/MapView.html#locationToScreen(com.esri.arcgisruntime.geometry.Point)" target="_blank"&gt;MapView (ArcGIS Runtime SDK for Android 100.15.1)&lt;/A&gt;? If so, check the point has a spatial reference before calling that method (i.e. spatial reference is not null)&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2023 18:06:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/crash-in-com-esri-arcgisruntime-internal-jni/m-p/1257140#M5964</guid>
      <dc:creator>MichaelBranscomb</dc:creator>
      <dc:date>2023-02-10T18:06:58Z</dc:date>
    </item>
    <item>
      <title>Re: Crash in com.esri.arcgisruntime.internal.jni.CoreMapView.nativeLocationToScreen</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/crash-in-com-esri-arcgisruntime-internal-jni/m-p/1257149#M5965</link>
      <description>&lt;P&gt;No, I never call it explicitly!&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2023 18:32:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/crash-in-com-esri-arcgisruntime-internal-jni/m-p/1257149#M5965</guid>
      <dc:creator>D_R_</dc:creator>
      <dc:date>2023-02-10T18:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: Crash in com.esri.arcgisruntime.internal.jni.CoreMapView.nativeLocationToScreen</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/crash-in-com-esri-arcgisruntime-internal-jni/m-p/1257181#M5966</link>
      <description>&lt;P&gt;Can you share the code showing how you setup/initialize the mapview, map, and layers?&lt;/P&gt;&lt;P&gt;If you're not calling it explicitly, perhaps somehow &lt;SPAN&gt;locationToScreen is being called internally before the spatial reference for the Map is initialized.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2023 19:45:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/crash-in-com-esri-arcgisruntime-internal-jni/m-p/1257181#M5966</guid>
      <dc:creator>MichaelBranscomb</dc:creator>
      <dc:date>2023-02-10T19:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: Crash in com.esri.arcgisruntime.internal.jni.CoreMapView.nativeLocationToScreen</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/crash-in-com-esri-arcgisruntime-internal-jni/m-p/1257184#M5967</link>
      <description>&lt;P&gt;Hmm... I am not sure if I can paste big chunks of my code, but map's initialization looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="kotlin"&gt;var map: ArcGISMap? = null
// ... Some other stuff...
map = ArcGISMap()
val envelope = Envelope(
	306520.146,
	5973291.05,
	680103.277,
	6257813.452,
	SpatialReference.create(3346)
)
map?.initialViewpoint = Viewpoint(envelope)
map?.minScale = 3000000.0
map?.addDoneLoadingListener {
	try {
		if (map?.loadStatus == LoadStatus.LOADED) {
			mapView?.map = map
			mapView?.visibility = View.VISIBLE
			// ...
		} else {
			// ...
		}
	} catch (e: Exception) {
		// ...
	}
}
val layer = ArcGISTiledLayer("our_service_url")
layer.addDoneLoadingListener {
	map?.basemap?.baseLayers?.add(layer)
	if (map?.loadStatus == LoadStatus.NOT_LOADED) {
		map?.loadAsync()
	}
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Feb 2023 08:41:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/crash-in-com-esri-arcgisruntime-internal-jni/m-p/1257184#M5967</guid>
      <dc:creator>D_R_</dc:creator>
      <dc:date>2023-02-11T08:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: Crash in com.esri.arcgisruntime.internal.jni.CoreMapView.nativeLocationToScreen</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/crash-in-com-esri-arcgisruntime-internal-jni/m-p/1257810#M5973</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;From the stacktrace it appears the exception is coming from the Callout code. Internally the Callout does call&amp;nbsp;&lt;SPAN&gt;MapView.locationToScreen.&amp;nbsp;&lt;/SPAN&gt; Can you check if the location being set on the Callout has the required spatial reference?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Rama&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 00:35:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/crash-in-com-esri-arcgisruntime-internal-jni/m-p/1257810#M5973</guid>
      <dc:creator>RamaChintapalli</dc:creator>
      <dc:date>2023-02-14T00:35:47Z</dc:date>
    </item>
    <item>
      <title>Re: Crash in com.esri.arcgisruntime.internal.jni.CoreMapView.nativeLocationToScreen</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/crash-in-com-esri-arcgisruntime-internal-jni/m-p/1257875#M5976</link>
      <description>&lt;P&gt;Thanks! I added some "ifs" in my code... If no point or no point's spatial reference -&amp;gt; don't show callout.&lt;/P&gt;&lt;P&gt;It will take some weeks or even months to see if we are rid of this crash &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It is hard to debug our callout as geometry for it is generated from server-side data using&amp;nbsp;Geometry.fromJson().&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 08:57:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/crash-in-com-esri-arcgisruntime-internal-jni/m-p/1257875#M5976</guid>
      <dc:creator>D_R_</dc:creator>
      <dc:date>2023-02-14T08:57:17Z</dc:date>
    </item>
  </channel>
</rss>

