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 stops the build.

See original GitHub issue

Hi, I’m programming my little os for a while with Cosmos. Until today I was using the User Kit, but now I’ve installed the Devkit and shit append. This is the build info that shows every time I type build on a cosmos project: 1>------ Build started: Project: CAOSBoot, Configuration: Debug x86 ------ 1> Invoking il2cpu.exe “DebugEnabled:False” “StackCorruptionDetectionEnabled:False” “StackCorruptionDetectionLevel:” “DebugMode:Source” “TraceAssemblies:” “DebugCom:1” “UseNAsm:True” “OutputFilename:c:\users\chief\documents\visual studio 2015\Projects\CAOS\CAOS\bin\Debug\CAOSBoot.asm” “EnableLogging:True” “EmitDebugSymbols:True” “IgnoreDebugStubAttribute:False” “References:c:\users\chief\documents\visual studio 2015\Projects\CAOS\CAOS\bin\Debug\CAOS.dll” “References:C:\Users\Chief\AppData\Roaming\Cosmos User Kit\Kernel\Cosmos.Core.Plugs.dll” “References:C:\Users\Chief\AppData\Roaming\Cosmos User Kit\Kernel\Cosmos.Debug.Kernel.Plugs.dll” “References:C:\Users\Chief\AppData\Roaming\Cosmos User Kit\Kernel\Cosmos.System.Plugs.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:\Users\Chief\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\IL2CPU.exe” “DebugEnabled:False” “StackCorruptionDetectionEnabled:False” “StackCorruptionDetectionLevel:” “DebugMode:Source” “TraceAssemblies:” “DebugCom:1” “UseNAsm:True” “OutputFilename:c:\users\chief\documents\visual studio 2015\Projects\CAOS\CAOS\bin\Debug\CAOSBoot.asm” “EnableLogging:True” “EmitDebugSymbols:True” “IgnoreDebugStubAttribute:False” “References:c:\users\chief\documents\visual studio 2015\Projects\CAOS\CAOS\bin\Debug\CAOS.dll” “References:C:\Users\Chief\AppData\Roaming\Cosmos User Kit\Kernel\Cosmos.Core.Plugs.dll” “References:C:\Users\Chief\AppData\Roaming\Cosmos User Kit\Kernel\Cosmos.Debug.Kernel.Plugs.dll” “References:C:\Users\Chief\AppData\Roaming\Cosmos User Kit\Kernel\Cosmos.System.Plugs.dll” “References:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\System.Core.dll” 1> Working directory = ‘c:\users\chief\documents\visual studio 2015\Projects\CAOS\CAOS\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> Detecting fields for type ‘Cosmos.Debug.Common.FIELD_INFO’ 1> Detecting fields for type ‘Cosmos.Debug.Common.FIELD_MAPPING’ 1> Detecting fields for type ‘Cosmos.Debug.Common.MethodIlOp’ 1> Detecting fields for type ‘Cosmos.Debug.Common.AssemblyFile’ 1> Detecting fields for type ‘Cosmos.Debug.Common.Document’ 1> Detecting fields for type ‘Cosmos.Debug.Common.Method’ 1> Error: Exception: System.Exception: Original method argument $this is a reference type. Plug attribute first argument is not an argument type, nor was it marked with ObjectPointerAccessAttribute! Method: SystemInt32SystemArrayGetLowerBoundSystemInt32 Parameter: aThis 1> in Cosmos.IL2CPU.AppAssembler.GenerateMethodForward(MethodInfo aFrom, MethodInfo aTo) in C:\Users\Chief\Downloads\Cosmos-master\Cosmos-master\source\Cosmos.IL2CPU\AppAssembler.cs:riga 1295 1> in Cosmos.IL2CPU.ILScanner.Assemble() in C:\Users\Chief\Downloads\Cosmos-master\Cosmos-master\source\Cosmos.IL2CPU\ILScanner.cs:riga 906 1> in Cosmos.IL2CPU.ILScanner.Execute(MethodBase aStartMethod) in C:\Users\Chief\Downloads\Cosmos-master\Cosmos-master\source\Cosmos.IL2CPU\ILScanner.cs:riga 245 1> in Cosmos.IL2CPU.CompilerEngine.Execute() in C:\Users\Chief\Downloads\Cosmos-master\Cosmos-master\source\Cosmos.IL2CPU\CompilerEngine.cs:riga 252 1> Loaded assemblies: 1> C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll 1> C:\Users\Chief\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\IL2CPU.exe 1> C:\Users\Chief\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Cosmos.IL2CPU.dll 1> C:\Users\Chief\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Cosmos.Build.Common.dll 1> C:\Users\Chief\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Cosmos.Debug.Common.dll 1> C:\Users\Chief\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.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:\Users\Chief\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Cosmos.System.dll 1> c:\users\chief\documents\visual studio 2015\Projects\CAOS\CAOS\bin\Debug\CAOS.dll 1> C:\Users\Chief\AppData\Roaming\Cosmos User Kit\Kernel\Cosmos.Core.Plugs.dll 1> C:\Users\Chief\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Cosmos.Common.dll 1> C:\Users\Chief\AppData\Roaming\Cosmos User Kit\Kernel\Cosmos.Debug.Kernel.Plugs.dll 1> C:\Users\Chief\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Cosmos.IL2CPU.Plugs.dll 1> C:\Users\Chief\AppData\Roaming\Cosmos User Kit\Kernel\Cosmos.System.Plugs.dll 1> C:\Users\Chief\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Mono.Cecil.dll 1> C:\Users\Chief\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.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:\Users\Chief\AppData\Roaming\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:\Users\Chief\AppData\Roaming\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:\Users\Chief\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\XSC.exe 1> C:\Users\Chief\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Cosmos.Debug.DebugStub.dll 1> C:\Users\Chief\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Cosmos.Core.dll 1> C:\Users\Chief\AppData\Roaming\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:\Users\Chief\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Cosmos.HAL.dll 1> C:\Users\Chief\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Cosmos.Core.Memory.dll 1> C:\Users\Chief\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Microsoft.Samples.Debugging.CorApi.dll 1> C:\Users\Chief\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\Mono.Cecil.Pdb.dll 1> C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\mscorlib.resources\v4.0_4.0.0.0_it_b77a5c561934e089\mscorlib.resources.dll 1> Errorred 1> IL2CPU invoked with DebugMode=‘Source’, DebugEnabled=‘False’,StackCorruptionDetectionLevel=’{NULL}‘, TraceAssemblies=’{NULL}', IgnoreDebugStub=‘False’ 1> IL2CPU task took 00:00:01.5964494 1>Done building project “CAOSBoot.Cosmos” – FAILED. 1> Build has been canceled. I think that my code would be useful, so here it is: `using System; using System.Collections.Generic; using System.Text; using Sys = Cosmos.System;

