AnsweredAssumed Answered

Crash on [AGSLocalTiledLayer localTiledLayerWithName:@"myMap"];

Question asked by gerritvdw86 on Jul 30, 2014
Latest reply on Jul 30, 2014 by DGoyal-esristaff

When I try to instantiate an AGSLocalTileLayer with a tpk file, my app crashes.  It does work with the campus.tpk file in the demo app.  Is there a specific way to generate the tpk file so that it works with the 'ArcGIS-Runtime-SDK-iOS', '~> 10.2.3' pod?

 

See stack below.

 

2014-07-30 16:17:25.694 Schipol[3950:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'

*** First throw call stack:

(

  0   CoreFoundation                      0x04fb61e4 __exceptionPreprocess + 180

  1   libobjc.A.dylib                     0x04ba78e5 objc_exception_throw + 44

  2   CoreFoundation                      0x04f68abc -[__NSArrayM insertObject:atIndex:] + 844

  3   CoreFoundation                      0x04f68760 -[__NSArrayM addObject:] + 64

  4   Schipol                             0x00388fa8 -[AGSLayerInfo ags_updateLegendInfo:] + 824

  5   Schipol                             0x00388a4f -[AGSLayerInfo decodeWithJSON:] + 463

  6   Schipol                             0x0038886d -[AGSLayerInfo initWithJSON:] + 77

  7   Schipol                             0x002b4365 -[AGSLocalTiledLayer initWithPath:] + 1541

  8   Schipol                             0x002b3cab -[AGSLocalTiledLayer initWithName:] + 75

  9   Schipol                             0x001d39e8 -[MyMapViewController viewDidLoad] + 440

  10  UIKit                               0x0367433d -[UIViewController loadViewIfRequired] + 696

  11  UIKit                               0x0369a345 -[UINavigationController _layoutViewController:] + 39

  12  UIKit                               0x0369a85b -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 235

  13  UIKit                               0x0369a953 -[UINavigationController _startTransition:fromViewController:toViewController:] + 78

  14  UIKit                               0x0369b8cc -[UINavigationController _startDeferredTransitionIfNeeded:] + 645

  15  UIKit                               0x0369c4e9 -[UINavigationController __viewWillLayoutSubviews] + 57

  16  UIKit                               0x037dd0d1 -[UILayoutContainerView layoutSubviews] + 213

  17  UIKit                               0x035c4964 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 355

  18  libobjc.A.dylib                     0x04bb982b -[NSObject performSelector:withObject:] + 70

  19  QuartzCore                          0x0342c45a -[CALayer layoutSublayers] + 148

  20  QuartzCore                          0x03420244 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380

  21  QuartzCore                          0x034200b0 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26

  22  QuartzCore                          0x033867fa _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 294

  23  QuartzCore                          0x03387b85 _ZN2CA11Transaction6commitEv + 393

  24  QuartzCore                          0x034455b0 +[CATransaction flush] + 52

  25  UIKit                               0x03572ce5 _afterCACommitHandler + 131

  26  CoreFoundation                      0x04f7e36e __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30

  27  CoreFoundation                      0x04f7e2bf __CFRunLoopDoObservers + 399

  28  CoreFoundation                      0x04f5c254 __CFRunLoopRun + 1076

  29  CoreFoundation                      0x04f5b9d3 CFRunLoopRunSpecific + 467

  30  CoreFoundation                      0x04f5b7eb CFRunLoopRunInMode + 123

  31  GraphicsServices                    0x05a335ee GSEventRunModal + 192

  32  GraphicsServices                    0x05a3342b GSEventRun + 104

  33  UIKit                               0x03555f9b UIApplicationMain + 1225

  34  Schipol                             0x000040b2 main + 130

  35  libdyld.dylib                       0x054ff701 start + 1

  36  ???                                 0x00000001 0x0 + 1

)

libc++abi.dylib: terminating with uncaught exception of type NSException

Outcomes