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
- Specular lighting visible in a camera with Path Tracing when Preserve specular lighting is disabled in observed material
- Cinemachine package throws CS1061 errors in the Console when installed in a project that has HDRP and URP installed
- Editor.log file size grows rapidly when a scene exceeds the "Maximum Shadow on Screen" limit setting in the HDRP Asset
- Player build freezes after calling Application.Quit() when the scripting backend is set to IL2CPP
- Texture is not applied on a Custom Render Texture when a Cubemap is selected as the texture
Add comment