urho
urho copied to clipboard
NavigationMesh.FindPath throws exception when run on UWP.
This issue was opened and closed. Not sure if it was fixed.
Closed: https://github.com/xamarin/urho/issues/24
The issue is for UWP NavigatonMesh.FindPath throws an exception.
The fix is the dll call needs modified to define the start/end vector3 arguments as REF.
The line with the error for SharpReality is here.
[DllImport(Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)] internal extern static IntPtr urho_navigationmesh_findpath(IntPtr navMesh, ref Urho.Vector3 start, ref Urho.Vector3 end, out int count);
Then it works on UWP/SharpReality.
Without the change, upon running the exception is: Exception thrown: 'System.AccessViolationException' in Urho.dll An unhandled exception of type 'System.AccessViolationException' occurred in Urho.dll Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
This issue is observed in the FeatureSample Navigation when run on a UWP SharpReality platform.