Missing plug
See original GitHub issueHow do I fix a missing plug issue? I am trying to do:
{
var dir = System.IO.Directory.GetCurrentDirectory();
Console.WriteLine(dir);
Console.WriteLine("");
var contents = System.IO.Directory.GetFileSystemEntries(dir);
Console.WriteLine(contents);
}
Line 5 of that little snippet seems to be the problem (var contents = System.IO.Directory.GetFileSystemEntries(dir)😉.
Build output:
1>------ Build started: Project: StegOS, Configuration: Debug x86 ------ 1> StegOS -> C:\Users\Ian\documents\visual studio 2015\Projects\StegOS\StegOS\bin\Debug\StegOS.dll 2>------ Build started: Project: StegOSBoot, Configuration: Debug x86 ------ 2> Invoking il2cpu.exe “DebugEnabled:True” “StackCorruptionDetectionEnabled:False” “StackCorruptionDetectionLevel:” “DebugMode:Source” “TraceAssemblies:” “DebugCom:1” “UseNAsm:True” “OutputFilename:C:\Users\Ian\documents\visual studio 2015\Projects\StegOS\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\bin\Debug\StegOS.dll” “References:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\System.Core.dll” 2>C:\Program Files (x86)\MSBuild\Cosmos\Cosmos.targets(34,5): error : Error occurred while invoking IL2CPU. 2> Executing command line “C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\IL2CPU.exe” “DebugEnabled:True” “StackCorruptionDetectionEnabled:False” “StackCorruptionDetectionLevel:” “DebugMode:Source” “TraceAssemblies:” “DebugCom:1” “UseNAsm:True” “OutputFilename:C:\Users\Ian\documents\visual studio 2015\Projects\StegOS\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\bin\Debug\StegOS.dll” “References:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\System.Core.dll” 2> Working directory = ‘C:\Users\Ian\documents\visual studio 2015\Projects\StegOS\StegOS\bin\Debug' 2> Loaded : DebugEnabled 2> Loaded : StackCorruptionDetectionEnabled 2> Loaded : DebugMode 2> Loaded : StackCorruptionDetectionLevel 2> Loaded : TraceAssemblies 2> Loaded : DebugCom 2> Loaded : UseNAsm 2> Loaded : OutputFilename 2> Loaded : EnableLogging 2> Loaded : EmitDebugSymbols 2> Loaded : IgnoreDebugStubAttribute 2> Loaded : References 2> Executing IL2CPU on assembly 2> 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(). 2> Called from : 2> System.IO.Iterator
1[System.String]::Void .ctor() 2> System.IO.FileSystemEnumerableIterator
1[System.String]::Void .ctor(System.String, System.String, System.String, System.IO.SearchOption, System.IO.SearchResultHandler1[System.String], Boolean) 2> System.IO.FileSystemEnumerableFactory::System.Collections.Generic.IEnumerable
1[System.String] CreateFileNameIterator(System.String, System.String, System.String, Boolean, Boolean, System.IO.SearchOption, Boolean) 2> System.IO.Directory::System.String[] InternalGetFileDirectoryNames(System.String, System.String, System.String, Boolean, Boolean, System.IO.SearchOption, Boolean) 2> System.IO.Directory::System.String[] InternalGetFileSystemEntries(System.String, System.String, System.IO.SearchOption) 2> System.IO.Directory::System.String[] GetFileSystemEntries(System.String) 2> StegOS.Kernel::Void Run() 2> Cosmos.System.Kernel::Void Run() 2> at Cosmos.IL2CPU.ILScanner.ScanMethod(MethodBase aMethod, Boolean aIsPlug, String sourceItem) in C:\Users\Ian\Downloads\Cosmos\Cosmos\source\Cosmos.IL2CPU\ILScanner.cs:line 522 2> at Cosmos.IL2CPU.ILScanner.ScanQueue() in C:\Users\Ian\Downloads\Cosmos\Cosmos\source\Cosmos.IL2CPU\ILScanner.cs:line 663 2> at Cosmos.IL2CPU.ILScanner.Execute(MethodBase aStartMethod) in C:\Users\Ian\Downloads\Cosmos\Cosmos\source\Cosmos.IL2CPU\ILScanner.cs:line 243 2> at Cosmos.IL2CPU.CompilerEngine.Execute() in C:\Users\Ian\Downloads\Cosmos\Cosmos\source\Cosmos.IL2CPU\CompilerEngine.cs:line 252 2> Loaded assemblies: 2> C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll 2> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\IL2CPU.exe 2> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Cosmos.IL2CPU.dll 2> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Cosmos.Build.Common.dll 2> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Cosmos.Debug.Common.dll 2> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Cosmos.Assembler.dll 2> C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll 2> C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll 2> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Cosmos.System.dll 2> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Kernel\Cosmos.Core.Plugs.dll 2> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Cosmos.Common.dll 2> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Kernel\Cosmos.Debug.Kernel.Plugs.dll 2> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Cosmos.IL2CPU.Plugs.dll 2> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Kernel\Cosmos.System.Plugs.dll 2> C:\Users\Ian\documents\visual studio 2015\Projects\StegOS\StegOS\bin\Debug\StegOS.dll 2> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Mono.Cecil.dll 2> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\System.Data.SQLite.dll 2> C:\WINDOWS\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll 2> C:\WINDOWS\Microsoft.Net\assembly\GAC_32\System.Transactions\v4.0_4.0.0.0__b77a5c561934e089\System.Transactions.dll 2> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\DapperExtensions.dll 2> C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll 2> C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll 2> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\SQLinq.dll 2> C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll 2> C:\WINDOWS\Microsoft.Net\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll 2> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\XSC.exe 2> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Cosmos.Debug.DebugStub.dll 2> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Cosmos.Core.dll 2> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Cosmos.Debug.Kernel.dll 2> C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll 2> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Cosmos.HAL.dll 2> C:\Users\Ian\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Cosmos.Core.Memory.dll 2> Errorred 2> IL2CPU invoked with DebugMode=‘Source’, DebugEnabled=‘True’,StackCorruptionDetectionLevel=’{NULL}‘, TraceAssemblies=’{NULL}', IgnoreDebugStub=‘False’ 2> IL2CPU task took 00:00:01.8876636 2>Done building project “StegOSBoot.Cosmos” – FAILED. 2> ========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:46 (22 by maintainers)
Top GitHub Comments
Are you understanding what you are doing? You get the null reference exception because you are using a variable that was not initialized. This variable is the VFS variable, which can be fs or mVFS, you choose.
mVFS is the variable that you use as VFS.