Select to view content in your preferred language

Application crashes when trying to get KML nodes near a specified point (Android Runtime SDK 10.2.9)

771
1
09-23-2020 03:14 AM
MohammedAbdul_Azeez
New Contributor


For our application we are using ArcGIS Runtime SDK for Android 10.2.9.

In the application, we are able to add KML using KmlLayer.
But when we try get the KmlNode[], near a tapped point,
using the provided getKmlNodes(double x, double y, int tolerance) method,
the application randomly crashes.
We tried using try/catch to catch the error and also tried changing tolerance values.

Also, we have tested in many devices and with different KML files as well. 


In Logcat we are getting the following error
"A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0xe9 in tid 25802 (om.ex.test), pid 25802 (com.ex.test)"

2020-09-21 20:17:45.447 8395-8395/com.example.test A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0xe9 in tid 8395 (com.example.test), pid 8395 (com.example.test)
2020-09-21 20:17:45.594 9022-9022/? I/crash_dump32: obtaining output fd from tombstoned, type: kDebuggerdTombstone
2020-09-21 20:17:45.598 852-852/? I//system/bin/tombstoned: received crash request for pid 8395
2020-09-21 20:17:45.600 9022-9022/? I/crash_dump32: performing dump of process 8395 (target tid = 8395)
2020-09-21 20:17:45.600 9022-9022/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2020-09-21 20:17:45.600 9022-9022/? A/DEBUG: Build fingerprint: 'motorola/athene_f/athene_f:8.1.0/1ec4b:user/release-keys'
2020-09-21 20:17:45.600 9022-9022/? A/DEBUG: Revision: 'p2a0'	
2020-09-21 20:17:45.601 9022-9022/? A/DEBUG: ABI: 'arm'
2020-09-21 20:17:45.601 9022-9022/? A/DEBUG: pid: 8395, tid: 8395, name: com.example.test  >>> com.example.test <<<
2020-09-21 20:17:45.601 9022-9022/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xe9
2020-09-21 20:17:45.601 9022-9022/? A/DEBUG: Cause: null pointer dereference
2020-09-21 20:17:45.601 9022-9022/? A/DEBUG:     r0 00000000  r1 be864f10  r2 be864f00  r3 00000001
2020-09-21 20:17:45.601 9022-9022/? A/DEBUG:     r4 00000000  r5 41442647  r6 5b1b4b41  r7 41605592
2020-09-21 20:17:45.601 9022-9022/? A/DEBUG:     r8 8a203900  r9 8a133080  sl 00000005  fp be865030
2020-09-21 20:17:45.601 9022-9022/? A/DEBUG:     ip be864f00  sp be864ef8  lr 8437b5d0  pc 843c3e2c  cpsr a00f0010
2020-09-21 20:17:45.615 9022-9022/? A/DEBUG: backtrace:
2020-09-21 20:17:45.616 9022-9022/? A/DEBUG:     #00 pc 008bbe2c  /data/app/com.example.test-dPnC0d7dY5ma3EEUZ7XRQw==/lib/arm/libruntimecore_java.so (Esri_runtimecore::Map_renderer::World_transform::map_to_display(Esri_runtimecore::Geometry::Point_2D const*, Esri_runtimecore::Geometry::Point_2D*, int) const+28)
2020-09-21 20:17:45.616 9022-9022/? A/DEBUG:     #01 pc 008735cc  /data/app/com.example.test-dPnC0d7dY5ma3EEUZ7XRQw==/lib/arm/libruntimecore_java.so (Esri_runtimecore::KML::Display_context2d::within_pick(Esri_runtimecore::KML::Point_2d const&, Esri_runtimecore::KML::Icon_display const&)+64)
2020-09-21 20:17:45.616 9022-9022/? A/DEBUG:     #02 pc 0086a184  /data/app/com.example.test-dPnC0d7dY5ma3EEUZ7XRQw==/lib/arm/libruntimecore_java.so (Esri_runtimecore::KML::Core_layer::test_select_(Esri_runtimecore::KML::Core_node*)+224)
2020-09-21 20:17:45.616 9022-9022/? A/DEBUG:     #03 pc 0086a128  /data/app/com.example.test-dPnC0d7dY5ma3EEUZ7XRQw==/lib/arm/libruntimecore_java.so (Esri_runtimecore::KML::Core_layer::test_select_(Esri_runtimecore::KML::Core_node*)+132)
2020-09-21 20:17:45.616 9022-9022/? A/DEBUG:     #04 pc 0086a128  /data/app/com.example.test-dPnC0d7dY5ma3EEUZ7XRQw==/lib/arm/libruntimecore_java.so (Esri_runtimecore::KML::Core_layer::test_select_(Esri_runtimecore::KML::Core_node*)+132)
2020-09-21 20:17:45.616 9022-9022/? A/DEBUG:     #05 pc 0086a2d4  /data/app/com.example.test-dPnC0d7dY5ma3EEUZ7XRQw==/lib/arm/libruntimecore_java.so (Esri_runtimecore::KML::Core_layer::select_2d(std::shared_ptr<Esri_runtimecore::Map_renderer::Display_properties> const&, double, double, int, int, int)+244)
2020-09-21 20:17:45.616 9022-9022/? A/DEBUG:     #06 pc 008428d8  /data/app/com.example.test-dPnC0d7dY5ma3EEUZ7XRQw==/lib/arm/libruntimecore_java.so (Esri_runtimecore::KML::KML_layer::select_nodes(Esri_runtimecore::Geometry::Point_2D const&, int, int, int)+212)
2020-09-21 20:17:45.616 9022-9022/? A/DEBUG:     #07 pc 00726390  /data/app/com.example.test-dPnC0d7dY5ma3EEUZ7XRQw==/lib/arm/libruntimecore_java.so (Java_com_esri_core_internal_map_KmlLayerInternal_nativeSelectNodes+176)
2020-09-21 20:17:45.616 9022-9022/? A/DEBUG:     #08 pc 00048595  /data/app/com.example.test-dPnC0d7dY5ma3EEUZ7XRQw==/oat/arm/base.odex (offset 0x3f000)

The backtrace seems to point to the Esri_runtimecore.::KML C++ class.

Is there any workaround for this error?

0 Kudos
1 Reply
MarkBaird
Esri Regular Contributor

10.2.9 is a very old release which is no longer supported or in development.

The current release of ArcGIS Runtime is 100.9.  Have you tried your layer in this version?

If you want to try it out, there is a github repository with lots of samples showing how to implement various use-cases.  This sample may be of interest to you:

arcgis-runtime-samples-android/kotlin/display-kml at master · Esri/arcgis-runtime-samples-android · ... 

0 Kudos