Select Features Error

2213
1
09-04-2015 03:03 AM
MatthiasLeinweber
New Contributor

Hi,

I tried out the method "public void onSingleTap(float x, float y)" in the sample code "Attribute Editor" ( Attribute Editor | ArcGIS for Developers   ) in my ArcGIS for Developers project. If I click (instead on a feature) on the map, the onError-method of the new CallbackListener<FeatureSet>() will be (correctly) called. But there comes always this error message in the logcat:

ArcGISFeatureLayer.FeatureSetCallback.onError

    java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.esri.core.map.FeatureSet.isExceededTransferLimit()' on a null object reference

            at com.esri.android.map.ags.ArcGISFeatureLayer$b.a(SourceFile:609)

            at com.esri.android.map.ags.ArcGISFeatureLayer$b.onCallback(SourceFile:544)

            at com.esri.android.map.ags.ArcGISFeatureLayer$7.run(SourceFile:2013)

            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)

            at java.util.concurrent.FutureTask.run(FutureTask.java:237)

            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)

            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)

            at java.lang.Thread.run(Thread.java:818)

Now, my question is: What can I do that the error message won't show again resp. the error will be handled correctly (and not just by not clicking on the map)?

Best regards

Matthias

0 Kudos
1 Reply
MengyiGuo
Occasional Contributor

Hi Matthias,

I tested the sample and it seems I can not reproduce the issue. If I click on the map, there is nothing happening. Did you make any changes to the code?

I think the other thing you can do is add more debugging code in the onCallback function and check the queryResult when you clicked the map not feature.