AGSFeatureLayer ags_removeAllUnselectedServerGraphics

581
5
12-03-2012 07:50 AM
ColinCole
New Contributor II
I working on an IPad application that keeps crashing after certain refresh events. I placed a exception breakpoint, and its crashing at the line [AGSFeatureLayer ags_removeAllUnselectedServerGraphics]. I can't seem to find this function in any of the code or API reference. What does this function do exactly and why would it cause a crash? Any clarity would be appreciated.

Thanks
0 Kudos
5 Replies
NimeshJarecha
Esri Regular Contributor
Are you adding any graphics/features to the feature layer which resides on the client side only and not committed to server?

Regards,
Nimesh
0 Kudos
ColinCole
New Contributor II
I don't believe so.

It's more puzzling, because it only breaks when I quickly zoom/pan after a feature [I}update. Everything works fine if I add or delete a feature.

[self.activeFeatureLayer updateFeatures:[NSArray arrayWithObject:currentNewFeaturePopup.graphic]];

My code enters this function, then breaks somewhere after. The updates are successfully committed to the server, but when I quickly pan/zoom, it breaks. Is there a refresh I should be doing after this call?

Thanks,
Colin
0 Kudos
NimeshJarecha
Esri Regular Contributor
Is calling [self.activeFeatureLayer refresh]; after successful update helps?

Regards,
Nimesh
0 Kudos
ColinCole
New Contributor II
No, I've tried [self.activeFeatureLayer refresh] in didEditFeaturesWithResults upon successful update, and it still crashes.

else if([editResults.updateResults count]>0){
        //we were updating a feature
        AGSEditResult* result = (AGSEditResult*)[editResults.updateResults objectAtIndex:0];
        if(result.success) {
           
            [self performSelectorOnMainThread:@selector(activeFeatureLayerRefresh)
                                   withObject:nil
                                waitUntilDone:YES];
           
           
            [self performSelectorOnMainThread:@selector(graphicLayerRefresh)
                                   withObject:nil
                                waitUntilDone:YES];


I've also removed the graphicLayerRefresh to see if it was causing the crash, but it still crashes.
0 Kudos
NimeshJarecha
Esri Regular Contributor
If possible, please attach a sample application and outline steps to reproduce the crash so I can investigate. Thank you.

Regards,
Nimesh
0 Kudos