Hi, I’m currently reviewing your library to use in my company’s project
I’m having trouble displaying a wpf map after it has been deserialized.
My program first create a empty wpf map, and then add a GeoTiffRasterLayer.
When the save button is clicked, the wpf map is serialized and saved into a file.
The trouble appear when the program tried to open the save file, deserialize the wpf map and display it the window.
The deserialize process finisihed without problem. However the error “System.AccessViolationException’ occurred in System.Drawing.dll” appeared when it tried to display the wpf map.
The full error:
Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at System.Drawing.SafeNativeMethods.Gdip.IntGdipDisposeImage(HandleRef image)
at System.Drawing.SafeNativeMethods.Gdip.GdipDisposeImage(HandleRef image)
at System.Drawing.Image.Dispose(Boolean disposing)
at System.Drawing.Image.Finalize()
Any idea what is causing this?