{"record":{"id":"cb1c05792a58a315","repo":"lucasg/Dependencies","slug":"0-s-is-not-present-on-the-disk","errorCode":null,"errorMessage":"{0:s} is not present on the disk","messagePattern":"(.+?) is not present on the disk","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"DependenciesGui/DependencyWindow.xaml.cs","lineNumber":552,"sourceCode":"\t\t\tif (CustomSearchFolders != null)\n\t\t\t{\n\t\t\t\tthis.CustomSearchFolders = CustomSearchFolders;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.CustomSearchFolders = new List<string>();\n\t\t\t}\n\t\t\t\n\t\t\tthis.Filename = Filename;\n\t\t\tthis.WorkingDirectory = Path.GetDirectoryName(this.Filename);\n\t\t\tInitializeView();\n        }\n\n        public void InitializeView()\n        {\n            if (!NativeFile.Exists(this.Filename))\n            {\n                MessageBox.Show(\n                    String.Format(\"{0:s} is not present on the disk\", this.Filename),\n                    \"Invalid PE\",\n                    MessageBoxButton.OK\n                );\n\n                return;\n            }\n\n            this.Pe = (Application.Current as App).LoadBinary(this.Filename);\n\t\t\tif (this.Pe == null || !this.Pe.LoadSuccessful)\n\t\t\t{\n                MessageBox.Show(\n                    String.Format(\"{0:s} is not a valid PE-COFF file\", this.Filename),\n                    \"Invalid PE\",\n                    MessageBoxButton.OK\n                );\n\n                return;","sourceCodeStart":534,"sourceCodeEnd":570,"githubUrl":"https://github.com/lucasg/Dependencies/blob/1997a40000b77bd3326cbc33672a7b9f78bb23f3/DependenciesGui/DependencyWindow.xaml.cs#L534-L570","documentation":"Shown by DependencyWindow.InitializeView (DependenciesGui/DependencyWindow.xaml.cs:552) when NativeFile.Exists(this.Filename) is false for the PE passed to the window constructor. A modal MessageBox ('Invalid PE') is shown and InitializeView returns before any analysis runs.","triggerScenarios":"Constructing a DependencyWindow with a path that does not exist or is a directory (NativeFile.Exists rejects directories too); drag-drop of a moved file; command-line arg pointing at a gone path.","commonSituations":"File deleted between selection and window creation; recent-files entry pointing at a removed path; relative path resolved against an unexpected working directory.","solutions":["Confirm the file still exists at the given path before opening.","Remove the stale recent-files entry that produced the bad path.","Re-drop or re-open the file from its current location."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Validate before constructing/opening the DependencyWindow.\nif (!NativeFile.Exists(filename))\n{\n    MessageBox.Show($\"{filename} is not present on the disk\", \"Invalid PE\", MessageBoxButton.OK);\n    return;\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Re-check NativeFile.Exists immediately before opening since files can disappear between selection and window construction.","Purge stale paths from the recent-files list when they repeatedly fail."],"tags":["gui","file-not-found","invalid-pe"],"backgroundTag":null,"analyzedSha":"1997a40000b77bd3326cbc33672a7b9f78bb23f3","analyzedAt":"2026-08-13T18:14:41.696Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}