KillzXGaming / Switch-Toolbox

A tool to edit many video game file formats
GNU General Public License v3.0
946 stars 151 forks source link

Program crashing from failing to read configuration files. #166

Closed swampatha closed 4 years ago

swampatha commented 4 years ago

I downloaded the latest update today using the built-in updater and since then I've been getting this error on launch. It still boots, but I can't do anything without it crashing.:

Error

See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.

** Exception Text ** System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Windows\system32\Lib\Plugins\config.xml'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at System.Xml.XmlDocument.Save(String filename) at FirstPlugin.Config.StartupFromFile(String fileName) in C:\projects\switch-toolbox\File_Format_Library\Config.cs:line 22 at Toolbox.MainForm.LoadPLugins() in C:\projects\switch-toolbox\Toolbox\MainForm.cs:line 624 at Toolbox.MainForm.Form1_Load(Object sender, EventArgs e) in C:\projects\switch-toolbox\Toolbox\MainForm.cs:line 115 at System.Windows.Forms.Form.OnLoad(EventArgs e) at System.Windows.Forms.Form.OnCreateControl() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control.WmShowWindow(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.Form.WmShowWindow(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

** Loaded Assemblies ** mscorlib Assembly Version: 4.0.0.0 Win32 Version: 4.8.4075.0 built by: NET48REL1LAST CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll

Toolbox Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Users/nrams/Downloads/Toolbox-Latest/Toolbox.exe

System.Windows.Forms Assembly Version: 4.0.0.0 Win32 Version: 4.8.4042.0 built by: NET48REL1LAST_C CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

System Assembly Version: 4.0.0.0 Win32 Version: 4.8.4001.0 built by: NET48REL1LAST_C CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

System.Drawing Assembly Version: 4.0.0.0 Win32 Version: 4.8.3761.0 built by: NET48REL1 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

Toolbox.Library Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Users/nrams/Downloads/Toolbox-Latest/Toolbox.Library.DLL

Microsoft.VisualBasic Assembly Version: 10.0.0.0 Win32 Version: 14.8.3761.0 built by: NET48REL1 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll

System.Core Assembly Version: 4.0.0.0 Win32 Version: 4.8.4075.0 built by: NET48REL1LAST CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll

System.Xml Assembly Version: 4.0.0.0 Win32 Version: 4.8.3761.0 built by: NET48REL1 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

DirectXTexNetImpl Assembly Version: 1.0.0.3 Win32 Version: CodeBase: file:///C:/Users/nrams/Downloads/Toolbox-Latest/x64/DirectXTexNetImpl.dll

System.Configuration Assembly Version: 4.0.0.0 Win32 Version: 4.8.3761.0 built by: NET48REL1 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

OpenTK Assembly Version: 3.0.1.0 Win32 Version: 3.0.1 CodeBase: file:///C:/Users/nrams/Downloads/Toolbox-Latest/Lib/OpenTK.dll

Octokit Assembly Version: 0.31.0.0 Win32 Version: 0.31.0.0 CodeBase: file:///C:/Users/nrams/Downloads/Toolbox-Latest/Octokit.DLL

SFGraphics Assembly Version: 1.0.6956.42501 Win32 Version: 1.0.6956.42501 CodeBase: file:///C:/Users/nrams/Downloads/Toolbox-Latest/Lib/SFGraphics.dll

OpenTK.GLControl Assembly Version: 3.0.1.0 Win32 Version: 3.0.1 CodeBase: file:///C:/Users/nrams/Downloads/Toolbox-Latest/Lib/OpenTK.GLControl.dll

System.Net.Http Assembly Version: 4.0.0.0 Win32 Version: 4.8.3761.0 built by: NET48REL1 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Net.Http/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Net.Http.dll

FirstPlugin.Plg Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Users/nrams/Downloads/Toolbox-Latest/Lib/Plugins/FirstPlugin.Plg.dll

GL_EditorFramework Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Users/nrams/Downloads/Toolbox-Latest/GL_EditorFramework.DLL

FlatBuffers Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Users/nrams/Downloads/Toolbox-Latest/Lib/Plugins/FlatBuffers.DLL

Syroot.Maths Assembly Version: 1.5.3.0 Win32 Version: 1.5.3.0 CodeBase: file:///C:/Users/nrams/Downloads/Toolbox-Latest/Lib/Plugins/Syroot.Maths.DLL

WeifenLuo.WinFormsUI.Docking Assembly Version: 3.0.6.0 Win32 Version: 3.0.6.0 CodeBase: file:///C:/Users/nrams/Downloads/Toolbox-Latest/Lib/Plugins/WeifenLuo.WinFormsUI.Docking.DLL

Syroot.NintenTools.NSW.Bfres Assembly Version: 1.2.3.0 Win32 Version: 1.2.3.0 CodeBase: file:///C:/Users/nrams/Downloads/Toolbox-Latest/Lib/Syroot.NintenTools.NSW.Bfres.dll

Syroot.NintenTools.Bfres Assembly Version: 1.2.3.0 Win32 Version: 1.2.3.0 CodeBase: file:///C:/Users/nrams/Downloads/Toolbox-Latest/Lib/Syroot.NintenTools.Bfres.dll

BcresLibrary Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Users/nrams/Downloads/Toolbox-Latest/Lib/Plugins/BcresLibrary.DLL

Syroot.NintenTools.NSW.Bntx Assembly Version: 1.2.3.0 Win32 Version: 1.2.3.0 CodeBase: file:///C:/Users/nrams/Downloads/Toolbox-Latest/Lib/Syroot.NintenTools.NSW.Bntx.dll

Syroot.BinaryData Assembly Version: 2.0.1.0 Win32 Version: 2.0.1.0 CodeBase: file:///C:/Users/nrams/Downloads/Toolbox-Latest/Lib/Syroot.BinaryData.dll

Anonymously Hosted DynamicMethods Assembly Assembly Version: 0.0.0.0 Win32 Version: 4.8.4075.0 built by: NET48REL1LAST CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_64/mscorlib/v4.0_4.0.0.0__b77a5c561934e089/mscorlib.dll

Syroot.NintenTools.MarioKart8 Assembly Version: 0.5.2.0 Win32 Version: 0.5.2.0 CodeBase: file:///C:/Users/nrams/Downloads/Toolbox-Latest/Lib/Syroot.NintenTools.MarioKart8.dll

** JIT Debugging ** To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled.

For example:

When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box.

KillzXGaming commented 4 years ago

Make sure to get the zip from the releases, right click properties and check "unblock", then extract the files again. It probably has permission issues with the config files being saved or read.

KillzXGaming commented 4 years ago

The latest update should prevent this error from happening (it will load default settings if files cannot be created) https://github.com/KillzXGaming/Switch-Toolbox/commit/7c396674f024c0ef9ca711a800b207c44051754a

swampatha commented 4 years ago

A clean install did in fact fix this issue with the latest update. Thank you!