Search Issue Tracker

Not Reproducible

Votes

0

Found in

6000.0.50f1

6000.1.6f1

6000.2.0b4

Issue ID

UUM-108585

Regression

Yes

[Quality Hackweek] Errors "InvalidOperationException: EnsureRunningOnMainThread can only be called from the main thread" and "NullReferenceException" shown when switching build platforms with Muse Texture package installed

-

How to reproduce:
1. Open the “package-import-tests.zip“ project
2. Have at least two different platform modules
2. Switch to another build platform (For example, from macOS to Web)
3. Observe the Console window

Expected result: No errors
Actual result: Errors “InvalidOperationException: EnsureRunningOnMainThread can only be called from the main thread“ and sometimes “NullReferenceException: Object reference not set to an instance of an object“ shown

Reproducible with: 2023.2.0a18, 6000.0.50f1, 6000.1.6f1, 6000.2.0b4
Not reproducible with: 2022.3.63f1, 2023.2.0a17

Reproducible environment: macOS 15.4.1  (M4 Max)
Not reproducible environment: No other environment tested

Notes: The project must have the Muse Texture (com.unity.muse.texture) package in the project to reproduce

Error 1:
InvalidOperationException: EnsureRunningOnMainThread can only be called from the main thread
UnityEngine.Object.EnsureRunningOnMainThread () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnityEngineObject.bindings.cs:356)
UnityEngine.Object.GetInstanceID () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnityEngineObject.bindings.cs:278) <…>

Error 2:
NullReferenceException: Object reference not set to an instance of an object
UnityEngine.UIElements.UIR.MeshGenerator.DrawText (System.Collections.Generic.List`1[T] vertices, System.Collections.Generic.List`1[T] indices, System.Collections.Generic.List`1[T] materials, System.Collections.Generic.List`1[T] renderModes) <…>

  1. Resolution Note:

    Cannot reproduce in 6000.3.0a2 or 6000.2.0b8.

    Also users should not be installing the muse texture package and installing the new generators and ai assistant package.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.