I recently updated my mobile app from an older ThinkGeo 9.0 beta version to the newer 10.4 versions and have been seeing some of my customers getting crashes of my app due to exceptions down in the ThinkGeo.MapSuite code. It appears that a cascade of ThinkGeo calls eventually get the map in a bad state that eventually crashes my app (I’ll paste the stack traces below). Also restarting the app after a crash results in more crashes - as if the boundary files have become corrupt. So I initially did have to fix some smaller breaking changes, however we were never able to reproduce these customer errors, so we’re kind of stuck right now.
I was wondering if you can look at the stack traces and possibly explain how these errors might be caused.
Here’s the Nuget packages I currently am using:
MapSuiteMobileForiOS-BareBone 10.4.5
ThinkGeo.MapSuite 10.4.3
ThinkGeo.MapSuite.Layers.BingMaps 10.4.1
ThinkGeo.MapSuite.Layers.ShapeFile 10.4.0
ThinkGeo.MapSuite.Styles.Value 10.4.0
And here are stack traces for the errors my customers are seeing:
- First this exception occurs…
System.NullReferenceException: Object reference not set to an instance of an object
at ThinkGeo.MapSuite.Layers.GeoDbf.Flush () <0x10185dd80 + 0x00054> in :0
at ThinkGeo.MapSuite.Layers.GeoDbf.Close () <0x10185dc30 + 0x00067> in :0
at ThinkGeo.MapSuite.Layers.ShapeFileFeatureSource.CloseCore () <0x1027f1d80 + 0x0003f> in :0
at ThinkGeo.MapSuite.Layers.FeatureSource.Close () <0x101842470 + 0x0005b> in :0
at ThinkGeo.MapSuite.Layers.FeatureLayer.CloseCore () <0x101887220 + 0x00037> in :0
at ThinkGeo.MapSuite.Layers.Layer.Close () <0x101835b10 + 0x0003b> in :0
at ThinkGeo.MapSuite.Layers.ShapeFileFeatureSource.Njc= (System.String shapePathFilename, ThinkGeo.MapSuite.Layers.ShapeFileSortingMode sortingMode, System.Int32 srid) <0x1027ec350 + 0x00c8f> in :0
at ThinkGeo.MapSuite.Layers.ShapeFileFeatureSource.Rebuild (System.String shapePathFilename, ThinkGeo.MapSuite.Layers.ShapeFileSortingMode sortingMode, System.Int32 sridForSorting) <0x1027ec300 + 0x0003f> in :0
at ThinkGeo.MapSuite.Layers.ShapeFileFeatureSource.Rebuild (System.String shapePathFilename) <0x1027ec2d0 + 0x0001b> in :0
at ThinkGeo.MapSuite.Layers.ShapeFileFeatureLayer.Rebuild (System.String shapePathFilename) <0x1027fb3f0 + 0x0002f> in :0
at MapShots.ThinkGeoExtensions.RunEdit (ThinkGeo.MapSuite.Layers.ShapeFileFeatureLayer layer, System.Action editFunc, System.Boolean rebuildShapeFile) <0x100b97570 + 0x00143> in :0
at MapShots.ThinkGeoExtensions.ClearAllFeatures (ThinkGeo.MapSuite.Layers.ShapeFileFeatureLayer featureLayer) <0x100b97ad0 + 0x00113> in :0
at MapShots.MainViewController.BoundaryEditClick () <0x100b465f0 + 0x0009b> in :0
at MapShots.MainViewController.MainToolBarItems_MainToolBarButtonClick (System.Object sender, System.EventArgs e) <0x100b45460 + 0x00247> in :0
- And then shortly after this is where the app crashes…
System.DivideByZeroException: Attempted to divide by zero.
at ThinkGeo.MapSuite.Layers.GeoDbf.FSU= (System.Byte[] arrFileHeader, ThinkGeo.MapSuite.Layers.GeoDbf dbfFile) <0x101863400 + 0x000dc> in :0
at ThinkGeo.MapSuite.Layers.GeoDbf.DiU= (System.String fileName, ThinkGeo.MapSuite.Layers.GeoFileReadWriteMode access) <0x101862100 + 0x0031f> in :0
at ThinkGeo.MapSuite.Layers.GeoDbf.Open () <0x10185dbf0 + 0x00027> in :0
at ThinkGeo.MapSuite.Layers.ShapeFileFeatureSource.EiU= () <0x1027f18d0 + 0x0021f> in :0
at ThinkGeo.MapSuite.Layers.ShapeFileFeatureSource.OpenCore () <0x1027f16b0 + 0x00047> in :0
at ThinkGeo.MapSuite.Layers.FeatureSource.Open () <0x1018423a0 + 0x0005f> in :0
at ThinkGeo.MapSuite.Layers.FeatureLayer.OpenCore () <0x1018871d0 + 0x00037> in :0
at ThinkGeo.MapSuite.Layers.Layer.Open () <0x101835a80 + 0x00047> in :0
at ThinkGeo.MapSuite.iOS.LayerTileView.DrawCore (ThinkGeo.MapSuite.Drawing.GeoCanvas geoCanvas) <0x101e9a3f0 + 0x003b3> in <96090b69814b467aa77574140094f241#1a8e0d7664c759d2d61ed14729e75e54>:0
at ThinkGeo.MapSuite.iOS.TileView.Draw (ThinkGeo.MapSuite.Drawing.GeoCanvas geoCanvas) <0x101e7da10 + 0x00027> in <96090b69814b467aa77574140094f241#1a8e0d7664c759d2d61ed14729e75e54>:0
at ThinkGeo.MapSuite.iOS.LayerOverlay.DrawTileCore (ThinkGeo.MapSuite.Drawing.GeoCanvas geoCanvas, ThinkGeo.MapSuite.iOS.TileView tile) <0x101e988c0 + 0x003ff> in <96090b69814b467aa77574140094f241#1a8e0d7664c759d2d61ed14729e75e54>:0
at ThinkGeo.MapSuite.iOS.TileOverlay.DrawTile (ThinkGeo.MapSuite.iOS.TileView tile, ThinkGeo.MapSuite.iOS.MapArguments mapArguments) <0x101e78aa0 + 0x0050f> in <96090b69814b467aa77574140094f241#1a8e0d7664c759d2d61ed14729e75e54>:0
at ThinkGeo.MapSuite.iOS.TileOverlay.oRY= (ThinkGeo.MapSuite.iOS.MapArguments mapArguments) <0x101e7a860 + 0x0034b> in <96090b69814b467aa77574140094f241#1a8e0d7664c759d2d61ed14729e75e54>:0
at ThinkGeo.MapSuite.iOS.TileOverlay.DrawCore (ThinkGeo.MapSuite.iOS.MapArguments mapArguments, ThinkGeo.MapSuite.iOS.OverlayRefreshType refreshType) <0x101e78630 + 0x001ab> in <96090b69814b467aa77574140094f241#1a8e0d7664c759d2d61ed14729e75e54>:0
at ThinkGeo.MapSuite.iOS.LayerOverlay.DrawCore (ThinkGeo.MapSuite.iOS.MapArguments mapArguments, ThinkGeo.MapSuite.iOS.OverlayRefreshType refreshType) <0x101e99410 + 0x0004f> in <96090b69814b467aa77574140094f241#1a8e0d7664c759d2d61ed14729e75e54>:0
at ThinkGeo.MapSuite.iOS.Overlay.Draw (ThinkGeo.MapSuite.iOS.MapArguments mapArguments, ThinkGeo.MapSuite.iOS.OverlayRefreshType refreshType) <0x101e76450 + 0x0007b> in <96090b69814b467aa77574140094f241#1a8e0d7664c759d2d61ed14729e75e54>:0
at ThinkGeo.MapSuite.iOS.MapView.aBY= (ThinkGeo.MapSuite.iOS.MapArguments mapArguments, ThinkGeo.MapSuite.iOS.OverlayRefreshType refreshType, System.Collections.Generic.IEnumerable1[T] overlays) <0x101e6db60 + 0x0027b> in <96090b69814b467aa77574140094f241#1a8e0d7664c759d2d61ed14729e75e54>:0 at ThinkGeo.MapSuite.iOS.MapView.ZxY= (ThinkGeo.MapSuite.iOS.OverlayRefreshType refreshType) <0x101e6d800 + 0x0031b> in <96090b69814b467aa77574140094f241#1a8e0d7664c759d2d61ed14729e75e54>:0 at ThinkGeo.MapSuite.iOS.MapView.ZxY= () <0x101e6d7d0 + 0x00017> in <96090b69814b467aa77574140094f241#1a8e0d7664c759d2d61ed14729e75e54>:0 at ThinkGeo.MapSuite.iOS.MapView.ZoomToCore (ThinkGeo.MapSuite.Shapes.RectangleShape extent) <0x101e6cf50 + 0x0002b> in <96090b69814b467aa77574140094f241#1a8e0d7664c759d2d61ed14729e75e54>:0 at ThinkGeo.MapSuite.iOS.MapView.ZoomTo (ThinkGeo.MapSuite.Shapes.BaseShape targetShape) <0x101e6c470 + 0x0014b> in <96090b69814b467aa77574140094f241#1a8e0d7664c759d2d61ed14729e75e54>:0 at ThinkGeo.MapSuite.iOS.MapView.bhY= (UIKit.UIGestureRecognizer e, System.Func
3[T1,T2,TResult] action) <0x101e70d30 + 0x00a6f> in <96090b69814b467aa77574140094f241#1a8e0d7664c759d2d61ed14729e75e54>:0
at ThinkGeo.MapSuite.iOS.MapView.b__152_2 (UIKit.UIGestureRecognizer recognizer) <0x101e727d0 + 0x00117> in <96090b69814b467aa77574140094f241#1a8e0d7664c759d2d61ed14729e75e54>:0
at xEQ=.HBY=.60Q= (UIKit.UIGestureRecognizer recognizer) <0x101e6a9f0 + 0x00153> in <96090b69814b467aa77574140094f241#1a8e0d7664c759d2d61ed14729e75e54>:0
at UIKit.UIPinchGestureRecognizer+Callback.Activated (UIKit.UIPinchGestureRecognizer sender) <0x101038900 + 0x0002b> in :0
at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) <0x101032f10 + 0x0002b> in :0
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) <0x101032e80 + 0x00043> in :0
at MapShots.Application.Main (System.String[] args) <0x100b7be90 + 0x00093> in :0