{"action":"created","issue":{"url":"https://api.github.com/repos/CosmosOS/Cosmos/issues/575","repository_url":"https://api.github.com/repos/CosmosOS/Cosmos","labels_url":"https://api.github.com/repos/CosmosOS/Cosmos/issues/575/labels{/name}","comments_url":"https://api.github.com/repos/CosmosOS/Cosmos/issues/575/comments","events_url":"https://api.github.com/repos/CosmosOS/Cosmos/issues/575/events","html_url":"https://github.com/CosmosOS/Cosmos/issues/575","id":206474533,"number":575,"title":"The program ' ' has exited with code 0 (0x0)","user":{"login":"IanSteg","id":25563128,"avatar_url":"https://avatars.githubusercontent.com/u/25563128?v=3","gravatar_id":"","url":"https://api.github.com/users/IanSteg","html_url":"https://github.com/IanSteg","followers_url":"https://api.github.com/users/IanSteg/followers","following_url":"https://api.github.com/users/IanSteg/following{/other_user}","gists_url":"https://api.github.com/users/IanSteg/gists{/gist_id}","starred_url":"https://api.github.com/users/IanSteg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IanSteg/subscriptions","organizations_url":"https://api.github.com/users/IanSteg/orgs","repos_url":"https://api.github.com/users/IanSteg/repos","events_url":"https://api.github.com/users/IanSteg/events{/privacy}","received_events_url":"https://api.github.com/users/IanSteg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":39,"created_at":"2017-02-09T11:15:57Z","updated_at":"2017-02-16T09:49:24Z","closed_at":null,"body":"I am trying to run my OS in VMware but when VMware opens, it soon closes and this is in the Output window:\r\n\r\n> Setting FirstDataLookupTable to \r\n0x021B6EBB\r\nFirstDataLookupTable was set to \r\n0x021B6EBB\r\nIn Cosmos.System.Kernel..ctor\r\nStarting kernel\r\nHW Bootstrap Init\r\nGlobal Init\r\nCreating Console\r\nCreating Keyboard\r\nHW Init\r\nBefore Core.Global.Init\r\nStatic Devices\r\nCLS\r\nFinding PCI Devices\r\nPCI Devices\r\nDone initializing Cosmos.HAL.Global\r\nATA Primary Master\r\nCreating Primary ATA IOGroup\r\nCreating Secondary ATA IOGroup\r\nATA device with speclevel ATA found.\r\nNumber of MBR partitions found:\r\n0x00000001\r\nThe program '' has exited with code 0 (0x0).\r\n"},"comment":{"url":"https://api.github.com/repos/CosmosOS/Cosmos/issues/comments/280284002","html_url":"https://github.com/CosmosOS/Cosmos/issues/575#issuecomment-280284002","issue_url":"https://api.github.com/repos/CosmosOS/Cosmos/issues/575","id":280284002,"user":{"login":"IanSteg","id":25563128,"avatar_url":"https://avatars.githubusercontent.com/u/25563128?v=3","gravatar_id":"","url":"https://api.github.com/users/IanSteg","html_url":"https://github.com/IanSteg","followers_url":"https://api.github.com/users/IanSteg/followers","following_url":"https://api.github.com/users/IanSteg/following{/other_user}","gists_url":"https://api.github.com/users/IanSteg/gists{/gist_id}","starred_url":"https://api.github.com/users/IanSteg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IanSteg/subscriptions","organizations_url":"https://api.github.com/users/IanSteg/orgs","repos_url":"https://api.github.com/users/IanSteg/repos","events_url":"https://api.github.com/users/IanSteg/events{/privacy}","received_events_url":"https://api.github.com/users/IanSteg/received_events","type":"User","site_admin":false},"created_at":"2017-02-16T09:49:24Z","updated_at":"2017-02-16T09:49:24Z","body":"Getting a bit further now:\r\n\r\n> Setting FirstDataLookupTable to \r\n0x021E232D\r\nFirstDataLookupTable was set to \r\n0x021E232D\r\nIn Cosmos.System.Kernel..ctor\r\nStarting kernel\r\nHW Bootstrap Init\r\nGlobal Init\r\nCreating Console\r\nCreating Keyboard\r\nHW Init\r\nBefore Core.Global.Init\r\nStatic Devices\r\nCLS\r\nFinding PCI Devices\r\nPCI Devices\r\nDone initializing Cosmos.HAL.Global\r\nATA Primary Master\r\nCreating Primary ATA IOGroup\r\nCreating Secondary ATA IOGroup\r\nATA device with speclevel ATA found.\r\nNumber of MBR partitions found:\r\n0x00000001\r\nATA Secondary Master\r\nInitialized\r\nLeds updated\r\nCls\r\nBefore Run\r\nCreate file system..\r\nCheck if username and password files exist.\r\nUsername and password file not found.\r\n0:\\ found.\r\nCreate username file.\r\nWrite to username file.\r\nCreate password file.\r\nWrite to password file.\r\nSet version number.\r\nClear screen.\r\nWrite os version info.\r\nRun\r\nNot yet stopped\r\nReally before Run\r\nStart of Run().\r\nThe program '' has exited with code 0 (0x0).\r\n\r\n\r\nHere is my code:\r\n\r\n`using System;\r\nusing System.Collections.Generic;\r\nusing System.Text;\r\nusing Sys = Cosmos.System;\r\nusing System.IO.Compression;\r\n\r\n\r\nnamespace StegOS\r\n{\r\n    public class Kernel : Sys.Kernel\r\n    {\r\n        protected override void BeforeRun()\r\n        {\r\n            PrintDebug(\"Create file system..\");\r\n            var fs = new Sys.FileSystem.CosmosVFS();\r\n            Sys.FileSystem.VFS.VFSManager.RegisterVFS(fs);\r\n            //PrintDebug(\"Check if 0:\\\\ exist.\");\r\n            //if (System.IO.Directory.Exists(\"0:\\\\\"))\r\n            //{\r\n            //    PrintDebug(\"0:\\\\ found.\");\r\n            //}\r\n            //else\r\n            //{\r\n            //    PrintDebug(\"0:\\\\ not found.\");\r\n            //    PrintDebug(\"Creating directory.\");\r\n            //    System.IO.Directory.CreateDirectory(\"0:\\\\\");\r\n            //}\r\n\r\n            PrintDebug(\"Check if username and password files exist.\");\r\n            if (System.IO.Directory.Exists(\"0:\\\\login\\\\user_nme.txt\") && System.IO.Directory.Exists(\"0:\\\\login\\\\pass_wrd.txt\"))\r\n            {\r\n                PrintDebug(\"Found.\");\r\n            }\r\n            else if (System.IO.Directory.Exists(\"0:\\\\login\\\\\"))\r\n            {\r\n                PrintDebug(\"Username and password file not found.\");\r\n                PrintDebug(\"0:\\\\ found.\");\r\n                PrintDebug(\"Create username file.\");\r\n                System.IO.File.Create(\"0:\\\\login\\\\user_nme.txt\");\r\n                PrintDebug(\"Write to username file.\");\r\n                System.IO.File.WriteAllText(\"0:\\\\login\\\\user_nme.txt\", \"StegOS\");\r\n                PrintDebug(\"Create password file.\");\r\n                System.IO.File.Create(\"0:\\\\login\\\\user_nme.txt\");\r\n                PrintDebug(\"Write to password file.\");\r\n                System.IO.File.WriteAllText(\"0:\\\\login\\\\pass_wrd.txt\", \"coffee\");\r\n            }\r\n            else\r\n            {\r\n                PrintDebug(\"0:\\\\ not found.\");\r\n                PrintDebug(\"Creating directory.\");\r\n                System.IO.Directory.CreateDirectory(\"0:\\\\login\");\r\n                PrintDebug(\"Create username file.\");\r\n                System.IO.File.Create(\"0:\\\\login\\\\user_nme.txt\");\r\n                PrintDebug(\"Write to username file.\");\r\n                System.IO.File.WriteAllText(\"0:\\\\login\\\\user_nme.txt\", \"StegOS\");\r\n                PrintDebug(\"Create password file.\");\r\n                System.IO.File.Create(\"0:\\\\login\\\\user_nme.txt\");\r\n                PrintDebug(\"Write to password file.\");\r\n                System.IO.File.WriteAllText(\"0:\\\\login\\\\pass_wrd.txt\", \"coffee\");\r\n            }\r\n            PrintDebug(\"Set version number.\");\r\n            var version = \"1.1.2.0\";\r\n            PrintDebug(\"Clear screen.\");\r\n            Console.Clear();\r\n            PrintDebug(\"Write os version info.\");\r\n            Console.WriteLine(\"StegOS \" + version + \" Coffee booted successfully. Powered by Cosmos.\");\r\n            Console.WriteLine();\r\n        }\r\n\r\n        protected override void Run()\r\n        {\r\n            PrintDebug(\"Start of Run().\");\r\n            //Login\r\n            var loggedin = false;\r\n            var user_nme = System.IO.File.ReadAllText(\"0:\\\\login\\\\user_nme\");\r\n            var pass_wrd = System.IO.File.ReadAllText(\"0:\\\\login\\\\pass_wrd\");\r\n            if (loggedin == false)\r\n            {\r\n                Console.WriteLine(\"Please log in to continue.\");\r\n                Console.Write(\"Username: \");\r\n                var UN = Console.ReadLine();\r\n                Console.Write(\"Password: \");\r\n                var PW = Console.ReadLine();\r\n                if (PW == pass_wrd && UN == user_nme)\r\n                {\r\n                    Console.WriteLine(\"Logging in...\");\r\n                    loggedin = true;\r\n                    Console.Clear();\r\n                    Console.WriteLine(\"Logged in successfully.\");\r\n                    Console.WriteLine();\r\n                }\r\n                else\r\n                {\r\n                    Console.WriteLine(\"Logging in...\");\r\n                    loggedin = false;\r\n                    Console.WriteLine(\"Log in failed. Try again\");\r\n                }\r\n            }\r\n            while (loggedin == true)\r\n            {\r\n                Console.Write(user_nme + \"@StegOS: \");\r\n                var get_input = Console.ReadLine();\r\n                var input = get_input.ToUpper();\r\n\r\n                if (input == \"SHUTDOWN\")\r\n                {\r\n                    goto SHUTDOWN;\r\n                }\r\n                else if (input == \"LOG OFF\")\r\n                {\r\n                    goto LOGOFF;\r\n                }\r\n                else if (input == \"CLEAR\")\r\n                {\r\n                    goto CLEAR;\r\n                }\r\n                else if (input == \"REBOOT\")\r\n                {\r\n                    goto REBOOT;\r\n                }\r\n                else if (input == \"ABOUT\")\r\n                {\r\n                    goto ABOUT;\r\n                }\r\n                else if (input == \"HELP\")\r\n                {\r\n                    goto HELP;\r\n                }\r\n                else\r\n                {\r\n                    Console.WriteLine(\"'\" + input + \"' is not a valid command. Try HELP for a list of commands.\");\r\n                    Console.WriteLine();\r\n                }\r\n\r\n            ABOUT:\r\n                Console.ForegroundColor = ConsoleColor.Magenta;\r\n                Console.WriteLine(\"\");\r\n                Console.WriteLine(\" ###     #####   #####    ###         ###     ### \");\r\n                Console.WriteLine(\"#   #      #     #       #   #       #   #   #   #\");\r\n                Console.WriteLine(\"#   #      #     #       #           #   #   #    \");\r\n                Console.WriteLine(\" ###       #     ####    #           #   #    ### \");\r\n                Console.WriteLine(\"    #      #     #       # ###       #   #       #\");\r\n                Console.WriteLine(\"#   #      #     #       #   #       #   #   #   #\");\r\n                Console.WriteLine(\" ###       #     #####    ####        ###     ### \");\r\n                Console.WriteLine(\"\");\r\n                Console.WriteLine(\"\");\r\n                Console.WriteLine(\"   ###      ###    #####   #####   #####   #####\");\r\n                Console.WriteLine(\"  #   #    #   #   #       #       #       #    \");\r\n                Console.WriteLine(\"  #        #   #   #       #       #       #    \");\r\n                Console.WriteLine(\"  #        #   #   ####    ####    ####    #### \");\r\n                Console.WriteLine(\"  #        #   #   #       #       #       #    \");\r\n                Console.WriteLine(\"  #   #    #   #   #       #       #       #    \");\r\n                Console.WriteLine(\"   ###      ###    #       #       #####   #####\");\r\n                Console.WriteLine(\"\");\r\n                Console.WriteLine(\"Powered by Cosmos.\");\r\n                Console.ForegroundColor = ConsoleColor.White;\r\n                Console.WriteLine(\"\");\r\n            CLEAR:\r\n                Console.Clear();\r\n\r\n            HELP:\r\n                Console.WriteLine();\r\n                Console.WriteLine(\"ABOUT             About StegOS.\");\r\n                Console.WriteLine(\"CLEAR             Clear the screen.\");\r\n                Console.WriteLine(\"HELP              Display this help screen.\");\r\n                Console.WriteLine(\"LOG OFF           Log out of StegOS.\");\r\n                Console.WriteLine(\"SHUTDOWN          Check is system is safe to shutdown.\");\r\n                Console.WriteLine(\"REBOOT            Reboot StegOS.\");\r\n                Console.WriteLine();\r\n\r\n            LOGOFF:\r\n                Console.WriteLine(\"Logging off... Please wait.\");\r\n                Console.Clear();\r\n                loggedin = false;\r\n\r\n            SHUTDOWN:\r\n                Console.WriteLine(\"It is safe to shutdown. Press the power button to shutdown.\");\r\n                Console.WriteLine();\r\n                this.Stop();\r\n\r\n            REBOOT:;\r\n                Sys.Power.Reboot();\r\n            }\r\n        }\r\n    }\r\n}\r\n`"}}
{"actor":{"display_login":"IanSteg"}}