ThinkGeo Team,
Intermittently I’m seeing System.AccessViolationException from ThinkGeo.Dependency.Gdal.dll.
This is occurring somewhere during the following code:
if (TheFeatureLayer.IsOpen == true)
{
TheFeatureLayer.Close();
}
TheLayerOverlay.Layers.Clear();
TheMapView.Refresh();
Here’s errors while in Debug Mode:
System.AccessViolationException HResult=0x80004003
Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Source=
StackTrace:
An unhandled exception of type ‘System.AccessViolationException’ occurred in ThinkGeo.Dependency.Gdal.dll
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
The program ‘[7216] OriStarRaster.exe’ has exited with code -1073741819 (0xc0000005) ‘Access violation’.
My code has try/catch logic as well as both the LayerOverlay and RasterLayer Drawing/Drawn Exceptions implemented and still not able to catch this exception…
Looks to me like it is a timing issue.
This occurs more often when the application is started directly as opposed to running in Debug Mode.
I should add too that the application has a push button to invoke the above code leaving the application running. I’ve never seen this if I just shut down the application.
This issue might be related to, or aggravated by, LayerOverlay.TileBuffer. It set to 0 the access violation does not occur, but when set to 2 it does occur.
Regards,
Dennis