ArcGIS Mobile SDK 10.1, Access violation reading location

2046
1
Jump to solution
07-31-2015 10:54 AM
VincentThomas
New Contributor II

Hello everyone,

I'm trying to debug a gigantic old .NET application based on ArcGIS for mobile SDK 10.1.1. When loading the GIS component of the application, about 1/5 times, I'm getting the error Access violation reading location xxx (see below). It comes at a random point in the code, so I'm suspecting a background thread running ESRIMobileCore.dll functions. Have you ever encountered issues with that library? Should my best guess would be to upgrade the ArcGIS Mobile SDK to a newer version? Thanks for your thoughts about how to debug that!

0 Kudos
1 Solution

Accepted Solutions
VincentThomas
New Contributor II

I got it working. I was not assigning correctly the value of a ESRI.ArcGIS.Mobile.FeatureCaching.MobileCache object.

Friend Shared Sub SetService(ByRef service As ESRI.ArcGIS.Mobile.FeatureCaching.MobileCache)

Before

              service = mService

After

                Dim tempServiceCache As ESRI.ArcGIS.Mobile.FeatureCaching.MobileCache = New              ESRI.ArcGIS.Mobile.FeatureCaching.MobileCache(Common.GetGISMainCachePath())

                tempServiceCache.Open()

                service = tempServiceCache

To debug such error, one way is to comment out code until it doesn't break anymore and start from there, but since that error was a bit random, that wasn't an easy task.

Hope it helps someone!

Vincent

View solution in original post

0 Kudos
1 Reply
VincentThomas
New Contributor II

I got it working. I was not assigning correctly the value of a ESRI.ArcGIS.Mobile.FeatureCaching.MobileCache object.

Friend Shared Sub SetService(ByRef service As ESRI.ArcGIS.Mobile.FeatureCaching.MobileCache)

Before

              service = mService

After

                Dim tempServiceCache As ESRI.ArcGIS.Mobile.FeatureCaching.MobileCache = New              ESRI.ArcGIS.Mobile.FeatureCaching.MobileCache(Common.GetGISMainCachePath())

                tempServiceCache.Open()

                service = tempServiceCache

To debug such error, one way is to comment out code until it doesn't break anymore and start from there, but since that error was a bit random, that wasn't an easy task.

Hope it helps someone!

Vincent

View solution in original post

0 Kudos