I'm running into the following randomly: System.AccessViolationException was unhandled Message: An unhandled exception of type 'System.AccessViolationException' occurred in WindowsBase.dll Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
A little background:
- I'm running Runtime v100.0
- The app is written using MVVM and Prism IoC
- There's a View (TwoDView) which has a MapView
- TwoDView has a ViewModel (TwoDViewModel) which navigates -- uses RequestNavigate(...) -- to a view (ThreeDView) which has SceneView
- ThreeDViewModel responds to the navigation and applies the camera (calling a controller, created to manage the SceneView using a WeakReference<>) passed via navigation parameters
- The controller calls SetViewpointCameraAsync
There is also a back button in ThreeDView to allow going back to TwoDView for selecting another 3D area for inspection. It seems multiple calls to SetViewpointCameraAsync is causing my issue...if I use SetViewpointCamera...no issue (it seems). Any ideas??
Hi,
Unfortunately this is a known issue in the v100.0 release. Apologies if the release notes were not quite as specific on this as they should have been (use of `setViewpointCamera` vs SetViewPointAsync).
"When calling setViewpointCamera on a timer with high animation speeds a crash may be encountered."
Release notes for 100.0—ArcGIS Runtime SDK for .NET | ArcGIS for Developers
The issue is under consideration/investigation for addressing in the next release and we're also looking at ways we can expose a mechanism to cancel these async SetViewpoint... operations - that might help is this scenario.
Cheers
Mike
Thanks Michael. I failed to check the release notes. In my case, the situation is stable. But will be nice when the camera option is corrected -- Setting a Camera's distance (via constructor) causes issues when camera is applied to SceneView.
Is there a timeline for when SetViewpointAsync will be available for the WPF SDK? I see that this issue is listed as addressed in the 100.1 release notes, but specifically for android and I'm still hitting this exception with the WPF SDK. Just curious when this will be rolled out to other languages as well.
Thank you.
Hi,
It should have been addressed for all our .NET APIs in the 100.1 release (it was a bug in the underlying C++ codebase which is shared by both WPF and Android).
Please can you share your code that shows this issue in WPF?
Cheers
Mike
Hello again,
We're working on a sample application right now to isolate the use of the method. We'll verify that we continue to get access violation before passing it your way. Could take a while since the occurrence of the violation itself is random, and it generally takes several hours of running the application through functional simulation for us to hit it.
We are also gathering event viewer logs, and can provide dump files that might help, although they didn't really help us all too much.
Thanks!
Chad