Search Issue Tracker
Fixed in 1.2.x or higher
Votes
1
Found in [Package]
preview-1.1.0
Issue ID
1162170
Regression
No
Addressables - ArgumentOutOfRangeException occurs when attempting to give a profile a name with 0 characters
If you attempt to create a new Addressables profile with an empty name, an ArgumentOutOfRangeException occurs.
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <23c160f925be47d7a4fd083a3a62c920>:0)
System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <23c160f925be47d7a4fd083a3a62c920>:0)
System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <23c160f925be47d7a4fd083a3a62c920>:0)
UnityEditor.AddressableAssets.GUI.AddressableAssetSettingsInspector.OnInspectorGUI () (at Library/PackageCache/com.unity.addressables@1.1.0-preview/Editor/GUI/AddressableAssetSettingsInspector.cs:171)
UnityEditor.UIElements.InspectorElement+<CreateIMGUIInspectorFromEditor>c__AnonStorey1.<>m__0 () (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorElement.cs:494)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
1. Open Unity
2. Open the attached project
3. In Project View, select Assets/AddressableAssetsData/AddressableAssetSettings.asset
4. In the Inspector, under Profiles, add a profile
5. When choosing a name for the profile, delete all the characters so the name is empty
6. Confirm the profile name
Expected Result:
No errors or exceptions occur in the console.
Actual Result:
An ArgumentOutOfRangeException occurs.
Tested on Windows.
Occurs on version preview-1.1.0, preview-1.0.0, preview-0.8.0
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
- Sprite Masks affect Sprite Renderers outside their range when a Light2D is present with specific Target Sorting Layers selected
- URP Lens Flare is rendered in the wrong position when Render Graph Compatibility Mode is enabled and Render Scaling is not 0
- Editor crashes on DrvPresentBuffers when loading RenderDoc while using OpenGLES 3.0 or OpenGLES 2.0 Graphics API
- [Test Runner] Incorrect name under Window > Panel after project restart
- [iOS] Crash when using fallback fonts created at runtime
Resolution Note (fix version 1.2.x or higher):
UI has been redone and does not allow 0 length profile name.