AGSFeatureLayer crashing in typesForUniqueValueRenderer

1481
2
Jump to solution
04-07-2013 04:45 PM
DavidMcDonald2
New Contributor II
I am getting the following crash shortly after creating an AGSFeatureLayer. It only occurs when online, i.e. I haven't been able to reproduce the crash by loading the layer definition (attached) offline.

Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayI objectAtIndex:]: index 1 beyond bounds [0 .. 0]'

The stack trace:

#0 0x033cde52 in objc_exception_throw ()
#1 0x03de2b44 in -[__NSArrayI objectAtIndex:] ()
#2 0x001adc1d in -[AGSFeatureLayer typesForUniqueValueRenderer] at /Users/Shared/Jenkins/ios_release/applications/Cocoa/API/Common/Layer/Feature/AGSFeatureLayer.mm:1467
#3 0x001a8fef in -[AGSFeatureLayer decodeWithJSON:] at /Users/Shared/Jenkins/ios_release/applications/Cocoa/API/Common/Layer/Feature/AGSFeatureLayer.mm:687
#4 0x001a55df in -[AGSFeatureLayer jsonRequestOperation:didDecode:] at /Users/Shared/Jenkins/ios_release/applications/Cocoa/API/Common/Layer/Feature/AGSFeatureLayer.mm:160
#5 0x03e211bd in __invoking___ ()
#6 0x03e210d6 in -[NSInvocation invoke] ()
#7 0x033e16b0 in -[NSObject performSelector:withObject:] ()
#8 0x01fa6765 in __NSThreadPerformPerform ()
#9 0x03db0f3f in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ ()
#10 0x03db096f in __CFRunLoopDoSources0 ()
#11 0x03dd3734 in __CFRunLoopRun ()
#12 0x03dd2f44 in CFRunLoopRunSpecific ()
#13 0x03dd2e1b in CFRunLoopRunInMode ()
#14 0x040657e3 in GSEventRunModal ()
#15 0x04065668 in GSEventRun ()
#16 0x023e0ffc in UIApplicationMain ()
#17 0x0001bf0d in main at /Users/davidmcdonald/Development/mobileforms/MobileForms/main.m:16
#18 0x000028d5 in start ()
0 Kudos
1 Solution

Accepted Solutions
DavidMcDonald2
New Contributor II
Seems like this might be occurring because the runtime isn't handling multi-value unique renderers. 

In ArcSmash you can define a unique value render based on multiple fields.  We have then pushed multiple values into the one symbol.  We can work around this by pushing a separate symbol (albeit the same symbol) to the two different value combinations.

View solution in original post

0 Kudos
2 Replies
DavidMcDonald2
New Contributor II
We're running ArcGIS IOS runtime version 10.1.1 and using a ArcGIS 10.1 server.
0 Kudos
DavidMcDonald2
New Contributor II
Seems like this might be occurring because the runtime isn't handling multi-value unique renderers. 

In ArcSmash you can define a unique value render based on multiple fields.  We have then pushed multiple values into the one symbol.  We can work around this by pushing a separate symbol (albeit the same symbol) to the two different value combinations.
0 Kudos