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
- Editor crashes on StoredGraphicsBuffer::GetGfxBufferID when VFX Graph property is modified during Play Mode and Application.targetFrameRate is used to limit FPS
- Crash on NVAPI_Thunk when changing Player resolution while HDR display is used and Direct3D12 is set as the graphics API
- Only one out of multiple cameras is shown in the Play Mode while HDR display is used and Direct3D12 is set as the graphics API
- The "Paste Component as New" option is incorrectly displayed as active despite the action being prohibited
- "TLS Allocator ALLOC_TEMP_TLS" errors are thrown when unsuccessfully importing an FBX file
Add comment