Search Issue Tracker
Not Reproducible
Votes
15
Found in
2017.4.0f1
Issue ID
1025171
Regression
No
[UWP] Compile .Net Native for HoloLens causes (SpatialCoordinateSystem)Marshal.GetObjectForIUnknown exception
Steps to reproduce:
1. Download attached project.
2. Build UWP project for HoloLens/D3D. Make sure .Net compile type is used.
3. Open the resulting solution in Visual Studio.
4. Build a x86-Master and deploy to HoloLens.
Expected results: Project runs on HoloLens
Actual results: Exception thrown at NativeSpatialCoordinateSystemPtrTest.cs line 35
Exception thrown: 'System.InvalidCastException' in Assembly-CSharp.dll
An exception of type 'System.InvalidCastException' occurred in Assembly-CSharp.dll but was not handled in user code
Arg_InvalidCastException
Note: works with Debug and Release configuration
Reproduced with: 2018.2.0b1, 2018.1.0f1, 2017.4.1f1, 2017.2.2p3
-
ibrahimpenekli
Feb 14, 2019 22:58
This bug took my hours to resolve it :(
-
newske
Oct 09, 2018 00:45
For anyone stumbling across this issue, a workaround while this is awaiting an official fix:
On scene load (use the scene load event not Awake()), create a SpatialStationaryFrameOfReference and get the coordinate system. Rather than using the pointer, use the SpatialCoordinateSystem directly. If you're using HoloLensCameraStream this is supported in this fork: https://github.com/camnewnham/HoloLensCameraStream
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Fixing Message Loss in UMPE During Domain Reload
- The Editor freezes when ScheduleReadOnly of IJobParallelForTransform with dependency is used
- Text is truncated in the Inspector when the display scale is set to 150%
- CancellationTokenSource(<timeout>) has incorrect cancellation status when used in WebGL Player
- VFX property value names are cut off when properties with 'Arc' are viewed in the VFX Blackboard
Resolution Note (2018.4.12f1):
Looks to be resolved in 2018.4.