Search Issue Tracker
Fixed in 2021.2.X
Votes
0
Found in
2019.4
2020.1
2020.2
2021.1
2021.1.0b7
2021.2
Issue ID
1314026
Regression
No
[Tests Assembly Definition] Errors are thrown on adding invalid versions to Version Defines list
While defining versions after selecting any Resources on entering and applying any information to 'Define' and 'Expression' field causes the editor to throw errors. Refer attached video and stack trace.
How to reproduce:
1. Create a new project
2. Create Tests Assembly Folder
3. Project > Tests > Inspector
4. Tests Import Settings >Add to Version Defines list.
5. Select any Resource
6. Write any information to 'Define' and 'Expression' fields > apply.
Actual results: ExpressionNotValidException spams the console
Expected results: without flooding console, only one error explaining the issue should appear
Occurring on:
2021.2.0a4, 2021.1.0b7, 2020.2.3f1, 2020.1.17f1, 2019.4.16f1
Environment:
Occurring on Windows 10 & macOS 10.15.
Stack Trace:
ExpressionNotValidException: Invalid character 'a' in expression : asd
UnityEditor.Scripting.ScriptCompilation.VersionRanges`1[TVersion].ParseExpression (System.String expression) (at /Users/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/VersionRanges.cs:144)
UnityEditor.Scripting.ScriptCompilation.VersionRanges`1[TVersion].GetExpression (System.String expression) (at /Users/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/VersionRanges.cs:40)
UnityEditor.Scripting.ScriptCompilation.VersionRangesFactory`1[TVersion].GetExpression (System.String expression) (at /Users/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/VersionRangesFactory.cs:16)
UnityEditor.Scripting.ScriptCompilation.EditorCompilation.GetTargetAssemblyDefines (UnityEditor.Scripting.ScriptCompilation.TargetAssembly targetAssembly, UnityEditor.Scripting.ScriptCompilation.VersionRangesFactory`1[TVersion] semVersionRangesFactory, UnityEditor.Scripting.ScriptCompilation.VersionRangesFactory`1[TVersion] unityVersionRangesFactory, System.Collections.Generic.Dictionary`2[TKey,TValue] versionMetaDatas, System.String[] editorOnlyCompatibleDefines, System.String[] playerAssembliesDefines, UnityEditor.Scripting.ScriptCompilation.ScriptAssemblySettings settings) (at /Users/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilation.cs:1323)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Memory is allocated but nothing happens when duplicating Values with the duplication shortcut in the Inspector
- Frame rate becomes lower after turning vertical sync on and off when in the Player on macOS
- Memory Profiler fails to enumerate a specific Heap Segment
- Performance gets worse when updating the Material of Tilemap
- Script causes Console error "Reading pixels out of bounds of the current active render texture" when entering the Play mode on a HDRP project
Add comment