question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unknown error when running IL2CPU

See original GitHub issue

Process so far: I downloaded the last release under “releases”. It had a problem with opcode “mul_ovf”; somehow, text encoding was being called, even after I replaced that code with (char) and (byte) conversion. So I downloaded the latest source, ran “userkit install.bat”. It needed Inno Setup, so I installed that to the default location. After closing the previous “userkit install.bat” and running it again, it was happy as a clam. Then I booted visual studio and found nothing had changed. Found the Setup folder, ran “Output\CosmosUserKit-20160703-vs2015.exe”. It installed. Now my project is complaining about version mismatch; seems I’m targeting 4.5 and it now wants 4.5.2. Changing to 4.5.2 in the build properties doesn’t work, so I edit the project files themselves. It’s happy about that now, but not this new bug. I see something in the wiki about needing .Net 3.5; yep, it’s installed in “Turn windows features on and off”. So I use Programs and Features to uninstall .Net 3.5, reboot, then re-install. Windows doesn’t ask for a reboot at this point, so I don’t.

The exact same error occurs. And that’s as far as I’ve gotten, so far.

Output: [code] 1>------ Build started: Project: MyOSSharpBoot, Configuration: Debug x86 ------ 1> Invoking il2cpu.exe “DebugEnabled:True” “StackCorruptionDetectionEnabled:False” “StackCorruptionDetectionLevel:” “DebugMode:Source” “TraceAssemblies:” “DebugCom:1” “UseNAsm:True” “OutputFilename:C:\Users$Username\Documents\Visual Studio 2015\Projects\MyOSSharp\MyOSSharp\bin\Debug\MyOSSharpBoot.asm” “EnableLogging:True” “EmitDebugSymbols:True” “IgnoreDebugStubAttribute:False” “References:C:\Stuff\P\Programming\Tools\Cosmos User Kit\Kernel\Cosmos.Core.Plugs.dll” “References:C:\Stuff\P\Programming\Tools\Cosmos User Kit\Kernel\Cosmos.Debug.Kernel.Plugs.dll” “References:C:\Stuff\P\Programming\Tools\Cosmos User Kit\Kernel\Cosmos.System.Plugs.dll” “References:C:\Users$Username\Documents\Visual Studio 2015\Projects\MyOSSharp\MyOSSharp\bin\Debug\MyOSSharp.dll” “References:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\System.Core.dll” 1>C:\Program Files (x86)\MSBuild\Cosmos\Cosmos.targets(34,5): error : Error occurred while invoking IL2CPU. 1> Executing command line “C:\Stuff\P\Programming\Tools\Cosmos User Kit\Build\IL2CPU\IL2CPU.exe” “DebugEnabled:True” “StackCorruptionDetectionEnabled:False” “StackCorruptionDetectionLevel:” “DebugMode:Source” “TraceAssemblies:” “DebugCom:1” “UseNAsm:True” “OutputFilename:C:\Users$Username\Documents\Visual Studio 2015\Projects\MyOSSharp\MyOSSharp\bin\Debug\MyOSSharpBoot.asm” “EnableLogging:True” “EmitDebugSymbols:True” “IgnoreDebugStubAttribute:False” “References:C:\Stuff\P\Programming\Tools\Cosmos User Kit\Kernel\Cosmos.Core.Plugs.dll” “References:C:\Stuff\P\Programming\Tools\Cosmos User Kit\Kernel\Cosmos.Debug.Kernel.Plugs.dll” “References:C:\Stuff\P\Programming\Tools\Cosmos User Kit\Kernel\Cosmos.System.Plugs.dll” “References:C:\Users$Username\Documents\Visual Studio 2015\Projects\MyOSSharp\MyOSSharp\bin\Debug\MyOSSharp.dll” “References:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\System.Core.dll” 1> Working directory = ‘C:\Users$Username\Documents\Visual Studio 2015\Projects\MyOSSharp\MyOSSharp\bin\Debug' 1> Loaded : DebugEnabled 1> Loaded : StackCorruptionDetectionEnabled 1> Loaded : DebugMode 1> Loaded : StackCorruptionDetectionLevel 1> Loaded : TraceAssemblies 1> Loaded : DebugCom 1> Loaded : UseNAsm 1> Loaded : OutputFilename 1> Loaded : EnableLogging 1> Loaded : EmitDebugSymbols 1> Loaded : IgnoreDebugStubAttribute 1> Loaded : References 1> Executing IL2CPU on assembly 1> Error: Exception: System.Exception: Native code encountered, plug required. Please see https://github.com/CosmosOS/Cosmos/wiki/Plugs). System.Int32 System.Threading.Thread.get_ManagedThreadId(). 1> Called from : 1> System.Linq.Enumerable+Iterator1[System.Byte]::Void .ctor() 1> System.Linq.Enumerable+WhereSelectArrayIterator2[System.Char,System.Byte]::Void .ctor(Char[], System.Func2[System.Char,System.Boolean], System.Func2[System.Char,System.Byte]) 1> System.Linq.Enumerable::System.Collections.Generic.IEnumerable1[System.Byte] Select[Char,Byte](System.Collections.Generic.IEnumerable1[System.Char], System.Func`2[System.Char,System.Byte]) 1> MyOSSharp.Kernel::Void Run() 1> Cosmos.System.Kernel::Void Run() 1> at Cosmos.IL2CPU.ILScanner.ScanMethod(MethodBase aMethod, Boolean aIsPlug, String sourceItem) in C:\Users$Username\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILScanner.cs:line 527 1> at Cosmos.IL2CPU.ILScanner.ScanQueue() in C:\Users$Username\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILScanner.cs:line 668 1> at Cosmos.IL2CPU.ILScanner.Execute(MethodBase aStartMethod) in C:\Users$Username\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILScanner.cs:line 245 1> at Cosmos.IL2CPU.CompilerEngine.Execute() in C:\Users$Username\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\CompilerEngine.cs:line 252 1> Loaded assemblies: 1> C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll 1> C:\Stuff\P\Programming\Tools\Cosmos User Kit\Build\IL2CPU\IL2CPU.exe 1> C:\Stuff\P\Programming\Tools\Cosmos User Kit\Build\IL2CPU\Cosmos.IL2CPU.dll 1> C:\Stuff\P\Programming\Tools\Cosmos User Kit\Build\IL2CPU\Cosmos.Build.Common.dll 1> C:\Stuff\P\Programming\Tools\Cosmos User Kit\Build\IL2CPU\Cosmos.Debug.Common.dll 1> C:\Stuff\P\Programming\Tools\Cosmos User Kit\Build\IL2CPU\Cosmos.Assembler.dll 1> C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll 1> C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll 1> C:\Stuff\P\Programming\Tools\Cosmos User Kit\Build\IL2CPU\Cosmos.System.dll 1> C:\Stuff\P\Programming\Tools\Cosmos User Kit\Kernel\Cosmos.Core.Plugs.dll 1> C:\Stuff\P\Programming\Tools\Cosmos User Kit\Build\IL2CPU\Cosmos.IL2CPU.Plugs.dll 1> C:\Stuff\P\Programming\Tools\Cosmos User Kit\Build\IL2CPU\Cosmos.Common.dll 1> C:\Stuff\P\Programming\Tools\Cosmos User Kit\Kernel\Cosmos.Debug.Kernel.Plugs.dll 1> C:\Stuff\P\Programming\Tools\Cosmos User Kit\Kernel\Cosmos.System.Plugs.dll 1> C:\Users$Username\Documents\Visual Studio 2015\Projects\MyOSSharp\MyOSSharp\bin\Debug\MyOSSharp.dll 1> C:\Stuff\P\Programming\Tools\Cosmos User Kit\Build\IL2CPU\Mono.Cecil.dll 1> C:\Stuff\P\Programming\Tools\Cosmos User Kit\Build\IL2CPU\System.Data.SQLite.dll 1> C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll 1> C:\Windows\Microsoft.Net\assembly\GAC_32\System.Transactions\v4.0_4.0.0.0__b77a5c561934e089\System.Transactions.dll 1> C:\Stuff\P\Programming\Tools\Cosmos User Kit\Build\IL2CPU\DapperExtensions.dll 1> C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll 1> C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll 1> C:\Stuff\P\Programming\Tools\Cosmos User Kit\Build\IL2CPU\SQLinq.dll 1> C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll 1> C:\Windows\Microsoft.Net\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll 1> C:\Stuff\P\Programming\Tools\Cosmos User Kit\Build\IL2CPU\XSC.exe 1> C:\Stuff\P\Programming\Tools\Cosmos User Kit\Build\IL2CPU\Cosmos.Debug.DebugStub.dll 1> C:\Stuff\P\Programming\Tools\Cosmos User Kit\Build\IL2CPU\Cosmos.HAL.dll 1> C:\Stuff\P\Programming\Tools\Cosmos User Kit\Build\IL2CPU\Cosmos.Core.dll 1> C:\Stuff\P\Programming\Tools\Cosmos User Kit\Build\IL2CPU\Cosmos.Debug.Kernel.dll 1> C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll 1> C:\Stuff\P\Programming\Tools\Cosmos User Kit\Build\IL2CPU\Cosmos.Core.Memory.dll 1> Errorred 1> IL2CPU invoked with DebugMode=‘Source’, DebugEnabled=‘True’,StackCorruptionDetectionLevel=’{NULL}‘, TraceAssemblies=’{NULL}', IgnoreDebugStub=‘False’ 1> IL2CPU task took 00:00:00.3068050 1>Done building project “MyOSSharpBoot.Cosmos” – FAILED. 1> Build has been canceled. [/code]

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
charlesbetroscommented, Jul 4, 2016