namespace CaOS { public class Kernel : Sys.Kernel { string version = “20170305”; string pass = “”; string user1 = “User1”; string user2 = “User2”; string error = “Unknown command. For a complete list of commands use help.”; bool useruno = true; public bool file_system_init = false; string current_path = @"0:";

    protected override void BeforeRun()
    {
        Console.Clear();


        Console.ForegroundColor = ConsoleColor.White;
        Console.BackgroundColor = ConsoleColor.Black;
        Console.WriteLine("     +++++++++         ++++++++++         ++++++++++++++          +++++++++++   ");
        Console.WriteLine("     +++               +++    +++         +++        +++          +++           ");
        Console.WriteLine("     !!!               !!!    !!!         !!!        !!!          !!!           ");
        Console.WriteLine("     !!!               !!!!!!!!!!         !!!        !!!          !!!!!!!!!!!   ");
        Console.WriteLine("     |||               |||    |||         |||        |||                  |||   ");
        Console.WriteLine("     |||               |||    |||         |||        |||                  |||   ");
        Console.WriteLine("     [][][][][         [][    ][]         [][][][][][][]          [][][][][][   ");
        Console.WriteLine("                                                                                ");
        Console.WriteLine("**********************    CasteSoftworks " + version + "      **********************");
        Console.WriteLine("                                                                                ");
        Console.WriteLine("**********************                Setup               **********************");
        filesystem:
        Console.Write("Do you want to enable the file system *IT CAN DAMAGE THE MACHINE* (Y/N)?");
        var filesys = Console.ReadLine();
        if (filesys == "Y" || filesys == "y")
        {
            file_system_init = true;
            Console.WriteLine("File System Will Be Initialized!");

            var fs = new Sys.FileSystem.CosmosVFS();

            Sys.FileSystem.VFS.VFSManager.RegisterVFS(fs);
            goto setupcolore;
        }
        else if (filesys == "N" || filesys == "n")
        {
            Console.WriteLine("File System Will NOT Be Initialized!");
            goto setupcolore;
        }
        else
        {
            goto filesystem;
        }
        setupcolore:
        Console.Write("Font color W(white) or G(green)?(W/G)");
        var colore = Console.ReadLine();
        if (colore == "W" || colore == "w")
        {
            goto user1;
        }
        else if (colore == "G" || colore == "g")
        {
            Console.ForegroundColor = ConsoleColor.DarkGreen;
            goto user1;
        }
        else
        {
            goto setupcolore;
        }
        user1:
        Console.Write("What user do you want to use?(1/2)");
        var utente = Console.ReadLine();
        if (utente == "1")
        {
            goto nomeutente;
        }
        else if (utente == "2")
        {
            useruno = false;
            goto nomeutente;
        }
        else
        {
            goto user1;
        }
        nomeutente:
        Console.Write("Set the user's name: ");
        var nomeutente = Console.ReadLine();
        if (useruno)
        {
            user1 = nomeutente;
            goto booted;
        }
        else
        {
            user2 = nomeutente;
            goto booted;
        }

        booted:
        Console.Clear();
        Console.WriteLine("     ************    ************    ************    ************");
        Console.WriteLine("    *               *          *    *          *    *            ");
        Console.WriteLine("   #               ############    #          #    ############  ");
        Console.WriteLine("  #               #          #    #          #               #   ");
        Console.WriteLine(" @               @          @    @          @               @    ");
        Console.WriteLine("@@@@@@@@@@@@    @          @    @@@@@@@@@@@@    @@@@@@@@@@@@     ");
        Console.WriteLine("                                                                 ");
        Console.WriteLine("                       Successfully booted                  ");
        inizia:
        Console.Write("Start?(Y/N)");
        var sino = Console.ReadLine();
        if (sino == "Y" || sino == "y")
        {
            Console.Clear();
        }
        else if (sino == "N" || sino == "n")
        {
            Stop();
        }
        else
        {
            goto inizia;
        }
    }


