Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] UnityMainThreadDispatcher destroyed #91

Open
SamPruden opened this issue Jun 25, 2023 · 1 comment
Open

[BUG] UnityMainThreadDispatcher destroyed #91

SamPruden opened this issue Jun 25, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@SamPruden
Copy link
Contributor

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
Copy link
Owner

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

@handzlikchris handzlikchris added the bug Something isn't working label Jul 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

2 participants