[BUG] UnityMainThreadDispatcher destroyed
SamPruden opened this issue · 1 comments
SamPruden commented
I just hit this exception.
MissingReferenceException: The object of type 'UnityMainThreadDispatcher' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
UnityEngine.MonoBehaviour.StartCoroutine (System.Collections.IEnumerator routine) (at <c2d036c16ca64e0eb93703a3b13e733a>:0)
ImmersiveVRTools.Runtime.Common.UnityMainThreadDispatcher+<>c__DisplayClass2_0.<Enqueue>b__0 () (at <b6828fa0546b4c299d07278c81cb49d3>:0)
ImmersiveVRTools.Runtime.Common.UnityMainThreadDispatcher.Update () (at <b6828fa0546b4c299d07278c81cb49d3>:0)
I had left Unity open in the background for a few hours, and this exception happened after the first change when I returned. Editor reloading is enabled, and I was not in play mode. Unfortunately I don't have any other information about the circumstances that triggered it.
handzlikchris commented
Thanks - I think I've seen it sometimes, generaly harmless and should go away after full reload. I'll leave it open and will try to fix if I stumble upon it to get some more info.
Perhaps adding a full stack trace of what enqued MainThreadDispatcher job would help to narrow it down better