    protected override void Run()
    {
        Console.Write(current_path + "~|>");
        var input = Console.ReadLine();
        var co = input;
        var vars = "";
        if (input.ToLower().IndexOf('/') != -1)
        {

            string[] parts = input.Split('/');
            co = parts[0];
            vars = parts[1];
        }
        switch (co)
        {
            case "reboot":
                Cosmos.System.Power.Reboot();
                break;
            case "shutdown":
                Stop();
                break;
            case "clear":
                Console.Clear();
                break;
            case "help":
                Console.WriteLine("Commands:");
                Console.WriteLine("Reboot = reboot");
                Console.WriteLine("Shutdown = shutdown");
                Console.WriteLine("Clear = clear");
                Console.WriteLine("About = about");
                Console.WriteLine("Lock = lock");
                Console.WriteLine("See current user = user");
                Console.WriteLine("Print something on screen = print/things to print");
                break;
            case "lock":
                Console.Write("Set Passcode: ");
                pass = Console.ReadLine();
                lockkernel.lockpass(pass);
                break;
            case "print":
                Console.WriteLine(vars);
                break;
            case "about":
                Console.WriteLine("CAOS , CasteSoftworks " + version + " for help castesoftworks@fastservice.com ");
                break;
            case "cd":
                if (file_system_init)
                {
                    current_path = vars;
                }
                else
                {
                    Console.WriteLine("File System Not Enabled!");
                }
                break;
            case "md":

                if (file_system_init)

                {
                    SHAFS.createDir(current_path + vars);
                }
                else

                {
                    Console.WriteLine("File System Not Enabled!");
                }

                break;
            case "dir": // Displays current location

                if (file_system_init)

                {
                    string[] back = SHAFS.readFiles(current_path);

                    string[] front = SHAFS.readDirectories(current_path);

                    string[] combined = new string[front.Length + back.Length];

                    Array.Copy(front, combined, front.Length);

                    Array.Copy(back, 0, combined, front.Length, back.Length);

                    foreach (var item in combined)
                    {
                        Console.WriteLine(item.ToString());
                    }
                }
                else
                {
                    Console.WriteLine("File System Not Enabled!");
                }
                break;
            case "microtxt": // Launches text editor

                if (file_system_init)

                {

                    //Launch Text Editor

                    Console.Clear();

                    microtxt.init();

                    break;

                }

                else

                {

                    Console.WriteLine("File System Not Enabled!");

                }

                break;
            default:
                Console.WriteLine(error);
                break;
        }
    }
}

}` I’ll really apreciate every help, Thanks!!

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
jp2masacommented, Mar 6, 2017

You need to edit the devkit source, go to Cosmos.Core.Plugs/System/ArrayImpl.cs and write [ObjectPointerAccess] before the first argument of GetLowerBounds.

0reactions
CasteSoftworkscommented, Mar 6, 2017

Oh, thanks a lot for the help @jp2masa I’m really plased of your quick help!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't build: "An unknown error has occurred"
- I need to test and debug in OS 10.10. The project opens in Xcode 6.4. However, the Build For commands are all...
Read more >
How to fix gradle build failed with unknown error
I build my app with expo after running eas build I keep getting this same error Android build failed: Gradle build failed with...
Read more >
EAS Build fails with unknown error
EAS build keeps failing for unknown reasons on both Android and IOS. Since the last build I made which was a week ago...
Read more >
Software Deployment failure - Unknown Error Code
You are unable to deploy software and you get the message - Failed with an unknown error, during the process. Cause. You will...
Read more >
Unknown build error on iOS - Question
I made a couple of tiny tweaks to my app, and now it will no long build for iOS, giving the dreaded “Message:...
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