Creating Locale and new StringTable caused different errors

Unity 2019.4, Localization 1.0.4, Addressables 1.19.9. Unfortunately I’m unable to submit a real bug-report atm.

After creating a new Locale, then selecting a table and clicking the “Create” button, several errors occurred.

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.Localization.Addressables.AddressableGroupRules.AddStringTableAsset (UnityEngine.Localization.Tables.LocalizationTable table, UnityEditor.AddressableAssets.Settings.AddressableAssetSettings aaSettings, System.Boolean createUndo) (at Library/PackageCache/com.unity.localization@1.0.4/Editor/Addressables/AddressableGroupRules.cs:156)
UnityEditor.Localization.LocalizationTableCollection.AddTableToAddressables (UnityEngine.Localization.Tables.LocalizationTable table, System.Boolean createUndo) (at Library/PackageCache/com.unity.localization@1.0.4/Editor/Settings/LocalizationTableCollection.cs:540)
UnityEditor.Localization.LocalizationTableCollection.RefreshAddressables (System.Boolean createUndo) (at Library/PackageCache/com.unity.localization@1.0.4/Editor/Settings/LocalizationTableCollection.cs:347)
UnityEditor.Localization.LocalizationTableCollection.ImportCollectionIntoProject () (at Library/PackageCache/com.unity.localization@1.0.4/Editor/Settings/LocalizationTableCollection.cs:582)
UnityEditor.Localization.LocalizationAssetPostProcessor.OnPostprocessAllAssets (System.String[] importedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromAssetPaths) (at Library/PackageCache/com.unity.localization@1.0.4/Editor/Asset Pipeline/LocalizationAssetPostProcessor.cs:43)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
UnityEditor.AssetPostprocessingInternal.InvokeMethod (System.Reflection.MethodInfo method, System.Object[] args) (at <8d21067e8d9c494db25a2b2485216e63>:0)
UnityEditor.AssetPostprocessingInternal.PostprocessAllAssets (System.String[] importedAssets, System.String[] addedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromPathAssets) (at <8d21067e8d9c494db25a2b2485216e63>:0)
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.Localization.LocalizationAssetPostProcessor.OnPostprocessAllAssets (System.String[] importedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromAssetPaths) (at Library/PackageCache/com.unity.localization@1.0.4/Editor/Asset Pipeline/LocalizationAssetPostProcessor.cs:71)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
UnityEditor.AssetPostprocessingInternal.InvokeMethod (System.Reflection.MethodInfo method, System.Object[] args) (at <8d21067e8d9c494db25a2b2485216e63>:0)
UnityEditor.AssetPostprocessingInternal.PostprocessAllAssets (System.String[] importedAssets, System.String[] addedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromPathAssets) (at <8d21067e8d9c494db25a2b2485216e63>:0)

How did you add the Locale Columns item? Did you add a single new item or select one of the other options from the CSV extension?

I mixed it up, it had nothing to do with the CSV Exporter. Sorry for the confusion. I edited my initial post. I also don’t have a case to reproduce atm, but perhaps just adding null checks around the code from above callstacks would help.

1 Like