Search Issue Tracker

Fixed in Unity 2019.1

Votes

0

Found in

2018.3.0b10

Issue ID

1101447

Regression

Yes

CSharpNamescapeParser throws InvalidOperationException: Stack empty

Scripting

-

-

Priority: 2Necessary for shipping a final release

-

Severity: 2Core functionality majorly impacted

Steps to reproduce:

1. Open attached project
2. Reimport PropertyReference script
3. Notice error in console:
InvalidOperationException: Stack empty.
System.Collections.Generic.Stack`1[T].ThrowForEmptyStack () (at <3845a180c26b4889bc2d47593a665814>:0)
System.Collections.Generic.Stack`1[T].Pop () (at <3845a180c26b4889bc2d47593a665814>:0)
UnityEditor.Scripting.ScriptCompilation.CSharpNamespaceParser.ApplyOp (System.Char op, System.Collections.Generic.Stack`1[T] values) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/CSharpNamespaceParser.cs:299)
UnityEditor.Scripting.ScriptCompilation.CSharpNamespaceParser.EvaluateBool (System.String expression) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/CSharpNamespaceParser.cs:272)
UnityEditor.Scripting.ScriptCompilation.CSharpNamespaceParser.EvaluateBooleanExpression (System.String expression) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/CSharpNamespaceParser.cs:250)
UnityEditor.Scripting.ScriptCompilation.CSharpNamespaceParser.EvaluateDefine (System.String expr, System.Collections.Generic.ICollection`1[T] defines) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/CSharpNamespaceParser.cs:241)
UnityEditor.Scripting.ScriptCompilation.CSharpNamespaceParser.RemoveUnusedDefines (System.String source, System.Collections.Generic.List`1[T] defines) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/CSharpNamespaceParser.cs:182)
UnityEditor.Scripting.ScriptCompilation.CSharpNamespaceParser.RemoveIfDefs (System.String source, System.Collections.Generic.IEnumerable`1[T] defines) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/CSharpNamespaceParser.cs:159)
UnityEditor.Scripting.ScriptCompilation.CSharpNamespaceParser.GetNamespace (System.String sourceCode, System.String className, System.String[] defines) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/CSharpNamespaceParser.cs:42)
Rethrow as IllegalNamespaceParsing: Searching for classname: 'PropertyReference' caused error in CSharpNameParser
UnityEditor.Scripting.ScriptCompilation.CSharpNamespaceParser.GetNamespace (System.String sourceCode, System.String className, System.String[] defines) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/CSharpNamespaceParser.cs:48)
UnityEditor.Scripting.Compilers.CSharpLanguage.GetNamespaceNewRuntime (System.String filePath, System.String definedSymbols, System.String[] defines) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Scripting/Compilers/CSharpLanguage.cs:90)
UnityEditor.Scripting.Compilers.CSharpLanguage.GetNamespace (System.String filePath, System.String definedSymbols) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Scripting/Compilers/CSharpLanguage.cs:133)
UnityEditor.Scripting.ScriptCompilers.GetNamespace (System.String file, System.String definedSymbols) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilers.cs:111)

Reproduced with: 2018.3.0b9, 2018.3.0b11, 2019.1.0a6, 2019.1.0a9
Not reproducible: 2018.3.0b8, 2019.1.0a5
Regression introduced in: 2018.3.0b9, 2019.1.0a6

Comments (5)

  1. De538f6303bc4c5fbed82b7dcefab0a9?d=mm

    SweatyChair

    Mar 11, 2019 06:35

    Still in 2018.3.5.f1 mac

  2. C3aed05c0be09f3ac60a5ecf3238fc6b?d=mm

    AlexSD3

    Jan 23, 2019 22:44

    It happened to my in the 2018.3.0f1 version for Mac, I could't reproduce it on the Windows version

  3. 799da5837578b2129cc7006bbcdb787b?d=mm

    stonstad

    Jan 17, 2019 19:29

    I get this all the time. I hope a fix is forthcoming.

  4. E7427610176372e048e0a991673354ef?d=mm

    Benjaminupjers

    Dec 18, 2018 07:50

    Is there a solution to this? Can't wait for 2019.1 ?!

  5. Dc8e33dd98f20ef83f24cce9c52a5226?d=mm

    LaneMax

    Dec 10, 2018 18:07

    Also found in 2018.3.0f1, very frustrating

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.