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
Comments (2)
-
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
- Blank, Light-Themed "Create Node" window becomes visible on the next project open
- UI Elements/Layout inconsistencies in the Particle System component
- The Game view and Scene view fail to render when launching the Editor with a maximized Render Graph Viewer window
- "List is empty" is poorly visible in the "Create Node" window
- [Android] GameObject with a custom shader becomes invisible when deployed with the Vulkan Graphics API
Resolution Note (2018.4.12f1):
Looks to be resolved in 2018.4.