#Editor, Inspector UI is hilariously broken

1 messages · Page 1 of 1 (latest)

hollow wagon
#

Hello,
I've recently begun a new project, and I have run into a frustrating issue with the Unity Editor UI. Various text labels just seem to break, resulting in them not rendering. This is most notable in the inspector window, but is not excluded to it. I've attached a screenshot of the issue.

As this happens, numerous errors are logged in the console, including, but not limited to, this:

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] atlases, System.Collections.Generic.List`1[T] renderModes, System.Collections.Generic.List`1[T] sdfScales) (at <b2858548e25c4db4bad82249a9cb7b34>:0)
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) (at <b2858548e25c4db4bad82249a9cb7b34>:0)
UnityEngine.UIElements.UITKTextJobSystem.AddDrawEntries (UnityEngine.UIElements.MeshGenerationContext mgc, System.Object _) (at <b2858548e25c4db4bad82249a9cb7b34>:0)
UnityEngine.UIElements.UIR.MeshGenerationDeferrer.Invoke (UnityEngine.UIElements.UIR.MeshGenerationDeferrer+CallbackInfo ci, UnityEngine.UIElements.MeshGenerationContext mgc) (at <b2858548e25c4db4bad82249a9cb7b34>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

I am on Unity 6.0, 6000.0.58f1, LTS version. I initially made the project in an earlier version (2022.3.8f1), but migrated. The issues began occuring after migration. Sorry if this is a known issue, but I've been searching around and couldn't find any mention of it. This is a new project, with no custom editor UI code. Restarting the editor very briefly resolves the issue, but it reappears almost instantly when the UI is updated.

hollow wagon
#

I updated to version 6000.2.6f1 of the editor, and that seems to have resolved the problem. I've marked the post as solved. You may be thinking, "why didn't you do that prior to posting", and the answer is.. ¯_(ツ)_/¯

hollow wagon
#

Nevermind, the issue has reappered, although it does seem to be slightly improved. This is an exception that also often occurs:

ArgumentException: An item with the same key has already been added. Key: 35651587
System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) (at <59bd7c40c082431db25e1e728ab62789>:0)
System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) (at <59bd7c40c082431db25e1e728ab62789>:0)
UnityEngine.TextCore.Text.FontAsset.AddSynthesizedCharacter (System.UInt32 unicode, System.Boolean isFontFaceLoaded, System.Boolean addImmediately) (at <611557e554d645f496d2cb012b849869>:0)
UnityEngine.TextCore.Text.FontAsset.AddSynthesizedCharactersAndFaceMetrics () (at <611557e554d645f496d2cb012b849869>:0)
UnityEngine.TextCore.Text.FontAsset.ReadFontAssetDefinition () (at <611557e554d645f496d2cb012b849869>:0)
UnityEngine.TextCore.Text.FontAsset.GetCharacterInLookupCache (System.UInt32 unicode, UnityEngine.TextCore.Text.FontStyles fontStyle, UnityEngine.TextCore.Text.TextFontWeight fontWeight, UnityEngine.TextCore.Text.Character& character) (at <611557e554d645f496d2cb012b849869>:0)
UnityEngine.TextCore.Text.FontAssetUtilities.GetCharacterFromFontAsset_Internal (System.UInt32 unicode, UnityEngine.TextCore.Text.FontAsset sourceFontAsset, System.Boolean includeFallbacks, UnityEngine.TextCore.Text.FontStyles fontStyle, UnityEngine.TextCore.Text.TextFontWeight fontWeight, System.Boolean& isAlternativeTypeface, System.Boolean populateLigatures) (at <611557e554d645f496d2cb012b849869>:0)
UnityEngine.TextCore.Text.FontAssetUtilities.GetCharacterFromFontAssetsInternal (System.UInt32 unicode, System.Collections.Generic.List`1[T] fontAssets, System.Boolean includeFallbacks, UnityEngine.TextCore.Text.FontStyles fontStyle, UnityEngine.TextCore.Text.TextFontWeight fontWeight, System.Boolean& isAlternativeTypeface, System.Boolean populateLigatures) (at <611557e554d645f496d2cb012b849869>:0)
UnityEngine.TextCore.Text.FontAssetUtilities.GetCharacterFromFontAssetsInternal (System.UInt32 unicode, UnityEngine.TextCore.Text.FontAsset sourceFontAsset, System.Collections.Generic.List`1[T] fontAssets, System.Collections.Generic.List`1[T] OSFallbackList, System.Boolean includeFallbacks, UnityEngine.TextCore.Text.FontStyles fontStyle, UnityEngine.TextCore.Text.TextFontWeight fontWeight, System.Boolean& isAlternativeTypeface, System.Boolean populateLigatures) (at <611557e554d645f496d2cb012b849869>:0)
UnityEngine.TextCore.Text.TextGenerator.GetEllipsisSpecialCharacter (UnityEngine.TextCore.Text.TextGenerationSettings generationSettings) (at <611557e554d645f496d2cb012b849869>:0)
UnityEngine.TextCore.Text.TextGenerator.GetSpecialCharacters (UnityEngine.TextCore.Text.TextGenerationSettings generationSettings) (at <611557e554d645f496d2cb012b849869>:0)
UnityEngine.TextCore.Text.TextGenerator.PrepareFontAsset (UnityEngine.TextCore.Text.TextGenerationSettings generationSettings) (at <611557e554d645f496d2cb012b849869>:0)
UnityEngine.TextCore.Text.TextHandle.PrepareFontAsset () (at <611557e554d645f496d2cb012b849869>:0)
UnityEngine.UIElements.UITKTextJobSystem+PrepareTextJobData.Execute (System.Int32 index) (at <58affde3b6cc47f39fa7e8b94d5890c0>: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 <7b8172fcdd864e17924794813da71712>:0)

Albiet with different keys.

If I were to take a wild guess, this look like a race condition of some sort.