Select to view content in your preferred language

Core runtime crashes when opening geodatabase file

4465
13
Jump to solution
05-07-2014 11:46 AM
JamesRichards1
Regular Contributor
I created a geodatabase file in ArcMap using the Share As - Runtime Content menu option. After sideloading the geodatabse to a sample app, the app is crashing when attempting to open the file with the code:

NSString *gdbPath = [self gdbDocumentsPath]; NSError *error = nil; self.geodatabase = [[AGSGDBGeodatabase alloc] initWithPath:gdbPath error:&error]; if (error) {     NSLog(@"error loading geodatabase: %@", [error localizedDescription]); }


The crash is logged to the XCode Console as:

libc++abi.dylib: terminating with uncaught exception of type Esri_runtimecore::Geodatabase::geodatabase_error: std::exception


A few notes:

  • The mxd passed validation (i.e. - Analyze) prior to sharing the runtime content and no warnings or errors were given

  • I would expect an NSError to be passed back from the initWithPath:error: method, but instead the app never gets beyond this line - It just crashes

  • The console log message gives no clue as to what the problem might be

  • I also tried publishing the mxd to a Feature Service, and creating the geodatabase replica via ArcGIS Server and got the same result

By repeatedly removing layers from my mxd and recreating the geodatabase I have narrowed the problem down to some specific layers. I can provide a runtime geodatabase with one of these layers if you need it to reproduce the error.

Cheers,
James
0 Kudos
13 Replies
MichaelDavis3
Frequent Contributor
When I was getting the error I was attempting to implement the offline geodatabase layer using the code in the guide section of the developer site.  After taking a step back (and having a stiff drink) I realized I needed to be initializing the localFeatureTable as self.localFeatureTable... that cleared things up nicely.

Our iPads are now happily drawing a 13k polygon land ownership layer and making it look easy!
0 Kudos
SuganyaBaskaran1
Esri Contributor
When I was getting the error I was attempting to implement the offline geodatabase layer using the code in the guide section of the developer site.  After taking a step back (and having a stiff drink) I realized I needed to be initializing the localFeatureTable as self.localFeatureTable... that cleared things up nicely.

Our iPads are now happily drawing a 13k polygon land ownership layer and making it look easy!


Glad it worked out for you. Yes, if you had declared the localFeatureTable as a property, you initialize it using self.localFeatureTable (except in init method in which case you use the instance variable _localFeatureTable)
0 Kudos
JamesRichards1
Regular Contributor
James,
The issue might be with 'FACILITYDIAGRAM' field in the feature class. This field is declared as 32 bit int, where as many of its subtypes have the default value of float. It might have happened if you typed 0.0 instead of 0 in one of the previous versions of the destop.

Can you try reassigning the default values in ArcCatalog and try creating the runtime package again?

Hope this helps!


Hi Again,

I went through this feature class and recalculated every unique value in every subtype and domain field to make sure that they are all integers. I am still getting the same error 19 when trying to initialize the geodatabase with the Runtime SDK.

I placed a new copy of the geodatabase file at the same download location that I previously sent you via private message.

Can you take another look to see if something else might be wrong?

Thank you,
James
0 Kudos
SuganyaBaskaran1
Esri Contributor
It still looks like the FACILITYDIAGRAM field has issue. Let me send you the details of the schema over a private message.
0 Kudos