Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Script Updater Problems

Discussion in 'Unity 5 Pre-order Beta' started by pojoih, Nov 3, 2014.

  1. pojoih

    pojoih

    Joined:
    Mar 30, 2013
    Posts:
    226
    Any chance that you open sourced the Script Updater for Unity 5? Why is this not an Editorscript that you can Debug anyway?

    I just can't get in to work, I got rid of all the errors he tells me about but still I get an exception:

    Could not start compilationException: Failed running ScriptUpdater.exe its output was:stdout:
    stderr:

    Unhandled Exception:
    System.ArgumentOutOfRangeException: Cannot be negative.

    Parameter name: length

    at System.String.Substring (Int32 startIndex, Int32 length) [0x00000] in <filename unknown>:0

    at CSharpUpdater.MethodReferenceResolver.IsDelegateOfType (ICSharpCode.NRefactory.Semantics.ResolveResult varType, System.Type[] delegateTypes) [0x00000] in <filename unknown>:0

    at CSharpUpdater.MethodReferenceResolver.ResolveOverloadDelegateType (ICSharpCode.NRefactory.CSharp.Expression expression, ICSharpCode.NRefactory.Semantics.ResolveResult variableType, ICSharpCode.NRefactory.CSharp.Resolver.MethodGroupResolveResult methodGroup) [0x00000] in <filename unknown>:0

    at CSharpUpdater.MethodReferenceResolver.ResolveOverload (ICSharpCode.NRefactory.CSharp.Expression expression, ICSharpCode.NRefactory.CSharp.AstNode deletegateType) [0x00000] in <filename unknown>:0

    at CSharpUpdater.MethodReferenceResolver.VisitVariableInitializer (ICSharpCode.NRefactory.CSharp.VariableInitializer variableInitializer) [0x00000] in <filename unknown>:0

    at ICSharpCode.NRefactory.CSharp.VariableInitializer.AcceptVisitor[IMember] (IAstVisitor`1 visitor) [0x00000] in <filename unknown>:0

    at CSharpUpdater.MethodReferenceResolver.Resolve (ICSharpCode.NRefactory.CSharp.Expression expression, CSharpUpdater.CSharpUpdateContext context) [0x00000] in <filename unknown>:0

    at CSharpUpdater.ReplacingAstVisitor.ResolveMethod (ICSharpCode.NRefactory.CSharp.Expression expression) [0x00000] in <filename unknown>:0

    at CSharpUpdater.MemberReferenceReplacerBase`1[APIUpdater.Framework.Configuration.MethodRetargetConfig].VisitMemberReferenceExpression (ICSharpCode.NRefactory.CSharp.MemberReferenceExpression memberReferenceExpression) [0x00000] in <filename unknown>:0

    at ICSharpCode.NRefactory.CSharp.MemberReferenceExpression.AcceptVisitor (IAstVisitor visitor) [0x00000] in <filename unknown>:0

    at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00000] in <filename unknown>:0

    at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitVariableInitializer (ICSharpCode.NRefactory.CSharp.VariableInitializer variableInitializer) [0x00000] in <filename unknown>:0

    at ICSharpCode.NRefactory.CSharp.VariableInitializer.AcceptVisitor (IAstVisitor visitor) [0x00000] in <filename unknown>:0

    at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00000] in <filename unknown>:0

    at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitFieldDeclaration (ICSharpCode.NRefactory.CSharp.FieldDeclaration fieldDeclaration) [0x00000] in <filename unknown>:0

    at ICSharpCode.NRefactory.CSharp.FieldDeclaration.AcceptVisitor (IAstVisitor visitor) [0x00000] in <filename unknown>:0

    at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00000] in <filename unknown>:0

    at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitTypeDeclaration (ICSharpCode.NRefactory.CSharp.TypeDeclaration typeDeclaration) [0x00000] in <filename unknown>:0

    at ICSharpCode.NRefactory.CSharp.TypeDeclaration.AcceptVisitor (IAstVisitor visitor) [0x00000] in <filename unknown>:0

    at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00000] in <filename unknown>:0

    at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitSyntaxTree (ICSharpCode.NRefactory.CSharp.SyntaxTree syntaxTree) [0x00000] in <filename unknown>:0

    at ICSharpCode.NRefactory.CSharp.SyntaxTree.AcceptVisitor (IAstVisitor visitor) [0x00000] in <filename unknown>:0

    at CSharpUpdater.CSharpUpdater.RunUpdater (APIUpdater.Framework.Core.SourceFile[] inputs, IEnumerable`1 defines, IEnumerable`1 references) [0x00000] in <filename unknown>:0

    at APIUpdater.Framework.Core.APIUpdaterBase.Update (APIUpdater.Framework.Core.SourceFile[] inputs, IEnumerable`1 defines, IEnumerable`1 references) [0x00000] in <filename unknown>:0

    at ScriptUpdater.Program.UpdateLanguage (IScriptUpdater updater, APIUpdater.Framework.Configuration.CompilerResponseFile responseFile, System.String unityDataPath, System.String outputPath) [0x00000] in <filename unknown>:0

    at ScriptUpdater.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
    [ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentOutOfRangeException: Cannot be negative.

    Parameter name: length

    at System.String.Substring (Int32 startIndex, Int32 length) [0x00000] in <filename unknown>:0

    at CSharpUpdater.MethodReferenceResolver.IsDelegateOfType (ICSharpCode.NRefactory.Semantics.ResolveResult varType, System.Type[] delegateTypes) [0x00000] in <filename unknown>:0

    at CSharpUpdater.MethodReferenceResolver.ResolveOverloadDelegateType (ICSharpCode.NRefactory.CSharp.Expression expression, ICSharpCode.NRefactory.Semantics.ResolveResult variableType, ICSharpCode.NRefactory.CSharp.Resolver.MethodGroupResolveResult methodGroup) [0x00000] in <filename unknown>:0

    at CSharpUpdater.MethodReferenceResolver.ResolveOverload (ICSharpCode.NRefactory.CSharp.Expression expression, ICSharpCode.NRefactory.CSharp.AstNode deletegateType) [0x00000] in <filename unknown>:0

    at CSharpUpdater.MethodReferenceResolver.VisitVariableInitializer (ICSharpCode.NRefactory.CSharp.VariableInitializer variableInitializer) [0x00000] in <filename unknown>:0

    at ICSharpCode.NRefactory.CSharp.VariableInitializer.AcceptVisitor[IMember] (IAstVisitor`1 visitor) [0x00000] in <filename unknown>:0

    at CSharpUpdater.MethodReferenceResolver.Resolve (ICSharpCode.NRefactory.CSharp.Expression expression, CSharpUpdater.CSharpUpdateContext context) [0x00000] in <filename unknown>:0

    at CSharpUpdater.ReplacingAstVisitor.ResolveMethod (ICSharpCode.NRefactory.CSharp.Expression expression) [0x00000] in <filename unknown>:0

    at CSharpUpdater.MemberReferenceReplacerBase`1[APIUpdater.Framework.Configuration.MethodRetargetConfig].VisitMemberReferenceExpression (ICSharpCode.NRefactory.CSharp.MemberReferenceExpression memberReferenceExpression) [0x00000] in <filename unknown>:0

    at ICSharpCode.NRefactory.CSharp.MemberReferenceExpression.AcceptVisitor (IAstVisitor visitor) [0x00000] in <filename unknown>:0

    at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00000] in <filename unknown>:0

    at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitVariableInitializer (ICSharpCode.NRefactory.CSharp.VariableInitializer variableInitializer) [0x00000] in <filename unknown>:0

    at ICSharpCode.NRefactory.CSharp.VariableInitializer.AcceptVisitor (IAstVisitor visitor) [0x00000] in <filename unknown>:0

    at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00000] in <filename unknown>:0

    at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitFieldDeclaration (ICSharpCode.NRefactory.CSharp.FieldDeclaration fieldDeclaration) [0x00000] in <filename unknown>:0

    at ICSharpCode.NRefactory.CSharp.FieldDeclaration.AcceptVisitor (IAstVisitor visitor) [0x00000] in <filename unknown>:0

    at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00000] in <filename unknown>:0

    at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitTypeDeclaration (ICSharpCode.NRefactory.CSharp.TypeDeclaration typeDeclaration) [0x00000] in <filename unknown>:0

    at ICSharpCode.NRefactory.CSharp.TypeDeclaration.AcceptVisitor (IAstVisitor visitor) [0x00000] in <filename unknown>:0

    at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00000] in <filename unknown>:0

    at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitSyntaxTree (ICSharpCode.NRefactory.CSharp.SyntaxTree syntaxTree) [0x00000] in <filename unknown>:0

    at ICSharpCode.NRefactory.CSharp.SyntaxTree.AcceptVisitor (IAstVisitor visitor) [0x00000] in <filename unknown>:0

    at CSharpUpdater.CSharpUpdater.RunUpdater (APIUpdater.Framework.Core.SourceFile[] inputs, IEnumerable`1 defines, IEnumerable`1 references) [0x00000] in <filename unknown>:0

    at APIUpdater.Framework.Core.APIUpdaterBase.Update (APIUpdater.Framework.Core.SourceFile[] inputs, IEnumerable`1 defines, IEnumerable`1 references) [0x00000] in <filename unknown>:0

    at ScriptUpdater.Program.UpdateLanguage (IScriptUpdater updater, APIUpdater.Framework.Configuration.CompilerResponseFile responseFile, System.String unityDataPath, System.String outputPath) [0x00000] in <filename unknown>:0

    at ScriptUpdater.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0

    UnityEditor.Scripting.Compilers.MonoScriptCompilerBase.RunUpdatingProgram (System.String executable, System.String arguments) (at C:/buildslave/unity/build/Editor/Mono/Scripting/Compilers/MonoScriptCompilerBase.cs:83)
    UnityEditor.Scripting.Compilers.MonoScriptCompilerBase.RunUpdater (System.String responseFile) (at C:/buildslave/unity/build/Editor/Mono/Scripting/Compilers/MonoScriptCompilerBase.cs:53)
    UnityEditor.Scripting.Compilers.MonoScriptCompilerBase.StartCompiler (BuildTarget target, System.String compiler, System.Collections.Generic.List`1 arguments, Boolean setMonoEnvironmentVariables) (at C:/buildslave/unity/build/Editor/Mono/Scripting/Compilers/MonoScriptCompilerBase.cs:37)
    UnityEditor.Scripting.Compilers.MonoScriptCompilerBase.StartCompiler (BuildTarget target, System.String compiler, System.Collections.Generic.List`1 arguments) (at C:/buildslave/unity/build/Editor/Mono/Scripting/Compilers/MonoScriptCompilerBase.cs:28)
    UnityEditor.Scripting.Compilers.MonoCSharpCompiler.StartCompiler () (at C:/buildslave/unity/build/Editor/Mono/Scripting/Compilers/MonoCSharpCompiler.cs:43)
    UnityEditor.Scripting.Compilers.ScriptCompilerBase.BeginCompiling () (at C:/buildslave/unity/build/Editor/Mono/Scripting/Compilers/ScriptCompilerBase.cs:47)

    Any chance to get this solved without uploading my whole 12GB Project as an Bug Report ;) ?
     
  2. AdrianoVerona_Unity

    AdrianoVerona_Unity

    Unity Technologies

    Joined:
    Apr 11, 2013
    Posts:
    317
    Hi.

    I've just fixed a bug with exact the same call stack ;) (BTW, also in a big project)

    This fix will be included in the next beta.
     
    MrEsquire, pojoih and shkar-noori like this.
  3. pojoih

    pojoih

    Joined:
    Mar 30, 2013
    Posts:
    226
    haha okay I'll stop adding GetComponents manually and wait for it ;). Thanks a bunch!