{"record":{"id":"fd096cefc9f4f8f0","repo":"BCUninstaller/Bulk-Crap-Uninstaller","slug":"list-is-empty","errorCode":null,"errorMessage":"List is empty","messagePattern":"List is empty","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"source/BCU-console/Program.cs","lineNumber":217,"sourceCode":"            ApplicationEntrySerializer.SerializeApplicationEntries(args[0], apps);\n            Console.WriteLine(@\"Success!\");\n            return 0;\n        }\n\n        private static int ProcessUninstallCommand(string[] args)\n        {\n            if (args.Length < 1)\n                return ShowInvalidSyntaxError(\"Missing path argument\");\n\n            if (!File.Exists(args[0]))\n                return ShowInvalidSyntaxError(\"Invalid path or missing list file\");\n\n            UninstallList list;\n            try\n            {\n                list = UninstallList.ReadFromFile(args[0]);\n                if (list == null || list.Filters.Count == 0)\n                    throw new IOException(\"List is empty\");\n            }\n            catch (SystemException ex)\n            {\n                return ShowInvalidSyntaxError(\n                    $\"Invalid or damaged uninstall list file - \\\"{args[0]}\\\"\\nError: {ex.Message}\\n\");\n            }\n\n            var isVerbose = args.Any(x => x.Equals(\"/V\", StringComparison.OrdinalIgnoreCase));\n            var isQuiet = args.Any(x => x.Equals(\"/Q\", StringComparison.OrdinalIgnoreCase));\n            var isUnattended = args.Any(x => x.Equals(\"/U\", StringComparison.OrdinalIgnoreCase));\n\n            int junkArgumentIndex = Array.FindIndex(args, a => a.Equals(\"/J\", StringComparison.OrdinalIgnoreCase));\n            string junkArg = args.Where(a => a.Equals(\"/J\", StringComparison.OrdinalIgnoreCase) || a.StartsWith(\"/J=\", StringComparison.OrdinalIgnoreCase)).FirstOrDefault() ?? string.Empty;\n            ConfidenceLevel? junkConfidenceLevel = null;\n            if(junkArg.IsNotEmpty()) {\n                string[] junkSplit = junkArg.Split('=', 2);\n                junkConfidenceLevel = ConfidenceLevel.VeryGood;\n                if (junkSplit.Length == 2) {","sourceCodeStart":199,"sourceCodeEnd":235,"githubUrl":"https://github.com/BCUninstaller/Bulk-Crap-Uninstaller/blob/608321de98e92297377b1eb69029af55c25504a1/source/BCU-console/Program.cs#L199-L235","documentation":"Thrown by the BCU console's uninstall command after it reads the supplied uninstall list file. The file was found and readable, but UninstallList.ReadFromFile returned null or a list whose Filters collection is empty. An empty filter set cannot match any installed applications, so the command aborts and reports the file as invalid. It is wrapped in a SystemException catch that surfaces it as an invalid-syntax error to the user.","triggerScenarios":"Running `BCU-console uninstall <file>` where <file> is an exported uninstall list containing zero filter entries; the file deserialized to null; the file was manually edited and all filter entries were removed; passing a path to a non-list file that happens to parse to an empty list.","commonSituations":"User exported an empty selection from the BCU GUI; the wrong file was passed as the first argument (e.g. a settings file); the list file was truncated or corrupted so the filters section did not deserialize.","solutions":["Re-export the uninstall list from the BCU GUI with at least one application selected.","Open the file and confirm it contains filter entries; if it is empty or null-parsed, regenerate it.","Verify the file is a genuine BCU uninstall list (correct format) and not a different XML/JSON export.","Pass the correct list file path as the first positional argument."],"exampleFix":"// before\nbcu-uninstall empty.cuil  // list exported with no selection\n// after\n// In BCU GUI: select >=1 app, File > Export uninstall list, then:\nbcu-uninstall myapps.cuil","handlingStrategy":"validation","validationCode":"// Validate the list before driving the uninstall\nvar list = UninstallList.ReadFromFile(path);\nif (list == null || list.Filters.Count == 0)\n{\n    Console.Error.WriteLine($\"List file '{path}' contains no filters.\");\n    return 1;\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always export uninstall lists with at least one selected application.","Verify the list file size/content before scripting against it.","Pass the correct list path as the first positional argument."],"tags":["console","uninstall-list","input-validation","bcu-console"],"backgroundTag":null,"analyzedSha":"608321de98e92297377b1eb69029af55c25504a1","analyzedAt":"2026-08-13T12:17:35.389Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}