Hi @karl_jones ,
I’m finally following up on this with a tiny bit more information. I’m happy to upload our project, and I can also send a screencap video of this happening just in case you’re not able to reproduce it yourself. The project is around 63GB, so let me know where to upload this. I have tried to repro this in a new project however I cannot.
This issue seems to reliably happen when we change branch in source control to a branch where two things have happened: there have been large changes made to the localisation tables AND there have been script changes. After we have switched branch, Unity does a reimport and we find our console is full of exceptions (see below) which come from an OnValidate method in one of our localisation related scripts. This script is on lots of gameobjects in lots of different UI prefabs. This OnValidate method seems to get called for all prefabs which have this script on it when the reimport happens. I thought this could potentially be to do with this bug however we’re on 2021.3.15f1 and the bug tracker would suggest this was fixed for us. We also see these exceptions when changing branch after a fresh open of Unity (i.e. the prefabs are not loaded in memory), so I now do not think it is related to this.
So, after we’ve changed branches and Unity has reimported and spammed the console full of these exceptions. If we press play now, this is when we get the lock up that I initially reported. At this point we have to kill Unity in the task manager. However, if before we enter playmode, we reimport a single script (either with the right click menu or by making a script change), then it seems to recover and entering playmode will not cause a lock up.
NullReferenceException: Object reference not set to an instance of an object
UnityEngine.Localization.LoadTableOperation`2[TTable,TEntry].LoadTableByGuid (UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1[TObject] operationHandle) (at Library/PackageCache/com.unity.localization@1.3.1/Runtime/Operations/LoadTableOperation.cs:79)
UnityEngine.Localization.LoadTableOperation`2[TTable,TEntry].Execute () (at Library/PackageCache/com.unity.localization@1.3.1/Runtime/Operations/LoadTableOperation.cs:61)
UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1[TObject].InvokeExecute () (at Library/PackageCache/com.unity.addressables@1.19.19/Runtime/ResourceManager/AsyncOperations/AsyncOperationBase.cs:469)
UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1[TObject].Start (UnityEngine.ResourceManagement.ResourceManager rm, UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle dependency, DelegateList`1[T] updateCallbacks) (at Library/PackageCache/com.unity.addressables@1.19.19/Runtime/ResourceManager/AsyncOperations/AsyncOperationBase.cs:464)
UnityEngine.ResourceManagement.ResourceManager.StartOperation[TObject] (UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1[TObject] operation, UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle dependency) (at Library/PackageCache/com.unity.addressables@1.19.19/Runtime/ResourceManager/ResourceManager.cs:452)
UnityEngine.Localization.Settings.LocalizedDatabase`2[TTable,TEntry].GetTableAsync (UnityEngine.Localization.Tables.TableReference tableReference, UnityEngine.Localization.Locale locale) (at Library/PackageCache/com.unity.localization@1.3.1/Runtime/Settings/Database/LocalizedDatabase.cs:261)
UnityEngine.Localization.Settings.LocalizedDatabase`2[TTable,TEntry].GetTableEntryAsync (UnityEngine.Localization.Tables.TableReference tableReference, UnityEngine.Localization.Tables.TableEntryReference tableEntryReference, UnityEngine.Localization.Locale locale, UnityEngine.Localization.Settings.FallbackBehavior fallbackBehavior) (at Library/PackageCache/com.unity.localization@1.3.1/Runtime/Settings/Database/LocalizedDatabase.cs:510)
UnityEngine.Localization.Settings.LocalizedStringDatabase.GetLocalizedStringAsyncInternal (UnityEngine.Localization.Tables.TableReference tableReference, UnityEngine.Localization.Tables.TableEntryReference tableEntryReference, System.Collections.Generic.IList`1[T] arguments, UnityEngine.Localization.Locale locale, UnityEngine.Localization.Settings.FallbackBehavior fallbackBehavior, UnityEngine.Localization.SmartFormat.PersistentVariables.IVariableGroup localVariables, System.Boolean autoRelease) (at Library/PackageCache/com.unity.localization@1.3.1/Runtime/Settings/Database/LocalizedStringDatabase.cs:215)
UnityEngine.Localization.Settings.LocalizedStringDatabase.GetLocalizedString (UnityEngine.Localization.Tables.TableReference tableReference, UnityEngine.Localization.Tables.TableEntryReference tableEntryReference, System.Collections.Generic.IList`1[T] arguments, UnityEngine.Localization.Locale locale, UnityEngine.Localization.Settings.FallbackBehavior fallbackBehavior) (at Library/PackageCache/com.unity.localization@1.3.1/Runtime/Settings/Database/LocalizedStringDatabase.cs:240)
UnityEngine.Localization.Settings.LocalizedStringDatabase.GetLocalizedString (UnityEngine.Localization.Tables.TableReference tableReference, UnityEngine.Localization.Tables.TableEntryReference tableEntryReference, UnityEngine.Localization.Locale locale, UnityEngine.Localization.Settings.FallbackBehavior fallbackBehavior, System.Object[] arguments) (at Library/PackageCache/com.unity.localization@1.3.1/Runtime/Settings/Database/LocalizedStringDatabase.cs:189)
localisation.LocalisedTMP.OnValidate () (at Packages/com.hugecalf.general/Runtime/localisation/LocalisedTMP.cs:109)