Using the Quartz 100 SDK (Release version) I am getting an AccessViolationException when trying to set the IsVisible value on a RasterLayer object. I checked the CanChangeVisibility property and it was true, but still throws the error when set. StackTrace was null.
Message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Please can you provide the code you wrote to reproduce this? If we're not able to repro with that code we may need the raster dataset you are using too, or a sample of it.
Here is the section of code that loads the raster layer (Aerials) into the map. CurrentEsriMap is an the instance of EsriMap from your API that has been placed on window.
#region Load Aerials
var aerialLoader = new AerialMapPackageLoader();
// Construct the list of search paths.
IAerialMapPackage aerialPackage = await aerialLoader.SearchAndOpenAsync();
if (aerialPackage != null)
public bool IsVisible
// This call is currently throwing an AccessViolationException intermittently with Quartz 100 Release version
// Forum: https://community.esri.com/thread/186308-accessviolation-when-setting-layervisible
this.layer.IsVisible = value;
I’m still waiting on a way to send you the 1.5 GB raster files yet.