CosmosOS / Cosmos

Cosmos is an operating system "construction kit". Build your own OS using managed languages such as C#, VB.NET, and more!
https://www.goCosmos.org
BSD 3-Clause "New" or "Revised" License
2.93k stars 553 forks source link

Error occurred while invoking IL2CPU #574

Closed IanSteg closed 7 years ago

IanSteg commented 7 years ago

I'm trying to build my OS but I keep getting the 'Error occurred while invoking IL2CPU.' I had this problem a couple of days ago with the problem being VS was in Release mode. I fixed this by putting it in Debug mode and now after I add some new things in the Kernel, I am getting the error again. I get the error on all build profiles.

ghost commented 7 years ago

Could you give us the full log.

IanSteg commented 7 years ago

1>------ Build started: Project: StegOSBoot, Configuration: Debug x86 ------ 1> Invoking il2cpu.exe "DebugEnabled:False" "StackCorruptionDetectionEnabled:True" "DebugMode:Source" "TraceAssemblies:" "DebugCom:1" "UseNAsm:True" "OutputFilename:C:\Users\Ian\Documents\Visual Studio 2015\Projects\StegOS\StegOS V1.0.x.x\StegOS\bin\Debug\StegOSBoot.asm" "EnableLogging:True" "EmitDebugSymbols:True" "IgnoreDebugStubAttribute:False" "References:C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Kernel\Cosmos.Core.Plugs.dll" "References:C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Kernel\Cosmos.Debug.Kernel.Plugs.dll" "References:C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Kernel\Cosmos.System.Plugs.dll" "References:C:\Users\Ian\Documents\Visual Studio 2015\Projects\StegOS\StegOS V1.0.x.x\StegOS\bin\Debug\StegOS.dll" "References:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Core.dll" 1>C:\Program Files (x86)\MSBuild\Cosmos\Cosmos.targets(31,5): error : Error occurred while invoking IL2CPU. 1> Executing command line "C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\IL2CPU.exe" "DebugEnabled:False" "StackCorruptionDetectionEnabled:True" "DebugMode:Source" "TraceAssemblies:" "DebugCom:1" "UseNAsm:True" "OutputFilename:C:\Users\Ian\Documents\Visual Studio 2015\Projects\StegOS\StegOS V1.0.x.x\StegOS\bin\Debug\StegOSBoot.asm" "EnableLogging:True" "EmitDebugSymbols:True" "IgnoreDebugStubAttribute:False" "References:C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Kernel\Cosmos.Core.Plugs.dll" "References:C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Kernel\Cosmos.Debug.Kernel.Plugs.dll" "References:C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Kernel\Cosmos.System.Plugs.dll" "References:C:\Users\Ian\Documents\Visual Studio 2015\Projects\StegOS\StegOS V1.0.x.x\StegOS\bin\Debug\StegOS.dll" "References:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Core.dll" 1> Working directory = 'C:\Users\Ian\Documents\Visual Studio 2015\Projects\StegOS\StegOS V1.0.x.x\StegOS\bin\Debug\' 1> Loaded : DebugEnabled 1> Loaded : StackCorruptionDetectionEnabled 1> Loaded : DebugMode 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> Plug found: 'System.RuntimeType' 1> Plug found: 'System.OutOfMemoryException' 1> Plug found: 'System.Double' 1> Plug found: 'System.Delegate' 1> Plug found: 'System.Array' 1> Plug found: 'System.Buffer' 1> Plug found: 'System.Enum' 1> Plug found: 'System.EventHandler' 1> Plug found: 'System.Exception' 1> Plug found: 'System.MulticastDelegate' 1> Plug found: 'System.Runtime.CompilerServices.RuntimeHelpers' 1> Plug found: 'System.Math' 1> Plug found: 'System.String' 1> Plug found: 'System.Diagnostics.Debugger' 1> Plug found: 'System.Byte' 1> Plug found: 'System.Environment' 1> Plug found: 'System.GC' 1> Plug found: 'System.Int16' 1> Plug found: 'System.Int32' 1> Plug found: 'System.Int64' 1> Plug found: 'System.IntPtr' 1> Plug found: 'System.Number' 1> Plug found: 'System.Object' 1> Plug found: 'System.Single' 1> Plug found: 'System.SR' 1> Plug found: 'System.UInt16' 1> Plug found: 'System.UInt32' 1> Plug found: 'System.UInt64' 1> Plug found: 'System.Threading.Interlocked' 1> Plug found: 'System.Runtime.InteropServices.SafeHandle' 1> Plug found: 'System.Resources.ResourceManager' 1> Plug found: 'System.Net.IPAddress' 1> Plug found: 'System.Net.SocketAddress' 1> Plug found: 'System.Globalization.NumberFormatInfo' 1> Plug found: 'System.Drawing.Color' 1> Plug found: 'System.Drawing.SR' 1> Plug found: 'System.Security.CodeAccessSecurityEngine' 1> Plug found: 'System.RuntimeType+RuntimeTypeCache' 1> Plug found: 'System.RuntimeTypeHandle' 1> Plug found: 'System.SByte' 1> Plug found: 'System.UIntPtr' 1> Plug found: 'System.Security.Cryptography.Utils' 1> Plug found: 'System.Globalization.CultureInfo' 1> Plug found: 'Microsoft.Win32.RegistryKey' 1> Plug found: 'Cosmos.Core.CPU' 1> Plug found: 'Cosmos.IL2CPU.GCImplementation' 1> Plug found: 'Cosmos.Core.IOPortBase' 1> Plug found: 'Cosmos.Debug.Kernel.Debugger' 1> Plug found: 'System.Char' 1> Plug found: 'System.Collections.Generic.Dictionary`2[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]' 1> Plug found: 'System.Random' 1> Plug found: 'System.Console' 1> Plug found: 'System.Type' 1> Plug found: 'System.Threading.Monitor' 1> Plug found: 'System.Text.DecoderFallback' 1> Plug found: 'System.Text.EncoderFallback' 1> Plug found: 'System.Text.ASCIIEncoding' 1> Plug found: 'System.Text.InternalDecoderBestFitFallbackBuffer' 1> Error: Exception: System.NotImplementedException: OpCode 'Mul_Ovf_Un' not implemented! 1> at Cosmos.IL2CPU.ILOpCodes.OpNone.GetNumberOfStackPops(MethodBase aMethod) in c:\Data\Sources\OpenSource\Cosmos\source\Cosmos.IL2CPU\ILOpCodes\OpNone.cs:line 149 1> at Cosmos.IL2CPU.ILOpCode.InitStackAnalysis(MethodBase aMethod) in c:\Data\Sources\OpenSource\Cosmos\source\Cosmos.IL2CPU\ILOpCode.cs:line 296 1> at Cosmos.IL2CPU.ILReader.ProcessMethod(MethodBase aMethod) in c:\Data\Sources\OpenSource\Cosmos\source\Cosmos.IL2CPU\ILReader.cs:line 407 1> at Cosmos.IL2CPU.ILScanner.ScanMethod(MethodBase aMethod, Boolean aIsPlug, String sourceItem) in c:\Data\Sources\OpenSource\Cosmos\source\Cosmos.IL2CPU\ILScanner.cs:line 545 1> at Cosmos.IL2CPU.ILScanner.ScanQueue() in c:\Data\Sources\OpenSource\Cosmos\source\Cosmos.IL2CPU\ILScanner.cs:line 670 1> at Cosmos.IL2CPU.ILScanner.Execute(MethodBase aStartMethod) in c:\Data\Sources\OpenSource\Cosmos\source\Cosmos.IL2CPU\ILScanner.cs:line 255 1> at Cosmos.IL2CPU.CompilerEngine.Execute() in c:\Data\Sources\OpenSource\Cosmos\source\Cosmos.IL2CPU\CompilerEngine.cs:line 238 1> Loaded assemblies: 1> C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll 1> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\IL2CPU.exe 1> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Cosmos.IL2CPU.dll 1> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Cosmos.Build.Common.dll 1> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Cosmos.Debug.Common.dll 1> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Cosmos.Assembler.dll 1> C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0b77a5c561934e089\System.Core.dll 1> C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0b77a5c561934e089\System.dll 1> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Cosmos.System.dll 1> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Kernel\Cosmos.Core.Plugs.dll 1> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Cosmos.IL2CPU.Plugs.dll 1> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Cosmos.Common.dll 1> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Kernel\Cosmos.Debug.Kernel.Plugs.dll 1> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Kernel\Cosmos.System.Plugs.dll 1> C:\Users\Ian\Documents\Visual Studio 2015\Projects\StegOS\StegOS V1.0.x.x\StegOS\bin\Debug\StegOS.dll 1> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Mono.Cecil.dll 1> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\System.Data.SQLite.dll 1> C:\WINDOWS\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0b77a5c561934e089\System.Data.dll 1> C:\WINDOWS\Microsoft.Net\assembly\GAC_32\System.Transactions\v4.0_4.0.0.0b77a5c561934e089\System.Transactions.dll 1> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\DapperExtensions.dll 1> C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0b77a5c561934e089\System.Runtime.Serialization.dll 1> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\SQLinq.dll 1> C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0b03f5f7f11d50a3a\System.Configuration.dll 1> C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0b77a5c561934e089\System.Xml.dll 1> C:\WINDOWS\Microsoft.Net\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0b03f5f7f11d50a3a\System.EnterpriseServices.dll 1> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\XSC.exe 1> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Cosmos.Debug.DebugStub.dll 1> C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll 1> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Cosmos.Core.dll 1> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Cosmos.Debug.Kernel.dll 1> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Cosmos.HAL.dll 1> Errorred 1> IL2CPU invoked with DebugMode='Source', DebugEnabled='False', TraceAssemblies='{NULL}', IgnoreDebugStub='False' 1> IL2CPU task took 00:00:02.9818837 1>Done building project "StegOSBoot.Cosmos" -- FAILED. 1> ========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========

ghost commented 7 years ago

Well you used a feature that isn't yet implemented.

IanSteg commented 7 years ago

Which is?

mterwoord commented 7 years ago

Mul_Ovf_Un opcode

IanSteg commented 7 years ago

I dont see where I used it... What does it do?

mterwoord commented 7 years ago

Mul_Ovf_Un is used for multiplying undefined numbers. Not sure on semantics.

On a side note: we have a gitter channel, where we have people around pretty much all day. Response times should be lower there.. :)

IanSteg commented 7 years ago

Ok, I still have no idea where I used it. Is there a way I can look for it? Could I just Ctrl+F to find it?

Response times are no problem for me. Thanks anyway. Good to know for when I have a time sensitive project.

jp2masa commented 7 years ago

I think that Mul_Ovf_Un is implemented in the devkit, there was an issue about that.

fanoI commented 7 years ago

Yes it is implemented: https://github.com/CosmosOS/Cosmos/blob/master/source/Cosmos.IL2CPU/IL/Mul_Ovf_Un.cs

@IanSteg are you sure you are using on the last devKit? However probably you not calling the Mul_Ovf_Un directly but some library you are using is doing this you can use ILSPY to see what is using it.

IanSteg commented 7 years ago

I am using the userkit... How do you use ILSPY?

fanoI commented 7 years ago

OK then first use the DevKit really a lot of things are been fixed... as you can see above now we have Mul_Ovf_Un now!

IanSteg commented 7 years ago

Ok, I'll give it a go.

IanSteg commented 7 years ago

Can you give me the link to the DevKit download?

jp2masa commented 7 years ago

The devkit is the version from the mastee branch, just clone it and run install-VS2015.bat

fanoI commented 7 years ago

There is no direct link to the devKit because is de facto the actual GitHub "snapshot" of the Cosmos source code. You have two way to grab it:

  1. If you to contribute to Cosmos you should clone it in your GitHub account
  2. You can download it as a zip file

You find this in the green button "Clone or Download" here: https://github.com/CosmosOS/Cosmos

Look here of how to install it: https://github.com/CosmosOS/Cosmos/wiki/Devkit

IanSteg commented 7 years ago

How do I know if it installed and I am using the DevKit version?

jp2masa commented 7 years ago

If the devkit installation is successful, Cosmos.sln will be opened in VS.

fanoI commented 7 years ago

Please be patient is really slow... could last until 15 minutes!

IanSteg commented 7 years ago

Yay! It works! Thanks everyone!