The Mixed Reality Forums here are no longer being used or maintained.
There are a few other places we would like to direct you to for support, both from Microsoft and from the community.
The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.
For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.
If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.
And always feel free to hit us up on Twitter @MxdRealityDev.
Error"Attempted to read or write protected memory"
I’m attempting to overwrite a texture using the Texture2D LoadImage method. Using the following lines of code:
WWW _web = new WWW();
Texture2D t = new Texture2D(640, 480);
Everything works when I run the application in the unity debugger but when I attempt to run the app on the HoloLens emulator or on the device itself in both debug and release modes I get the following exception:
System.AccessViolationException was unhandled
Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at UnityEngineProxy.InternalCalls.PInvokeCalls.Texture2D_CUSTOM_LoadImage(IntPtr param_0, Int64 param_1, Boolean param_2)
at UnityEngineProxy.InternalCalls.Texture2D_CUSTOM_LoadImage(Object self, Object data, Boolean markNonReadable)
at UnityEngine.Texture2D.LoadImage(Byte data) .....
Is there a better way to dynamically retrieve an image and displayed it in the scene?