{"record":{"id":"933f7d6167c3cbe3","repo":"BCUninstaller/Bulk-Crap-Uninstaller","slug":"uninstaller-timed-out","errorCode":null,"errorMessage":"Uninstaller timed out","messagePattern":"Uninstaller timed out","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"source/UninstallTools/Uninstaller/BulkUninstallEntry.cs","lineNumber":379,"sourceCode":"                            }\r\n                        }\r\n\r\n                        // Check for deadlocks during silent uninstall. Prevents the task from getting stuck \r\n                        // idefinitely on stuck uninstallers and unrelated processes spawned by uninstallers.\r\n                        if (checkCounters)\r\n                        {\r\n                            var processNames = SafeGetProcessNames(watchedProcesses);\r\n\r\n                            if (TestUninstallerForStalls(processNames))\r\n                                idleCounter++;\r\n                            else\r\n                                idleCounter = 0;\r\n\r\n                            // Kill the uninstaller (and children) if they were idle/stalled for too long\r\n                            if (idleCounter > 30)\r\n                            {\r\n                                KillProcesses(watchedProcesses);\r\n                                throw new IOException(Localisation.UninstallError_UninstallerTimedOut);\r\n                            }\r\n                        }\r\n                        else Thread.Sleep(1000);\r\n\r\n                        // Kill the uninstaller (and children) if user told us to or if it was idle for too long\r\n                        if (_skipLevel == SkipCurrentLevel.Terminate)\r\n                        {\r\n                            if (UninstallerEntry.UninstallerKind == UninstallerType.Msiexec)\r\n                                watchedProcesses.AddRange(Process.GetProcessesByName(\"Msiexec\"));\r\n\r\n                            KillProcesses(watchedProcesses);\r\n                            break;\r\n                        }\r\n                    }\r\n\r\n                    if (_skipLevel == SkipCurrentLevel.None)\r\n                    {\r\n                        var exitVar = uninstaller.ExitCode;\r","sourceCodeStart":361,"sourceCodeEnd":397,"githubUrl":"https://github.com/BCUninstaller/Bulk-Crap-Uninstaller/blob/608321de98e92297377b1eb69029af55c25504a1/source/UninstallTools/Uninstaller/BulkUninstallEntry.cs#L361-L397","documentation":"In the uninstaller-watch loop, BulkUninstallEntry polls the spawned uninstaller processes; if TestUninstallerForStalls returns true for more than 30 consecutive iterations (idleCounter > 30), it kills them and throws IOException using Localisation.UninstallError_UninstallerTimedOut. This is the stall-detection safeguard that prevents a hung uninstaller from blocking a bulk run indefinitely.","triggerScenarios":"A spawned uninstaller process (or its child processes) is running but making no progress — e.g. it opened a modal dialog waiting for input, deadlocked, or is waiting on a network resource — so TestUninstallerForStalls keeps returning true and the counter exceeds 30 within the ~1s poll interval.","commonSituations":"Uninstaller shows a hidden 'Are you sure?' prompt behind the main window; the installer is waiting for a locked file; a child process (e.g. Msiexec) is idle on a custom action; silent uninstall flags were not honoured by the vendor installer.","solutions":["Increase the stall tolerance / run the same uninstaller interactively (non-quiet) to see what it is waiting on, then supply the right silent flag or pre-answer its prompt.","Close other apps that may hold files the uninstaller needs, and run with elevation.","Catch IOException for this timeout, mark the entry as 'needs manual uninstall', and continue the bulk run rather than aborting all remaining entries."],"exampleFix":"// before\nvar result = manager.RunUninstaller(entry, options);\n\n// after\ntry { var result = manager.RunUninstaller(entry, options); }\ncatch (IOException ex) when (ex.Message.Contains(Localisation.UninstallError_UninstallerTimedOut))\n{\n    entry.MarkManualUninstall(\"Uninstaller stalled; run interactively.\");\n    continue;\n}","handlingStrategy":"try-catch","validationCode":"null","typeGuard":"null","tryCatchPattern":"try { manager.RunUninstaller(entry, options); }\ncatch (IOException ex) when (ex.Message.Contains(Localisation.UninstallError_UninstallerTimedOut))\n{\n    entry.MarkManualUninstall(\"Uninstaller stalled; run interactively.\");\n}","preventionTips":["Run interactive (non-quiet) first to discover hidden prompts the silent flags do not suppress.","Close other apps and services that may hold files the uninstaller needs.","Surface a 'continue bulk run' option on timeout instead of aborting."],"tags":["uninstaller","io-exception","timeout","stall-detection","process-management"],"backgroundTag":null,"analyzedSha":"608321de98e92297377b1eb69029af55c25504a1","analyzedAt":"2026-08-13T12:17:35.389Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}