- ajsmith595
- Posts: 8
- Joined:
Unity - Calling Thread (7600) doesn't have access to this object (6864) - Is this a bug?
After changing some of my XAML code and importing the new XAML file into Unity, I got the following error message:
NoesisException: Calling thread (7600) doesn't have access to this object (6864)
Noesis.Error.Check () (at Assets/NoesisGUI/Plugins/API/Core/NoesisError.cs:21)
Noesis.View.Noesis_View_Create_ (HandleRef content) (at Assets/NoesisGUI/Plugins/API/Core/NoesisView.cs:298)
Noesis.View..ctor (Noesis.FrameworkElement content) (at Assets/NoesisGUI/Plugins/API/Core/NoesisView.cs:282)
Noesis.GUI.CreateView (Noesis.FrameworkElement content) (at Assets/NoesisGUI/Plugins/API/Core/NoesisGUI.cs:140)
NoesisXamlEditor.CreatePreviewGUIView () (at Assets/NoesisGUI/Plugins/Editor/NoesisXamlEditor.cs:53)
UnityEngine.Debug:LogException(Exception)
NoesisXamlEditor:CreatePreviewGUIView() (at Assets/NoesisGUI/Plugins/Editor/NoesisXamlEditor.cs:60)
NoesisXamlEditor:OnPreviewGUI(Rect, GUIStyle) (at Assets/NoesisGUI/Plugins/Editor/NoesisXamlEditor.cs:171)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
I have tried reimporting the asset, deleting it, copying it back in, etc. I have seen elsewhere that this may be a bug. Is this correct? If not, how would you suggest I go about fixing this?
NoesisException: Calling thread (7600) doesn't have access to this object (6864)
Noesis.Error.Check () (at Assets/NoesisGUI/Plugins/API/Core/NoesisError.cs:21)
Noesis.View.Noesis_View_Create_ (HandleRef content) (at Assets/NoesisGUI/Plugins/API/Core/NoesisView.cs:298)
Noesis.View..ctor (Noesis.FrameworkElement content) (at Assets/NoesisGUI/Plugins/API/Core/NoesisView.cs:282)
Noesis.GUI.CreateView (Noesis.FrameworkElement content) (at Assets/NoesisGUI/Plugins/API/Core/NoesisGUI.cs:140)
NoesisXamlEditor.CreatePreviewGUIView () (at Assets/NoesisGUI/Plugins/Editor/NoesisXamlEditor.cs:53)
UnityEngine.Debug:LogException(Exception)
NoesisXamlEditor:CreatePreviewGUIView() (at Assets/NoesisGUI/Plugins/Editor/NoesisXamlEditor.cs:60)
NoesisXamlEditor:OnPreviewGUI(Rect, GUIStyle) (at Assets/NoesisGUI/Plugins/Editor/NoesisXamlEditor.cs:171)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
I have tried reimporting the asset, deleting it, copying it back in, etc. I have seen elsewhere that this may be a bug. Is this correct? If not, how would you suggest I go about fixing this?
Re: Unity - Calling Thread (7600) doesn't have access to this object (6864) - Is this a bug?
You are not using explicit threads, right? I would say this is a bug. Do you have a deterministic way to reproduce that exception error? If possible we would like to have a look at your project.
- ajsmith595
- Posts: 8
- Joined:
Re: Unity - Calling Thread (7600) doesn't have access to this object (6864) - Is this a bug?
If wanted, I can post the code for the XAML handling ONLY. All other scripts reference this, therefore the error should be here. However, this only happened after I reimported a different xaml file, and the error was there as it was imported, rather than at runtime, so nothing to do with this script would even be called or analysed. Therefore, I can deduce that it is probably a bug. However, if you would like the code handling the Noesis elements then I can do that.
Re: Unity - Calling Thread (7600) doesn't have access to this object (6864) - Is this a bug?
Do you have a way to deterministically reproduce this?
- ajsmith595
- Posts: 8
- Joined:
Re: Unity - Calling Thread (7600) doesn't have access to this object (6864) - Is this a bug?
[PROJECT LINK DELETED]
This is the project I am using minus most of the scripts that do not relate to the error whatsoever. "XAMLStuff.cs" is the thing all the other scripts reference.
Remember, I get the Calling Thread ([number]) doesn't have access to this object ([othernumber]) error when I start Unity and just click on the xaml file to look at its properties in the inspector.
This is the project I am using minus most of the scripts that do not relate to the error whatsoever. "XAMLStuff.cs" is the thing all the other scripts reference.
Remember, I get the Calling Thread ([number]) doesn't have access to this object ([othernumber]) error when I start Unity and just click on the xaml file to look at its properties in the inspector.
Re: Unity - Calling Thread (7600) doesn't have access to this object (6864) - Is this a bug?
Sorry, I deleted your project to avoid sharing publicly. Could you please file a report in the bugtracker?
Let's follow there in private.
Let's follow there in private.
- ajsmith595
- Posts: 8
- Joined:
Re: Unity - Calling Thread (7600) doesn't have access to this object (6864) - Is this a bug?
I have now posted a report in the bug tracker.
-
sfernandez
Site Admin
- Posts: 2983
- Joined:
Re: Unity - Calling Thread (7600) doesn't have access to this object (6864) - Is this a bug?
I found the source of the problem.
You have a static TextBlock field that is assigned during Unity's Preload thread. You can see that Unity itslef is complaining about some classes being accessed outside Main Thread:
This assignment starts Noesis initialization process in that Preload thread, and that is not supported.
You shouldn't define constructors for MonoBehaviors as explained in Unity forums:
You have a static TextBlock field that is assigned during Unity's Preload thread. You can see that Unity itslef is complaining about some classes being accessed outside Main Thread:
Code: Select all
Assertion failed: Assertion failed on expression: 'Thread::CurrentThreadIsMainThread()'
Assertion failed: GetGfxDevice() should only be called from main thread
You shouldn't define constructors for MonoBehaviors as explained in Unity forums:
MonoBehaviours can't have Constructors.
The reason for this is that in Editor, to fill up the Inspector they get created/destroyed on a separate editor thread. This causes Unity threading issues primarily, but will also cause more strange issues because you can't reference singletons or some static variables, as the object is being created completely out of the game flow.
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 70 guests