Search Issue Tracker
Fixed in 6000.0.18f1
Fixed in 7000.0.0a7
Votes
0
Found in
6000.0.2f1
Issue ID
UUM-72243
Regression
Yes
EnsureRunningOnMainThread error in TessellationJob.ApplyInset
When tessellating the UI geometry, it is possible to get an error because a null check is performed on the job thread.
{noformat}
InvalidOperationException: EnsureRunningOnMainThread can only be called from the main thread
UnityEngine.Object.EnsureRunningOnMainThread () (at <347e9cb990044b19a415d80dc9c7be25>:0)
UnityEngine.Object.GetInstanceID () (at <347e9cb990044b19a415d80dc9c7be25>:0)
UnityEngine.Object.IsNativeObjectAlive (UnityEngine.Object o) (at <347e9cb990044b19a415d80dc9c7be25>:0)
UnityEngine.Object.CompareBaseObjects (UnityEngine.Object lhs, UnityEngine.Object rhs) (at <347e9cb990044b19a415d80dc9c7be25>:0)
UnityEngine.Object.op_Inequality (UnityEngine.Object x, UnityEngine.Object y) (at <347e9cb990044b19a415d80dc9c7be25>:0)
UnityEngine.UIElements.UIR.MeshGenerator+TessellationJob.ApplyInset (UnityEngine.UIElements.MeshBuilderNative+NativeRectParams& rectParams, UnityEngine.Texture tex) (at <6603732cfe894bf1a78f54f7a10a3710>:0)
UnityEngine.UIElements.UIR.MeshGenerator+TessellationJob.DrawRectangle (UnityEngine.UIElements.UnsafeMeshGenerationNode node, UnityEngine.UIElements.MeshBuilderNative+NativeRectParams& rectParams, UnityEngine.Texture tex) (at <6603732cfe894bf1a78f54f7a10a3710>:0)
UnityEngine.UIElements.UIR.MeshGenerator+TessellationJob.Execute (System.Int32 i) (at <6603732cfe894bf1a78f54f7a10a3710>:0)
Unity.Jobs.IJobParallelForExtensions+ParallelForJobStruct`1[T].Execute (T& jobData, System.IntPtr additionalPtr, System.IntPtr bufferRangePatchData, Unity.Jobs.LowLevel.Unsafe.JobRanges& ranges, System.Int32 jobIndex) (at <347e9cb990044b19a415d80dc9c7be25>:0){noformat}
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
Resolution Note (fix version 6000.0.18f1):
Fixed by another internal issue: UUM-78828: ApplyInset error "EnsureRunningOnMainThread can only be called from the main thread" when exiting playmode
Resolution Note (fix version 7000.0.0a7):
Fixed by another internal issue: UUM-78828: ApplyInset error "EnsureRunningOnMainThread can only be called from the main thread" when exiting playmode