Comments (19)
If you run your project through command line msbuild, does it work? Or do you have to use the version of visual studio specific to wp7?
Also, can you tell me the location of the devices sensors assembly on disk?
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
kierepka [email protected] wrote:
Hi,
When I try to convert XNA game using JSILc I'm getting this error:
// Building 'C:\prywatne\FunApp\XGame\Wp7\XGame.sln' ... done.
// Applied settings from 'defaults.jsilconfig'.
// Loaded C:\prywatne\FunApp\XGame\Wp7\Platformer\Platformer\bin\Windows Phone\Debug\XGame.dll
// Could not load module Microsoft.Devices.Sensors, Version=7.0.0.0, Culture=neutral, PublicKeyToken=24eec0d8c86cda1e: Failed to resolve assembly: 'Microsoft.Devices.Sensors, Version=7.0.0.0, Culture=neutral, PublicKeyToken=24eec0d8c86cda1e
'
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_32\Microsoft.Xna.Framework.Game\v4.0_4.0.0.0__842cf8be1de50553\Microsoft.Xna.Framework.Game.dll
// Loaded C:\prywatne\FunApp\XGame\Wp7\Platformer\Platformer\bin\Windows Phone\Debug\FarseerPhysicsXNA.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_32\Microsoft.Xna.Framework.Graphics\v4.0_4.0.0.0__842cf8be1de50553\Microsoft.Xna.Framework.Graphics.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_32\Microsoft.Xna.Framework\v4.0_4.0.0.0__842cf8be1de50553\Microsoft.Xna.Framework.dll
// Loaded C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll
Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at JSIL.AssemblyTranslator.<>c__DisplayClassf.b__b(Int32 i) in E:\GitHub\JSIL\JSIL\AssemblyTranslator.cs:line 227
at System.Threading.Tasks.Parallel.<>c__DisplayClassf1.<ForWorker>b__c() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) at System.Threading.Tasks.Task.<>c__DisplayClass7.<ExecuteSelfReplicating>b__ 6(Object ) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceled Exceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action
1 body, Action2 bodyWithState, Func
4 bodyWithLocal, Func1 localInit, Action
1 localFinally)
at System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body)
at JSIL.AssemblyTranslator.LoadAssembly(String path, Boolean useSymbols, Boolean includeDependencies) in E:\GitHub\JSIL\JSIL\AssemblyTranslator.cs:line 0
at JSIL.AssemblyTranslator.LoadAssembly(String path) in E:\GitHub\JSIL\JSIL\AssemblyTranslator.cs:line 116
at JSIL.AssemblyTranslator.Translate(String assemblyPath, Boolean scanForProxies) in E:\GitHub\JSIL\JSIL\AssemblyTranslator.cs:line 260
at JSIL.Compiler.Program.Main(String[] arguments) in E:\GitHub\JSIL\Compiler\Program.cs:line 253
Reply to this email directly or view it on GitHub:
#54
from jsil.
Yes I'm using just Visual Studio. This dll (sensors) should be in SDK for Windows Phone (I try to find it but without any success)
from jsil.
I'm now moving code from Wp7 to PC - maybe this will help?
from jsil.
ok. After translation to PC I got this error (when I'm using exe file):
Unhandled Exception: System.AggregateException: One or more errors occurred. ---
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' w
as thrown.
at System.Collections.Generic.List1.System.Collections.Generic.IEnumerable<T .GetEnumerator() at ICSharpCode.Decompiler.ILAst.ILNode.AccumulateSelfAndChildrenRecursive[T]( List
1 list, Func2 predicate) in E:\GitHub\JSIL\Upstream\ILSpy\ICSharpCode.Deco mpiler\ILAst\ILAstTypes.cs:line 50 at ICSharpCode.Decompiler.ILAst.ILNode.AccumulateSelfAndChildrenRecursive[T]( List
1 list, Func2 predicate) in E:\GitHub\JSIL\Upstream\ILSpy\ICSharpCode.Deco mpiler\ILAst\ILAstTypes.cs:line 52 at ICSharpCode.Decompiler.ILAst.ILNode.AccumulateSelfAndChildrenRecursive[T]( List
1 list, Func2 predicate) in E:\GitHub\JSIL\Upstream\ILSpy\ICSharpCode.Deco mpiler\ILAst\ILAstTypes.cs:line 52 at ICSharpCode.Decompiler.ILAst.ILNode.AccumulateSelfAndChildrenRecursive[T]( List
1 list, Func2 predicate) in E:\GitHub\JSIL\Upstream\ILSpy\ICSharpCode.Deco mpiler\ILAst\ILAstTypes.cs:line 52 at ICSharpCode.Decompiler.ILAst.ILNode.AccumulateSelfAndChildrenRecursive[T]( List
1 list, Func2 predicate) in E:\GitHub\JSIL\Upstream\ILSpy\ICSharpCode.Deco mpiler\ILAst\ILAstTypes.cs:line 52 at ICSharpCode.Decompiler.ILAst.ILNode.AccumulateSelfAndChildrenRecursive[T]( List
1 list, Func2 predicate) in E:\GitHub\JSIL\Upstream\ILSpy\ICSharpCode.Deco mpiler\ILAst\ILAstTypes.cs:line 52 at ICSharpCode.Decompiler.ILAst.ILNode.AccumulateSelfAndChildrenRecursive[T]( List
1 list, Func2 predicate) in E:\GitHub\JSIL\Upstream\ILSpy\ICSharpCode.Deco mpiler\ILAst\ILAstTypes.cs:line 52 at ICSharpCode.Decompiler.ILAst.ILNode.AccumulateSelfAndChildrenRecursive[T]( List
1 list, Func2 predicate) in E:\GitHub\JSIL\Upstream\ILSpy\ICSharpCode.Deco mpiler\ILAst\ILAstTypes.cs:line 52 at ICSharpCode.Decompiler.ILAst.ILNode.AccumulateSelfAndChildrenRecursive[T]( List
1 list, Func2 predicate) in E:\GitHub\JSIL\Upstream\ILSpy\ICSharpCode.Deco mpiler\ILAst\ILAstTypes.cs:line 52 at ICSharpCode.Decompiler.ILAst.ILNode.GetSelfAndChildrenRecursive[T](Func
2
predicate) in E:\GitHub\JSIL\Upstream\ILSpy\ICSharpCode.Decompiler\ILAst\ILAstTy
pes.cs:line 40
at ICSharpCode.Decompiler.Ast.NameVariables.GenerateNameForVariable(ILVariabl
e variable, ILBlock methodBody) in E:\GitHub\JSIL\Upstream\ILSpy\ICSharpCode.Dec
ompiler\Ast\NameVariables.cs:line 211
at ICSharpCode.Decompiler.Ast.NameVariables.AssignNamesToVariables(Decompiler
Context context, IEnumerable1 parameters, IEnumerable
1 variables, ILBlock meth
odBody) in E:\GitHub\JSIL\Upstream\ILSpy\ICSharpCode.Decompiler\Ast\NameVariable
s.cs:line 85
at JSIL.AssemblyTranslator.TranslateMethodExpression(DecompilerContext contex
t, MethodReference method, MethodDefinition methodDef) in E:\GitHub\JSIL\JSIL\As
semblyTranslator.cs:line 1114
at JSIL.AssemblyTranslator.<>c__DisplayClass21.b__1a(Int32 _, Para
llelLoopState loopState, DecompilerContext ctx) in E:\GitHub\JSIL\JSIL\AssemblyT
ranslator.cs:line 290
at System.Threading.Tasks.Parallel.<>c__DisplayClassf1.<ForWorker>b__c() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) at System.Threading.Tasks.Task.<>c__DisplayClass7.<ExecuteSelfReplicating>b__ 6(Object ) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceled Exceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationTo ken cancellationToken) at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int 32 toExclusive, ParallelOptions parallelOptions, Action
1 body, Action2 bodyWit hState, Func
4 bodyWithLocal, Func1 localInit, Action
1 localFinally)
at System.Threading.Tasks.Parallel.For[TLocal](Int32 fromInclusive, Int32 toE
xclusive, ParallelOptions parallelOptions, Func1 localInit, Func
4 body, Action
`1 localFinally)
at JSIL.AssemblyTranslator.Translate(String assemblyPath, Boolean scanForProxies) in E:\GitHub\JSIL\JSIL\AssemblyTranslator.cs:line 278
at JSIL.Compiler.Program.Main(String[] arguments) in E:\GitHub\JSIL\Compiler\Program.cs:line 253
from jsil.
This error is generated when I'm using SLN solution file: (is there command for generating output file with log)?
at JSIL.Ast.JSAstVisitor.VisitorCache.Adapter2.Visit(JSAstVisitor this, JSNo de node) in E:\GitHub\JSIL\JSIL\AST\JSAstVisitor.cs:line 42 at JSIL.Ast.JSAstVisitor.Visit(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JSAstV isitor.cs:line 162 at JSIL.Ast.JSAstVisitor.VisitChildren(JSNode node) in E:\GitHub\JSIL\JSIL\AS T\JSAstVisitor.cs:line 215 at JSIL.Ast.JSAstVisitor.VisitNode(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JS AstVisitor.cs:line 183 at JSIL.Ast.JSAstVisitor.VisitorCache.Adapter
2.Visit(JSAstVisitor this, JSNo
de node) in E:\GitHub\JSIL\JSIL\AST\JSAstVisitor.cs:line 42
at JSIL.Ast.JSAstVisitor.Visit(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JSAstV
isitor.cs:line 162
at JSIL.Ast.JSAstVisitor.VisitChildren(JSNode node) in E:\GitHub\JSIL\JSIL\AS
T\JSAstVisitor.cs:line 215
at JSIL.Ast.JSAstVisitor.VisitNode(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JS
AstVisitor.cs:line 183
at JSIL.Ast.JSAstVisitor.VisitorCache.Adapter2.Visit(JSAstVisitor this, JSNo de node) in E:\GitHub\JSIL\JSIL\AST\JSAstVisitor.cs:line 42 at JSIL.Ast.JSAstVisitor.Visit(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JSAstV isitor.cs:line 162 at JSIL.Ast.JSAstVisitor.VisitChildren(JSNode node) in E:\GitHub\JSIL\JSIL\AS T\JSAstVisitor.cs:line 215 at JSIL.Ast.JSAstVisitor.VisitNode(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JS AstVisitor.cs:line 183 at JSIL.Ast.JSAstVisitor.VisitorCache.Adapter
2.Visit(JSAstVisitor this, JSNo
de node) in E:\GitHub\JSIL\JSIL\AST\JSAstVisitor.cs:line 42
at JSIL.Ast.JSAstVisitor.Visit(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JSAstV
isitor.cs:line 162
at JSIL.Ast.JSAstVisitor.VisitChildren(JSNode node) in E:\GitHub\JSIL\JSIL\AS
T\JSAstVisitor.cs:line 215
at JSIL.Ast.JSAstVisitor.VisitNode(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JS
AstVisitor.cs:line 183
at JSIL.Ast.JSAstVisitor.VisitorCache.Adapter2.Visit(JSAstVisitor this, JSNo de node) in E:\GitHub\JSIL\JSIL\AST\JSAstVisitor.cs:line 42 at JSIL.Ast.JSAstVisitor.Visit(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JSAstV isitor.cs:line 162 at JSIL.Ast.JSAstVisitor.VisitChildren(JSNode node) in E:\GitHub\JSIL\JSIL\AS T\JSAstVisitor.cs:line 215 at JSIL.Ast.JSAstVisitor.VisitNode(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JS AstVisitor.cs:line 183 at JSIL.Ast.JSAstVisitor.VisitorCache.Adapter
2.Visit(JSAstVisitor this, JSNo
de node) in E:\GitHub\JSIL\JSIL\AST\JSAstVisitor.cs:line 42
at JSIL.Ast.JSAstVisitor.Visit(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JSAstV
isitor.cs:line 162
at JSIL.Ast.JSAstVisitor.VisitChildren(JSNode node) in E:\GitHub\JSIL\JSIL\AS
T\JSAstVisitor.cs:line 205
at JSIL.Ast.JSAstVisitor.VisitNode(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JS
AstVisitor.cs:line 183
at JSIL.Ast.JSAstVisitor.VisitorCache.Adapter2.Visit(JSAstVisitor this, JSNo de node) in E:\GitHub\JSIL\JSIL\AST\JSAstVisitor.cs:line 42 at JSIL.Ast.JSAstVisitor.Visit(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JSAstV isitor.cs:line 162 at JSIL.Ast.JSAstVisitor.VisitChildren(JSNode node) in E:\GitHub\JSIL\JSIL\AS T\JSAstVisitor.cs:line 205 at JSIL.Ast.JSAstVisitor.VisitNode(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JS AstVisitor.cs:line 183 at JSIL.Ast.JSAstVisitor.VisitorCache.Adapter
2.Visit(JSAstVisitor this, JSNo
de node) in E:\GitHub\JSIL\JSIL\AST\JSAstVisitor.cs:line 42
at JSIL.Ast.JSAstVisitor.Visit(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JSAstV
isitor.cs:line 162
at JSIL.Ast.JSAstVisitor.VisitChildren(JSNode node) in E:\GitHub\JSIL\JSIL\AS
T\JSAstVisitor.cs:line 215
at JSIL.Ast.JSAstVisitor.VisitNode(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JS
AstVisitor.cs:line 183
at JSIL.Ast.JSAstVisitor.VisitorCache.Adapter2.Visit(JSAstVisitor this, JSNo de node) in E:\GitHub\JSIL\JSIL\AST\JSAstVisitor.cs:line 42 at JSIL.Ast.JSAstVisitor.Visit(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JSAstV isitor.cs:line 162 at JSIL.Ast.JSAstVisitor.VisitChildren(JSNode node) in E:\GitHub\JSIL\JSIL\AS T\JSAstVisitor.cs:line 215 at JSIL.Ast.JSAstVisitor.VisitNode(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JS AstVisitor.cs:line 183 at JSIL.Ast.JSAstVisitor.VisitorCache.Adapter
2.Visit(JSAstVisitor this, JSNo
de node) in E:\GitHub\JSIL\JSIL\AST\JSAstVisitor.cs:line 42
at JSIL.Ast.JSAstVisitor.Visit(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JSAstV
isitor.cs:line 162
at JSIL.Ast.JSAstVisitor.VisitChildren(JSNode node) in E:\GitHub\JSIL\JSIL\AS
T\JSAstVisitor.cs:line 215
at JSIL.Ast.JSAstVisitor.VisitNode(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JS
AstVisitor.cs:line 183
at JSIL.Ast.JSAstVisitor.VisitorCache.Adapter2.Visit(JSAstVisitor this, JSNo de node) in E:\GitHub\JSIL\JSIL\AST\JSAstVisitor.cs:line 42 at JSIL.Ast.JSAstVisitor.Visit(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JSAstV isitor.cs:line 162 at JSIL.Ast.JSAstVisitor.VisitChildren(JSNode node) in E:\GitHub\JSIL\JSIL\AS T\JSAstVisitor.cs:line 205 at JSIL.Transforms.DeoptimizeSwitchStatements.VisitNode(JSSwitchStatement ss) in E:\GitHub\JSIL\JSIL\Transforms\DeoptimizeSwitchStatements.cs:line 307 at JSIL.Ast.JSAstVisitor.VisitorCache.Adapter
2.Visit(JSAstVisitor this, JSNo
de node) in E:\GitHub\JSIL\JSIL\AST\JSAstVisitor.cs:line 42
at JSIL.Ast.JSAstVisitor.Visit(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JSAstV
isitor.cs:line 162
at JSIL.Ast.JSAstVisitor.VisitChildren(JSNode node) in E:\GitHub\JSIL\JSIL\AS
T\JSAstVisitor.cs:line 215
at JSIL.Ast.JSAstVisitor.VisitNode(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JS
AstVisitor.cs:line 183
at JSIL.Ast.JSAstVisitor.VisitorCache.Adapter2.Visit(JSAstVisitor this, JSNo de node) in E:\GitHub\JSIL\JSIL\AST\JSAstVisitor.cs:line 42 at JSIL.Ast.JSAstVisitor.Visit(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JSAstV isitor.cs:line 162 at JSIL.Ast.JSAstVisitor.VisitChildren(JSNode node) in E:\GitHub\JSIL\JSIL\AS T\JSAstVisitor.cs:line 215 at JSIL.Ast.JSAstVisitor.VisitNode(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JS AstVisitor.cs:line 183 at JSIL.Ast.JSAstVisitor.VisitorCache.Adapter
2.Visit(JSAstVisitor this, JSNo
de node) in E:\GitHub\JSIL\JSIL\AST\JSAstVisitor.cs:line 42
at JSIL.Ast.JSAstVisitor.Visit(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JSAstV
isitor.cs:line 162
at JSIL.Ast.JSAstVisitor.VisitChildren(JSNode node) in E:\GitHub\JSIL\JSIL\AS
T\JSAstVisitor.cs:line 215
at JSIL.Ast.JSAstVisitor.VisitNode(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JS
AstVisitor.cs:line 183
at JSIL.Ast.JSAstVisitor.VisitorCache.Adapter2.Visit(JSAstVisitor this, JSNo de node) in E:\GitHub\JSIL\JSIL\AST\JSAstVisitor.cs:line 42 at JSIL.Ast.JSAstVisitor.Visit(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JSAstV isitor.cs:line 162 at JSIL.Ast.JSAstVisitor.VisitChildren(JSNode node) in E:\GitHub\JSIL\JSIL\AS T\JSAstVisitor.cs:line 215 at JSIL.Ast.JSAstVisitor.VisitNode(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JS AstVisitor.cs:line 183 at JSIL.Ast.JSAstVisitor.VisitorCache.Adapter
2.Visit(JSAstVisitor this, JSNo
de node) in E:\GitHub\JSIL\JSIL\AST\JSAstVisitor.cs:line 42
at JSIL.Ast.JSAstVisitor.Visit(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JSAstV
isitor.cs:line 162
at JSIL.Ast.JSAstVisitor.VisitChildren(JSNode node) in E:\GitHub\JSIL\JSIL\AS
T\JSAstVisitor.cs:line 215
at JSIL.Ast.JSAstVisitor.VisitNode(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JS
AstVisitor.cs:line 183
at JSIL.Ast.JSAstVisitor.VisitorCache.Adapter2.Visit(JSAstVisitor this, JSNo de node) in E:\GitHub\JSIL\JSIL\AST\JSAstVisitor.cs:line 42 at JSIL.Ast.JSAstVisitor.Visit(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JSAstV isitor.cs:line 162 at JSIL.Ast.JSAstVisitor.VisitChildren(JSNode node) in E:\GitHub\JSIL\JSIL\AS T\JSAstVisitor.cs:line 215 at JSIL.Ast.JSAstVisitor.VisitNode(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JS AstVisitor.cs:line 183 at JSIL.Ast.JSAstVisitor.VisitorCache.Adapter
2.Visit(JSAstVisitor this, JSNo
de node) in E:\GitHub\JSIL\JSIL\AST\JSAstVisitor.cs:line 42
at JSIL.Ast.JSAstVisitor.Visit(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JSAstV
isitor.cs:line 162
at JSIL.Ast.JSAstVisitor.VisitChildren(JSNode node) in E:\GitHub\JSIL\JSIL\AS
T\JSAstVisitor.cs:line 215
at JSIL.Ast.JSAstVisitor.VisitNode(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JS
AstVisitor.cs:line 183
at JSIL.Ast.JSAstVisitor.VisitorCache.Adapter2.Visit(JSAstVisitor this, JSNo de node) in E:\GitHub\JSIL\JSIL\AST\JSAstVisitor.cs:line 42 at JSIL.Ast.JSAstVisitor.Visit(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JSAstV isitor.cs:line 162 at JSIL.Ast.JSAstVisitor.VisitChildren(JSNode node) in E:\GitHub\JSIL\JSIL\AS T\JSAstVisitor.cs:line 205 at JSIL.Ast.JSAstVisitor.VisitNode(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JS AstVisitor.cs:line 183 at JSIL.Ast.JSAstVisitor.VisitorCache.Adapter
2.Visit(JSAstVisitor this, JSNo
de node) in E:\GitHub\JSIL\JSIL\AST\JSAstVisitor.cs:line 42
at JSIL.Ast.JSAstVisitor.Visit(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JSAstV
isitor.cs:line 162
at JSIL.Ast.JSAstVisitor.VisitChildren(JSNode node) in E:\GitHub\JSIL\JSIL\AS
T\JSAstVisitor.cs:line 215
at JSIL.Ast.JSAstVisitor.VisitNode(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JS
AstVisitor.cs:line 183
at JSIL.Ast.JSAstVisitor.VisitorCache.Adapter2.Visit(JSAstVisitor this, JSNo de node) in E:\GitHub\JSIL\JSIL\AST\JSAstVisitor.cs:line 42 at JSIL.Ast.JSAstVisitor.Visit(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JSAstV isitor.cs:line 162 at JSIL.Ast.JSAstVisitor.VisitChildren(JSNode node) in E:\GitHub\JSIL\JSIL\AS T\JSAstVisitor.cs:line 215 at JSIL.Ast.JSAstVisitor.VisitNode(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JS AstVisitor.cs:line 183 at JSIL.Ast.JSAstVisitor.VisitorCache.Adapter
2.Visit(JSAstVisitor this, JSNo
de node) in E:\GitHub\JSIL\JSIL\AST\JSAstVisitor.cs:line 42
at JSIL.Ast.JSAstVisitor.Visit(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JSAstV
isitor.cs:line 162
at JSIL.Ast.JSAstVisitor.VisitChildren(JSNode node) in E:\GitHub\JSIL\JSIL\AS
T\JSAstVisitor.cs:line 215
at JSIL.Ast.JSAstVisitor.VisitNode(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JS
AstVisitor.cs:line 183
at JSIL.Ast.JSAstVisitor.VisitorCache.Adapter2.Visit(JSAstVisitor this, JSNo de node) in E:\GitHub\JSIL\JSIL\AST\JSAstVisitor.cs:line 42 at JSIL.Ast.JSAstVisitor.Visit(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JSAstV isitor.cs:line 162 at JSIL.Ast.JSAstVisitor.VisitChildren(JSNode node) in E:\GitHub\JSIL\JSIL\AS T\JSAstVisitor.cs:line 215 at JSIL.Transforms.DeoptimizeSwitchStatements.VisitNode(JSIfStatement ifs) in E:\GitHub\JSIL\JSIL\Transforms\DeoptimizeSwitchStatements.cs:line 138 at JSIL.Ast.JSAstVisitor.VisitorCache.Adapter
2.Visit(JSAstVisitor this, JSNo
de node) in E:\GitHub\JSIL\JSIL\AST\JSAstVisitor.cs:line 42
at JSIL.Ast.JSAstVisitor.Visit(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JSAstV
isitor.cs:line 162
at JSIL.Ast.JSAstVisitor.VisitChildren(JSNode node) in E:\GitHub\JSIL\JSIL\AS
T\JSAstVisitor.cs:line 215
at JSIL.Ast.JSAstVisitor.VisitNode(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JS
AstVisitor.cs:line 183
at JSIL.Ast.JSAstVisitor.VisitorCache.Adapter2.Visit(JSAstVisitor this, JSNo de node) in E:\GitHub\JSIL\JSIL\AST\JSAstVisitor.cs:line 42 at JSIL.Ast.JSAstVisitor.Visit(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JSAstV isitor.cs:line 162 at JSIL.Ast.JSAstVisitor.VisitChildren(JSNode node) in E:\GitHub\JSIL\JSIL\AS T\JSAstVisitor.cs:line 215 at JSIL.Ast.JSAstVisitor.VisitNode(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JS AstVisitor.cs:line 183 at JSIL.Ast.JSAstVisitor.VisitorCache.Adapter
2.Visit(JSAstVisitor this, JSNo
de node) in E:\GitHub\JSIL\JSIL\AST\JSAstVisitor.cs:line 42
at JSIL.Ast.JSAstVisitor.Visit(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JSAstV
isitor.cs:line 162
at JSIL.Ast.JSAstVisitor.VisitChildren(JSNode node) in E:\GitHub\JSIL\JSIL\AS
T\JSAstVisitor.cs:line 215
at JSIL.Ast.JSAstVisitor.VisitNode(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JS
AstVisitor.cs:line 183
at JSIL.Ast.JSAstVisitor.VisitorCache.Adapter2.Visit(JSAstVisitor this, JSNo de node) in E:\GitHub\JSIL\JSIL\AST\JSAstVisitor.cs:line 42 at JSIL.Ast.JSAstVisitor.Visit(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JSAstV isitor.cs:line 162 at JSIL.Ast.JSAstVisitor.VisitChildren(JSNode node) in E:\GitHub\JSIL\JSIL\AS T\JSAstVisitor.cs:line 215 at JSIL.Ast.JSAstVisitor.VisitNode(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JS AstVisitor.cs:line 183 at JSIL.Ast.JSAstVisitor.VisitorCache.Adapter
2.Visit(JSAstVisitor this, JSNo
de node) in E:\GitHub\JSIL\JSIL\AST\JSAstVisitor.cs:line 42
at JSIL.Ast.JSAstVisitor.Visit(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JSAstV
isitor.cs:line 162
at JSIL.Ast.JSAstVisitor.VisitChildren(JSNode node) in E:\GitHub\JSIL\JSIL\AS
T\JSAstVisitor.cs:line 215
at JSIL.Ast.JSAstVisitor.VisitNode(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JS
AstVisitor.cs:line 183
at JSIL.Ast.JSAstVisitor.VisitorCache.Adapter2.Visit(JSAstVisitor this, JSNo de node) in E:\GitHub\JSIL\JSIL\AST\JSAstVisitor.cs:line 42 at JSIL.Ast.JSAstVisitor.Visit(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JSAstV isitor.cs:line 162 at JSIL.Ast.JSAstVisitor.VisitChildren(JSNode node) in E:\GitHub\JSIL\JSIL\AS T\JSAstVisitor.cs:line 215 at JSIL.Ast.JSAstVisitor.VisitNode(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JS AstVisitor.cs:line 183 at JSIL.Ast.JSAstVisitor.VisitorCache.Adapter
2.Visit(JSAstVisitor this, JSNo
de node) in E:\GitHub\JSIL\JSIL\AST\JSAstVisitor.cs:line 42
at JSIL.Ast.JSAstVisitor.Visit(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JSAstV
isitor.cs:line 162
at JSIL.Ast.JSAstVisitor.VisitChildren(JSNode node) in E:\GitHub\JSIL\JSIL\AS
T\JSAstVisitor.cs:line 215
at JSIL.Ast.JSAstVisitor.VisitNode(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JS
AstVisitor.cs:line 183
at JSIL.Ast.JSAstVisitor.VisitorCache.Adapter2.Visit(JSAstVisitor this, JSNo de node) in E:\GitHub\JSIL\JSIL\AST\JSAstVisitor.cs:line 42 at JSIL.Ast.JSAstVisitor.Visit(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JSAstV isitor.cs:line 162 at JSIL.Ast.JSAstVisitor.VisitChildren(JSNode node) in E:\GitHub\JSIL\JSIL\AS T\JSAstVisitor.cs:line 205 at JSIL.Ast.JSAstVisitor.VisitNode(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JS AstVisitor.cs:line 183 at JSIL.Ast.JSAstVisitor.VisitorCache.Adapter
2.Visit(JSAstVisitor this, JSNo
de node) in E:\GitHub\JSIL\JSIL\AST\JSAstVisitor.cs:line 42
at JSIL.Ast.JSAstVisitor.Visit(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JSAstV
isitor.cs:line 162
at JSIL.Ast.JSAstVisitor.VisitChildren(JSNode node) in E:\GitHub\JSIL\JSIL\AS
T\JSAstVisitor.cs:line 205
at JSIL.Ast.JSAstVisitor.VisitNode(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JS
AstVisitor.cs:line 183
at JSIL.Ast.JSAstVisitor.VisitorCache.Adapter2.Visit(JSAstVisitor this, JSNo de node) in E:\GitHub\JSIL\JSIL\AST\JSAstVisitor.cs:line 42 at JSIL.Ast.JSAstVisitor.Visit(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JSAstV isitor.cs:line 162 at JSIL.Ast.JSAstVisitor.VisitChildren(JSNode node) in E:\GitHub\JSIL\JSIL\AS T\JSAstVisitor.cs:line 215 at JSIL.Ast.JSAstVisitor.VisitNode(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JS AstVisitor.cs:line 183 at JSIL.Ast.JSAstVisitor.VisitorCache.Adapter
2.Visit(JSAstVisitor this, JSNo
de node) in E:\GitHub\JSIL\JSIL\AST\JSAstVisitor.cs:line 42
at JSIL.Ast.JSAstVisitor.Visit(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JSAstV
isitor.cs:line 162
at JSIL.Ast.JSAstVisitor.VisitChildren(JSNode node) in E:\GitHub\JSIL\JSIL\AS
T\JSAstVisitor.cs:line 215
at JSIL.Ast.JSAstVisitor.VisitNode(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JS
AstVisitor.cs:line 183
at JSIL.Ast.JSAstVisitor.VisitorCache.Adapter2.Visit(JSAstVisitor this, JSNo de node) in E:\GitHub\JSIL\JSIL\AST\JSAstVisitor.cs:line 42 at JSIL.Ast.JSAstVisitor.Visit(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JSAstV isitor.cs:line 162 at JSIL.Ast.JSAstVisitor.VisitChildren(JSNode node) in E:\GitHub\JSIL\JSIL\AS T\JSAstVisitor.cs:line 215 at JSIL.Ast.JSAstVisitor.VisitNode(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JS AstVisitor.cs:line 183 at JSIL.Ast.JSAstVisitor.VisitorCache.Adapter
2.Visit(JSAstVisitor this, JSNo
de node) in E:\GitHub\JSIL\JSIL\AST\JSAstVisitor.cs:line 42
at JSIL.Ast.JSAstVisitor.Visit(JSNode node) in E:\GitHub\JSIL\JSIL\AST\JSAstV
isitor.cs:line 162
at JSIL.AssemblyTranslator.OptimizeFunction(SpecialIdentifiers si, HashSet1 parameterNames, Dictionary
2 variables, JSFunctionExpression function) in E:\Git
Hub\JSIL\JSIL\AssemblyTranslator.cs:line 1206
at JSIL.AssemblyTranslator.OptimizeAll() in E:\GitHub\JSIL\JSIL\AssemblyTrans
lator.cs:line 370
at JSIL.AssemblyTranslator.Translate(String assemblyPath, Boolean scanForProx
ies) in E:\GitHub\JSIL\JSIL\AssemblyTranslator.cs:line 303
at JSIL.Compiler.Program.Main(String[] arguments) in E:\GitHub\JSIL\Compiler
Program.cs:line 253
from jsil.
I get the same error. Did you find a solution for solving this issue?
from jsil.
How big are the .exe and .dll files in your solution's bin\ folder, all added up? It sounds like your app has too much code to fit into memory. I might be able to address this by changing the way I use ILSpy, but it relies on fitting everything into memory to a certain degree.
from jsil.
Whole Windows Phone directory:
1 323 072 FarseerPhysicsXNA.dll
1 931 328 FarseerPhysicsXNA.pdb
8 10 647 GameThumbnail.png
1 28 160 RenderXNA.dll
1 44 544 RenderXNA.pdb
9 29 620 925 XGame.ccgame
4 360 448 XGame.dll
4 888 320 XGame.pdb
4 29 690 853 XGame.xap
PC directory:
322 560 FarseerPhysicsXNA.dll
927 232 FarseerPhysicsXNA.pdb
283 162 FarseerPhysicsXNA.xml
29 184 RenderXNA.dll
44 544 RenderXNA.pdb
368 128 XGame.exe
908 800 XGame.pdb
from jsil.
There was missing 1 column in Windows Phone:
323 072 FarseerPhysicsXNA.dll
931 328 FarseerPhysicsXNA.pdb
10 647 GameThumbnail.png
28 160 RenderXNA.dll
44 544 RenderXNA.pdb
29 620 925 XGame.ccgame
360 448 XGame.dll
888 320 XGame.pdb
29 690 853 XGame.xap
1 463 WMAppManifest.xml
So whole game with content is almost 30MB but PC version (just exe) has 0,4MB,
from jsil.
If you pass --nothreads on the command line, does it still fail? Can you run it in the debugger and look at the memory usage when the exception is thrown?
from jsil.
no this same problem (in debugger it stops in AssemblyTranslator.cs on line 278):
methodsToAnalyze = Count = 45681
it stops on i=18586
Instruction NYI: Ldvirtftn Mono.Cecil.MethodDefinition
Instruction NYI: Sizeof Mono.Cecil.TypeDefinition
Instruction NYI: Wrap
Instruction NYI: Wrap
Instruction NYI: Wrap
Instruction NYI: Wrap
Instruction NYI: Wrap
Error occurred while translating node valueof:int32(callvirtgetter:valuetype [ms
corlib]System.Nullable1<int32>(Clock::get_CurrentIteration, ldloc:AnimationCloc k[exp:Clock](animationClock))) Error occurred while translating node sub:int32(valueof:int32(callvirtgetter:val uetype [mscorlib]System.Nullable
1(Clock::get_CurrentIteration, ldloc:Ani
mationClockexp:Clock)), ldc.i4:int32(1))
Error occurred while translating node nullableof:valuetype [mscorlib]System.Null
able1<int32>(sub:int32(valueof:int32(callvirtgetter:valuetype [mscorlib]System. Nullable
1(Clock::get_CurrentIteration, ldloc:AnimationClock[exp:Clock](a
nimationClock))), ldc.i4:int32(1)))
Error occurred while translating node addressof:valuetype [mscorlib]System.Nulla
ble1<int32>&(nullableof:valuetype [mscorlib]System.Nullable
1(sub:int32(
valueof:int32(callvirtgetter:valuetype [mscorlib]System.Nullable1<int32>(Clock: :get_CurrentIteration, ldloc:AnimationClock[exp:Clock](animationClock))), ldc.i4 :int32(1)))) Error occurred while translating node callgetter:int32[exp:float64](valuetype [m scorlib]System.Nullable
1::get_Value, addressof:valuetype [mscorlib]Syste
m.Nullable1<int32>&(nullableof:valuetype [mscorlib]System.Nullable
1(sub
:int32(valueof:int32(callvirtgetter:valuetype [mscorlib]System.Nullable1<int32> (Clock::get_CurrentIteration, ldloc:AnimationClock[exp:Clock](animationClock))), ldc.i4:int32(1))))) Error occurred while translating node conv.r8:float64(callgetter:int32[exp:float 64](valuetype [mscorlib]System.Nullable
1::get_Value, addressof:valuetype
[mscorlib]System.Nullable1<int32>&(nullableof:valuetype [mscorlib]System.Nulla ble
1(sub:int32(valueof:int32(callvirtgetter:valuetype [mscorlib]System.N
ullable1<int32>(Clock::get_CurrentIteration, ldloc:AnimationClock[exp:Clock](an imationClock))), ldc.i4:int32(1)))))) Error occurred while translating node stloc:float64(num, conv.r8:float64(callget ter:int32[exp:float64](valuetype [mscorlib]System.Nullable
1::get_Value,
addressof:valuetype [mscorlib]System.Nullable1<int32>&(nullableof:valuetype [ms corlib]System.Nullable
1(sub:int32(valueof:int32(callvirtgetter:valuetype
[mscorlib]System.Nullable`1(Clock::get_CurrentIteration, ldloc:Animation
Clockexp:Clock)), ldc.i4:int32(1)))))))
Unhandled Exception: System.AggregateException: One or more errors occurred. ---
System.Reflection.TargetInvocationException: Exception has been thrown by the
target of an invocation. ---> System.Reflection.TargetInvocationException: Excep
tion has been thrown by the target of an invocation. ---> System.Reflection.Targ
etInvocationException: Exception has been thrown by the target of an invocation.
---> System.Reflection.TargetInvocationException: Exception has been thrown by
the target of an invocation. ---> System.Reflection.TargetInvocationException: E
xception has been thrown by the target of an invocation. ---> System.Reflection.
TargetInvocationException: Exception has been thrown by the target of an invocat
ion. ---> System.Reflection.TargetInvocationException: Exception has been thrown
by the target of an invocation. ---> System.InvalidCastException: Unable to cas
t object of type 'Mono.Cecil.ByReferenceType' to type 'Mono.Cecil.GenericInstanc
eType'.
at JSIL.ILBlockTranslator.Translate_ValueOf(ILExpression node) in E:\GitHub\J
SIL\JSIL\ILBlockTranslator.cs:line 1002
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Ob
ject target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAt
tributes, RuntimeType typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Obj
ect target, Object[] arguments, Signature sig, MethodAttributes methodAttributes
, RuntimeType typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke
Attr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisib
ilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke
Attr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Bi
nder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers
, CultureInfo culture, String[] namedParams)
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder bind
er, Object target, Object[] args)
at JSIL.ILBlockTranslator.TranslateNode(ILExpression expression) in E:\GitHub
\JSIL\JSIL\ILBlockTranslator.cs:line 787
at JSIL.ILBlockTranslator.Translate_BinaryOp(ILExpression node, JSBinaryOpera
tor op) in E:\GitHub\JSIL\JSIL\ILBlockTranslator.cs:line 229
at JSIL.ILBlockTranslator.Translate_Sub(ILExpression node) in E:\GitHub\JSIL
JSIL\ILBlockTranslator.cs:line 1182
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Ob
ject target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAt
tributes, RuntimeType typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Obj
ect target, Object[] arguments, Signature sig, MethodAttributes methodAttributes
, RuntimeType typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke
Attr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisib
ilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke
Attr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Bi
nder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers
, CultureInfo culture, String[] namedParams)
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder bind
er, Object target, Object[] args)
at JSIL.ILBlockTranslator.TranslateNode(ILExpression expression) in E:\GitHub
\JSIL\JSIL\ILBlockTranslator.cs:line 787
at JSIL.ILBlockTranslator.Translate_NullableOf(ILExpression node) in E:\GitHu
b\JSIL\JSIL\ILBlockTranslator.cs:line 990
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Ob
ject target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAt
tributes, RuntimeType typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Obj
ect target, Object[] arguments, Signature sig, MethodAttributes methodAttributes
, RuntimeType typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke
Attr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisib
ilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke
Attr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Bi
nder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers
, CultureInfo culture, String[] namedParams)
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder bind
er, Object target, Object[] args)
at JSIL.ILBlockTranslator.TranslateNode(ILExpression expression) in E:\GitHub
\JSIL\JSIL\ILBlockTranslator.cs:line 787
at JSIL.ILBlockTranslator.Translate_AddressOf(ILExpression node) in E:\GitHub
\JSIL\JSIL\ILBlockTranslator.cs:line 1495
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Ob
ject target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAt
tributes, RuntimeType typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Obj
ect target, Object[] arguments, Signature sig, MethodAttributes methodAttributes
, RuntimeType typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke
Attr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisib
ilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke
Attr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Bi
nder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers
, CultureInfo culture, String[] namedParams)
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder bind
er, Object target, Object[] args)
at JSIL.ILBlockTranslator.TranslateNode(ILExpression expression) in E:\GitHub
\JSIL\JSIL\ILBlockTranslator.cs:line 787
at JSIL.ILBlockTranslator.Translate(IList1 values, IList
1 parameters, Boole
an hasThis) in E:\GitHub\JSIL\JSIL\ILBlockTranslator.cs:line 127
at JSIL.ILBlockTranslator.Translate_Call(ILExpression node, MethodReference m
ethod) in E:\GitHub\JSIL\JSIL\ILBlockTranslator.cs:line 2130
at JSIL.ILBlockTranslator.Translate_CallGetter(ILExpression node, MethodRefer
ence getter) in E:\GitHub\JSIL\JSIL\ILBlockTranslator.cs:line 2281
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Ob
ject target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAt
tributes, RuntimeType typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Obj
ect target, Object[] arguments, Signature sig, MethodAttributes methodAttributes
, RuntimeType typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke
Attr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisib
ilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke
Attr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Bi
nder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers
, CultureInfo culture, String[] namedParams)
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder bind
er, Object target, Object[] args)
at JSIL.ILBlockTranslator.TranslateNode(ILExpression expression) in E:\GitHub
\JSIL\JSIL\ILBlockTranslator.cs:line 787
at JSIL.ILBlockTranslator.Translate_Conv(ILExpression node, TypeReference tar
getType) in E:\GitHub\JSIL\JSIL\ILBlockTranslator.cs:line 1798
at JSIL.ILBlockTranslator.Translate_Conv_R8(ILExpression node) in E:\GitHub\J
SIL\JSIL\ILBlockTranslator.cs:line 1861
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Ob
ject target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAt
tributes, RuntimeType typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Obj
ect target, Object[] arguments, Signature sig, MethodAttributes methodAttributes
, RuntimeType typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke
Attr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisib
ilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke
Attr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Bi
nder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers
, CultureInfo culture, String[] namedParams)
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder bind
er, Object target, Object[] args)
at JSIL.ILBlockTranslator.TranslateNode(ILExpression expression) in E:\GitHub
\JSIL\JSIL\ILBlockTranslator.cs:line 787
at JSIL.ILBlockTranslator.Translate_Stloc(ILExpression node, ILVariable varia
ble) in E:\GitHub\JSIL\JSIL\ILBlockTranslator.cs:line 1300
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Ob
ject target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAt
tributes, RuntimeType typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Obj
ect target, Object[] arguments, Signature sig, MethodAttributes methodAttributes
, RuntimeType typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke
Attr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisib
ilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke
Attr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Bi
nder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers
, CultureInfo culture, String[] namedParams)
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder bind
er, Object target, Object[] args)
at JSIL.ILBlockTranslator.TranslateNode(ILExpression expression) in E:\GitHub
\JSIL\JSIL\ILBlockTranslator.cs:line 787
at JSIL.ILBlockTranslator.TranslateStatement(ILNode node) in E:\GitHub\JSIL\J
SIL\ILBlockTranslator.cs:line 717
at JSIL.ILBlockTranslator.TranslateBlock(IEnumerable1 children) in E:\GitHub \JSIL\JSIL\ILBlockTranslator.cs:line 707 at JSIL.ILBlockTranslator.TranslateNode(ILBlock block) in E:\GitHub\JSIL\JSIL \ILBlockTranslator.cs:line 733 at JSIL.ILBlockTranslator.Translate() in E:\GitHub\JSIL\JSIL\ILBlockTranslato r.cs:line 98 at JSIL.AssemblyTranslator.TranslateMethodExpression(DecompilerContext contex t, MethodReference method, MethodDefinition methodDef) in E:\GitHub\JSIL\JSIL\As semblyTranslator.cs:line 1120 at JSIL.AssemblyTranslator.<>c__DisplayClass21.<Translate>b__1a(Int32 _, Para llelLoopState loopState, DecompilerContext ctx) in E:\GitHub\JSIL\JSIL\AssemblyT ranslator.cs:line 290 at System.Threading.Tasks.Parallel.<>c__DisplayClassf
1.b__c()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass7.b
6(Object )
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceled
Exceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationTo
ken cancellationToken)
at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int
32 toExclusive, ParallelOptions parallelOptions, Action1 body, Action
2 bodyWit
hState, Func4 bodyWithLocal, Func
1 localInit, Action1 localFinally) at System.Threading.Tasks.Parallel.For[TLocal](Int32 fromInclusive, Int32 toE xclusive, ParallelOptions parallelOptions, Func
1 localInit, Func4 body, Action
1 localFinally)
at JSIL.AssemblyTranslator.Translate(String assemblyPath, Boolean scanForProx
ies) in E:\GitHub\JSIL\JSIL\AssemblyTranslator.cs:line 278
at JSIL.Compiler.Program.Main(String[] arguments) in E:\GitHub\JSIL\Compiler
Program.cs:line 253
from jsil.
How can there be 46k methods to analyze if it is only 0.4mb?! Do you have some huge dependencies that are living in the Global Assembly Cache?
from jsil.
Now (after removing 3 not necessery (now) libraries) I have these references:
Farseer Physics XNA
System.Xml Microsoft.Xna.Framework
Microsoft.Xna.Framework.Game
Microsoft.Xna.Framework.GamerServices
Microsoft.Xna.Framework.Graphics
Microsoft.Xna.Framework.Input.Touch
mscorlib
PC_RenderXNA
PresentationFramework
System System.Core
System.Runtime.Serialization
But after decompiling:
// Applied settings from 'defaults.jsilconfig'.
// Loaded C:\prywatne\FunApp\XGame\Wp7\Platformer\Platformer\bin\x86\Debug\xGame.exe
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.Xna.Framework.Input.Touch\v4.0_4.0.0.0__842cf8be1de50553\Microsoft.Xna.Framework.Input.Touch.dll
// Loaded C:\prywatne\FunApp\OrangeGame\Wp7\Platformer\Platformer\bin\x86\Debug\FarseerPhysicsXNA.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_32\Microsoft.Xna.Framework.Game\v4.0_4.0.0.0__842cf8be1de50553\Microsoft.Xna.Framework.Game.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.Xna.Framework.GamerServices\v4.0_4.0.0.0__842cf8be1de50553\Microsoft.Xna.Framework.GamerServices.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_32\Microsoft.Xna.Framework.Graphics\v4.0_4.0.0.0__842cf8be1de50553\Microsoft.Xna.Framework.Graphics.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_32\Microsoft.Xna.Framework\v4.0_4.0.0.0__842cf8be1de50553\Microsoft.Xna.Framework.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll
// Loaded C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\PresentationFramework\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\UIAutomationProvider\v4.0_4.0.0.0__31bf3856ad364e35\UIAutomationProvider.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Runtime.DurableInstancing\v4.0_4.0.0.0__31bf3856ad364e35\System.Runtime.DurableInstancing.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\PresentationUI\v4.0_4.0.0.0__31bf3856ad364e35\PresentationUI.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.VisualC\v4.0_10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualC.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Numerics\v4.0_4.0.0.0__b77a5c561934e089\System.Numerics.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\SMDiagnostics\v4.0_4.0.0.0__b77a5c561934e089\SMDiagnostics.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Deployment\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Deployment.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Security\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Security.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Xaml\v4.0_4.0.0.0__b77a5c561934e089\System.Xaml.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\ReachFramework\v4.0_4.0.0.0__31bf3856ad364e35\ReachFramework.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\UIAutomationTypes\v4.0_4.0.0.0__31bf3856ad364e35\UIAutomationTypes.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Data.SqlXml\v4.0_4.0.0.0__b77a5c561934e089\System.Data.SqlXml.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_32\System.Printing\v4.0_4.0.0.0__31bf3856ad364e35\System.Printing.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\WindowsBase\v4.0_4.0.0.0__31bf3856ad364e35\WindowsBase.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Accessibility\v4.0_4.0.0.0__b03f5f7f11d50a3a\Accessibility.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_32\PresentationCore\v4.0_4.0.0.0__31bf3856ad364e35\PresentationCore.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Runtime.Serialization.Formatters.Soap\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.Serialization.Formatters.Soap.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Windows.Input.Manipulations\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Input.Manipulations.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.DirectoryServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.DirectoryServices.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_32\System.Transactions\v4.0_4.0.0.0__b77a5c561934e089\System.Transactions.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Runtime.Remoting\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Remoting.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_32\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Web.ApplicationServices\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.ApplicationServices.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Web.RegularExpressions\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.RegularExpressions.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.Build.Framework\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.Build.Framework.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.DirectoryServices.Protocols\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.DirectoryServices.Protocols.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.Build.Utilities.v4.0\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.Build.Utilities.v4.0.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.ServiceProcess\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.ServiceProcess.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Runtime.Caching\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.Caching.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Web.Services\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.Build.Tasks.v4.0\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.Build.Tasks.v4.0.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Design\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Design.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Configuration.Install\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.Install.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Drawing.Design\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.Design.dll
// Loaded C:\Windows\Microsoft.NET\assembly\GAC_32\System.Data.OracleClient\v4.0_4.0.0.0__b77a5c561934e089\System.Data.OracleClient.dll
// Decompiling ....................Instruction NYI: Sizeof Mono.Cecil.TypeDefinition
from jsil.
That's an order of magnitude more assemblies than I would expect to see. Make sure anything you don't want translated is being stubbed. For example, PresentationFramework and Microsoft.Build.* and WindowsBase and UIAutomationTypes and ReachFramework and Accessibility will all be translated by default unless you add them to the stub list.
It's also just possible you don't have enough memory to load all those assemblies. For some reason, Mono.Cecil insists on caching the raw bytes for every assembly you ever load in memory alongside the metadata, so that eats up a ton of memory.
from jsil.
hmm after removing libraries I have: methodsToAnalyze.Count = 61889 ??
from jsil.
This should be no memory problem (I have 8GB RAM and i7/1TB HD). I have to read how to add to stub list (do you have sample hot to do this?)
from jsil.
Since JSILc is a 32-bit executable, .NET won't allow it to use more than roughly 2GB of memory. Running it as a 64-bit executable would let it use more of your machine's memory but right now that isn't supported.
There are two ways to stub an assembly. The first is via the command line:
--stub:
For example, to ignore all the 'Microsoft.Build' assemblies, you would do:
--stub: Microsoft.Build.*
You can do this permanently by adding regexes to the Stubbed list in a .jsilconfig file. The included defaults.jsilconfig file (that JSILc loads by default) includes four regexes, so you can add new ones there. It's JSON, so you can look up the syntax anywhere.
Note that stubbing won't completely eliminate memory usage from an assembly. It still has to be loaded and scanned for type information, in case your code uses it.
from jsil.
If you have a chance, please try translating this app again with the latest version of JSIL. Memory usage has dramatically improved so that might address some of your problems (especially if you manage to stub out or ignore libraries you don't care about).
from jsil.
Of course. I'll check it tomorrow or the day after.
from jsil.
Related Issues (20)
- DCE works incorrectly for derived interface implementation
- Content Not Being Generated XNA HOT 1
- Assembly.GetType is not working for generics.
- Unsigned comparisons work incorrect
- Type.FullName is not returning correct name for generic dictionary
- Async state machine incorrect translation HOT 6
- Calling External Library From C# HOT 2
- string.IndexOf(String value, StringComparison comparisonType) not available HOT 2
- Support netstandard assemblies
- ulong math is incorrect HOT 2
- Installing JSIL on Linux HOT 2
- Support pascalabc
- InvalidCastException when using Newtonsoft.Json.dll (10.0.1 .NET 4.0) HOT 1
- Delegate.Method fails when called in constructor. HOT 3
- C# 7.2 "in" keyword in interfaces
- DateTime Object does not implement public functions
- load file
- Attribute properties are missing HOT 1
- How to Convert a CSharp Project to JavaScript on a Mac? HOT 2
- where do I find the namespace and game?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsil.