better way to determine which file caused the error
See original GitHub issueTried with Unity Editor Tool. Current latest (UnityScript2CSharp_Conversion_1.0.6998.28881.unitypackage)
i had 302 script files in the project and i have no clue which file caused it.
in the output the only thing i see
`Defined Symbols: Internal compiler error: Object reference not set to an instance of an object…
at Boo.Lang.Compiler.Ast.DepthFirstVisitor.OnError(Node node, Exception error) in m:\Work\Repo\boo\src\Boo.Lang.Compiler\Ast\DepthFirstVisitor.cs:line 83
at Boo.Lang.Compiler.Ast.DepthFirstVisitor.Visit(Node node) in m:\Work\Repo\boo\src\Boo.Lang.Compiler\Ast\DepthFirstVisitor.cs:line 55
at Boo.Lang.Compiler.Ast.DepthFirstVisitor.Visit(Node[] array) in m:\Work\Repo\boo\src\Boo.Lang.Compiler\Ast\DepthFirstVisitor.cs:line 112
at Boo.Lang.Compiler.Ast.DepthFirstVisitor.Visit[T](NodeCollection1 collection) in m:\Work\Repo\boo\src\Boo.Lang.Compiler\Ast\DepthFirstVisitor.cs:line 119 at Boo.Lang.Compiler.Ast.DepthFirstVisitor.OnBlock(Block node) in m:\Work\Repo\boo\src\Boo.Lang.Compiler\Ast\Impl\DepthFirstVisitor.cs:line 722 at UnityScript2CSharp.UnityScript2CSharpConverterVisitor.OnBlock(Block node) in G:\Work\repo\unityscript2csharp\UnityScript2CSharp\UnityScript2CSharpConverterVisitor.cs:line 496 at Boo.Lang.Compiler.Ast.Block.Accept(IAstVisitor visitor) in m:\Work\Repo\boo\src\Boo.Lang.Compiler\Ast\Impl\BlockImpl.cs:line 69 at UnityScript2CSharp.UnityScript2CSharpConverterVisitor.OnMethod(Method node) in G:\Work\repo\unityscript2csharp\UnityScript2CSharp\UnityScript2CSharpConverterVisitor.cs:line 319 at Boo.Lang.Compiler.Ast.Method.Accept(IAstVisitor visitor) in m:\Work\Repo\boo\src\Boo.Lang.Compiler\Ast\Impl\MethodImpl.cs:line 75 at UnityScript2CSharp.UnityScript2CSharpConverterVisitor.WriteMembersOf(TypeDefinition node) in G:\Work\repo\unityscript2csharp\UnityScript2CSharp\UnityScript2CSharpConverterVisitor.cs:line 1553 at UnityScript2CSharp.UnityScript2CSharpConverterVisitor.OnClassDefinition(ClassDefinition node) in G:\Work\repo\unityscript2csharp\UnityScript2CSharp\UnityScript2CSharpConverterVisitor.cs:line 174 at Boo.Lang.Compiler.Ast.ClassDefinition.Accept(IAstVisitor visitor) in m:\Work\Repo\boo\src\Boo.Lang.Compiler\Ast\Impl\ClassDefinitionImpl.cs:line 67 at Boo.Lang.Compiler.Ast.DepthFirstVisitor.Visit(Node node) in m:\Work\Repo\boo\src\Boo.Lang.Compiler\Ast\DepthFirstVisitor.cs:line 51 at Boo.Lang.Compiler.Ast.DepthFirstVisitor.Visit(Node[] array) in m:\Work\Repo\boo\src\Boo.Lang.Compiler\Ast\DepthFirstVisitor.cs:line 112 at Boo.Lang.Compiler.Ast.DepthFirstVisitor.Visit[T](NodeCollection
1 collection) in m:\Work\Repo\boo\src\Boo.Lang.Compiler\Ast\DepthFirstVisitor.cs:line 119
at Boo.Lang.Compiler.Ast.DepthFirstVisitor.OnModule(Module node) in m:\Work\Repo\boo\src\Boo.Lang.Compiler\Ast\Impl\DepthFirstVisitor.cs:line 240
at UnityScript2CSharp.UnityScript2CSharpConverterVisitor.OnModule(Module node) in G:\Work\repo\unityscript2csharp\UnityScript2CSharp\UnityScript2CSharpConverterVisitor.cs:line 146
at Boo.Lang.Compiler.Ast.Module.Accept(IAstVisitor visitor) in m:\Work\Repo\boo\src\Boo.Lang.Compiler\Ast\Impl\ModuleImpl.cs:line 75
at Boo.Lang.Compiler.Ast.DepthFirstVisitor.Visit(Node node) in m:\Work\Repo\boo\src\Boo.Lang.Compiler\Ast\DepthFirstVisitor.cs:line 51
at Boo.Lang.Compiler.Ast.DepthFirstVisitor.Visit(Node[] array) in m:\Work\Repo\boo\src\Boo.Lang.Compiler\Ast\DepthFirstVisitor.cs:line 112
at Boo.Lang.Compiler.Ast.DepthFirstVisitor.Visit[T](NodeCollection1 collection) in m:\Work\Repo\boo\src\Boo.Lang.Compiler\Ast\DepthFirstVisitor.cs:line 119 at Boo.Lang.Compiler.Ast.DepthFirstVisitor.OnCompileUnit(CompileUnit node) in m:\Work\Repo\boo\src\Boo.Lang.Compiler\Ast\Impl\DepthFirstVisitor.cs:line 47 at Boo.Lang.Compiler.Ast.CompileUnit.Accept(IAstVisitor visitor) in m:\Work\Repo\boo\src\Boo.Lang.Compiler\Ast\Impl\CompileUnitImpl.cs:line 69 at UnityScript2CSharp.UnityScript2CSharpConverter.Convert(IEnumerable
1 inputs, IEnumerable1 definedSymbols, IEnumerable
1 referencedAssemblies, Action3 onScriptConverted) in G:\Work\repo\unityscript2csharp\UnityScript2CSharp\UnityScript2CSharpConverter.cs:line 43 at UnityScript2CSharp.Program.ConvertScripts(AssemblyType assemblyType, IList
1 scripts, UnityScript2CSharpConverter converter, CommandLineArguments args, List1 referencedSymbols, HashSet
1 compilerErrors) in G:\Work\repo\unityscript2csharp\UnityScript2CSharp\Program.cs:line 344
at UnityScript2CSharp.Program.Main(String[] args) in G:\Work\repo\unityscript2csharp\UnityScript2CSharp\Program.cs:line 76`
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
with the new unitypackage, i found the file which caused the error and also found the line. It’s interestring because the line is very simple.
In the MonoBehaviour Update() loop there is a line which will get a boolean variable
var setActive : boolean = (player && player.enabled && IsIntInArray(player.animationIndex, animationIndexes));
There is only one MonoBehaviour object, the “player” the others are local variables primitives and functions.
If i comment this line out
var setActive : boolean = (player && player.enabled && IsIntInArray(player.animationIndex, animationIndexes));
and replace with likevar setActive : boolean = true //or false
the converter dont produce the stack i provided at the first place.I hope this information helps to improve the converter tool.
Hi. Can you try with this version in verbose mode (button Convert (verbose)) ?
The last logged filename should be the one that caused the error.
UnityScript2CSharp_Conversion_1.0.7002.42237.unitypackage.zip