Search Issue Tracker
Fixed
Votes
3
Found in [Package]
Issue ID
1202815
Regression
Yes
UnityEngine.Events : InvalidOperationException: EnsureRunningOnMainThread can only be called from the main thread
When updating a project from 2019.3 (where all tests pass) to 2020.1.0b15. Test now fail with the below errors.
InvalidOperationException: EnsureRunningOnMainThread can only be called from the main thread
UnityEngine.Object.EnsureRunningOnMainThread () (at <5707d5c1fe2c4727a5067f1685c0f37a>:0)
UnityEngine.Object.GetInstanceID () (at <5707d5c1fe2c4727a5067f1685c0f37a>:0)
UnityEngine.Object.IsNativeObjectAlive (UnityEngine.Object o) (at <5707d5c1fe2c4727a5067f1685c0f37a>:0)
UnityEngine.Object.CompareBaseObjects (UnityEngine.Object lhs, UnityEngine.Object rhs) (at <5707d5c1fe2c4727a5067f1685c0f37a>:0)
UnityEngine.Object.op_Inequality (UnityEngine.Object x, UnityEngine.Object y) (at <5707d5c1fe2c4727a5067f1685c0f37a>:0)
UnityEngine.Events.PersistentCall.ValidateTargetAssemblyType () (at <5707d5c1fe2c4727a5067f1685c0f37a>:0)
UnityEngine.Events.PersistentCall.OnAfterDeserialize () (at <5707d5c1fe2c4727a5067f1685c0f37a>:0)
Seems to be crashing on assertion. I'm using the 1.1.5 package in both versions
.
Unhandled log message: '[Exception] InvalidOperationException: EnsureRunningOnMainThread can only be called from the main thread'. Use UnityEngine.TestTools.LogAssert.Expect
Steps to reproduce
- Open the attached project
- Open Test Runner palette.
- Open play mode tests
- Run tests
Notice issue >> Test 9,12,14,19 fail with Unhandled log message: '[Exception] InvalidOperationException: EnsureRunningOnMainThread can only be called from the main thread'. Use UnityEngine.TestTools.LogAssert.Expect
Test Broken
Unity 2020.1.0a15
Test Framework Package "1.1.5",
Windows 10
Tested Working
Windows - 2020.3.0f1, macoS 2020.1.0a15
Test Framework Package "1.1.5",
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Inconsistent behaviour when interacting with different dropdown types with pointer events on parent Visual Element
- Hidden GameObjects won't re-enable when they have call "DontDestroyOnLoad" function
- Overlay Canvas are rendered on each split-screen camera when HDR is enabled
- [Android] The Player loses focus when using UnityEngine.Handheld.StartActivityIndicator() with Facebook SDK
- Build fails with "Building Library/Bee/artifacts/MacStandalonePlayerBuildProgram/gahcy/hj9mx3z/951.0 failed with output:..." errors when Scripting Backend is set to IL2CPP
Add comment