I think those pages meant “do let us know things are missing” but “don’t just complain if we don’t have the time to fix / implement it immediately”. You aren’t complaining though so creating issues like this are fine. 😃

Regarding the error message you are seeing… Basically most threading stuff isn’t implemented so things that require it won’t work. Some basic linq works though.

On Jul 3, 2016, at 18:55, MouseProducedGames notifications@github.com wrote:

So basically, Linq is complaining about said missing plug whenever I use “yield return”. Do I keep this up? I found one page that said not to complain about missing plugs here, and another that said to do so.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

0reactions
jp2masacommented, Dec 12, 2016

Is this still valid?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error occured while invoking IL2CPU... Impossible to find ...
I run Visual Studio 2017; I remaked the whole project (VS2015) to put it on VS2017... (i made new project with the same...
Read more >
Cosmos C# IL2CPU Error While invoking?
I've been coding a OS with cosmos in c#. It's 350 lines long. I've just got an error saying "Error Occurred while invoking...
Read more >
Unknown error - WebDriver - MDN Web Docs
The unknown element error is a WebDriver error that occurs when an unspecified error occurs in the driver whilst processing a command.
Read more >
An unknown error occurred. usernam…
Hey people, I'm using (or rather trying to use) Swift Packages for my project. This is not about the countless other bumps I...
Read more >
Help with IL2CPU Error
1>IL2CPU : error : Exception: System.Exception: Error compiling method 'SystemVoidCosmosKernel2KernelPrompt': System.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found