Hello everyone.

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.
Options

I could really use some help debugging this exceptionerror

ThomvdmThomvdm
edited October 2017 in Questions And Answers

Hi,

I'm having a difficult time debugging this error. It happens when I build my app to the HoloLens through VS17. I'm using Unity 2017.1.0 (also tried 2017.1.1 and .2)

Exception thrown: 'System.NullReferenceException' in UnityEngineProxy.dll
'WorldExplorer2.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Data\Users\DefaultAccount\AppData\Local\DevelopmentFiles\WorldExplorerVS.Debug_x86.Qwois\System.Diagnostics.StackTrace.dll'. Cannot find or open the PDB file.
NullReferenceException: Exception of type 'System.NullReferenceException' was thrown.
   at UnityEngineProxy.InternalCalls.Material_CUSTOM_Internal_CreateWithShader(Object mono, Object shader)
   at UnityEngine.Material..ctor(Shader shader)
   at Assets.Scripts.Classes.User.set_SelectionColor(Color value)
   at Assets.Scripts.Plugins.SessionManager.Init(GameObject cursor)
   at Initialize.<Start>d__14.MoveNext()
   at UnityEngine.SetupCoroutine.InvokeMoveNext(IEnumerator enumerator, IntPtr returnValueAddress)
   at UnityEngine.SetupCoroutine.$Invoke1InvokeMoveNext(Int64 instance, Int64* args)
   at UnityEngine.Internal.$MethodUtility.InvokeMethod(Int64 instance, Int64* args, IntPtr method) 
(Filename: <Unknown> Line: 0)

It looks to me as if it's not something in my code, but something perhaps in the HoloToolkit or Unity itself. Google tells me the "Cannot find or open the PDB file." can be ignored, and the exception below about CreateWithShader is something from Unity itself, and I'm not sure how to solve that.

Any ideas? Thanks!

Answers

  • Options
    james_ashleyjames_ashley ✭✭✭✭

    @Thomvdm,

    Yeah, that exception doesn't make much sense. Try deleting your Library, Temp and UWP folders. If you've been switching back and forth between unity versions, those could have gotten messed up. Deleting those folders and rebuilding will give you a clean start.

    James Ashley
    VS 2017 v5.3.3, Unity 2017.3.0f3, MRTK 2017.1.2, W10 17063
    Microsoft MVP, Freelance HoloLens/MR Developer
    www.imaginativeuniversal.com

  • Options

    Had the same error message. This happens when you load a Shader, for example by using Shader.Find("..."), which is not included in your build.
    To include a Shader to your build you can either assign it to a GameObject in your Unity scene or copy it to your ressources folder.

Sign In or Register to comment.