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
- Crash on ShaderLab::ShaderState::ApplyShaderState when entering Play Mode and calling ShaderWarmup.WarmupShaderFromCollection with a shader that has dynamic_branch
- Crash on operator delete[] when a serializable structure in the System namespace is serialized by a MonoBehaviour
- [macOS] forward and backward mouse buttons are recognized as middle mouse button
- NavMeshModifier.OnEnable/OnDisable gets progressively slower when called repeatedly
- "System.Net.CookieContainer" throws an "ArgumentException" error when using a non-UTF-8 machine locale and hostname
Add comment