Search Unity

Bug Creating Locale and new StringTable caused different errors

Discussion in 'Localization Tools' started by Peter77, Oct 25, 2021.

  1. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,609
    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.

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. 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)
    3. 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)
    4. UnityEditor.Localization.LocalizationTableCollection.RefreshAddressables (System.Boolean createUndo) (at Library/PackageCache/com.unity.localization@1.0.4/Editor/Settings/LocalizationTableCollection.cs:347)
    5. UnityEditor.Localization.LocalizationTableCollection.ImportCollectionIntoProject () (at Library/PackageCache/com.unity.localization@1.0.4/Editor/Settings/LocalizationTableCollection.cs:582)
    6. 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)
    7. 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)
    8. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    9. 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)
    10. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
    11. UnityEditor.AssetPostprocessingInternal.InvokeMethod (System.Reflection.MethodInfo method, System.Object[] args) (at <8d21067e8d9c494db25a2b2485216e63>:0)
    12. UnityEditor.AssetPostprocessingInternal.PostprocessAllAssets (System.String[] importedAssets, System.String[] addedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromPathAssets) (at <8d21067e8d9c494db25a2b2485216e63>:0)
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. 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)
    3. 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)
    4. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    5. 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)
    6. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
    7. UnityEditor.AssetPostprocessingInternal.InvokeMethod (System.Reflection.MethodInfo method, System.Object[] args) (at <8d21067e8d9c494db25a2b2485216e63>:0)
    8. UnityEditor.AssetPostprocessingInternal.PostprocessAllAssets (System.String[] importedAssets, System.String[] addedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromPathAssets) (at <8d21067e8d9c494db25a2b2485216e63>:0)
    9.  
     
    Last edited: Oct 25, 2021
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    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?
     
  3. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,609
    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.
     
    karl_jones likes this.