kwsch / pk3DS

Pokémon (3DS) ROM Editor & Randomizer
https://projectpokemon.org/forums/forums/topic/34377-pk3ds-xyoras-rom-editor-randomizer/
Other
404 stars 150 forks source link

Can't access bakinfo.txt #474

Closed Eddiemate closed 3 years ago

Eddiemate commented 3 years ago

Whenever I try opening some rom files, I get this same error message. Trying to continue and edit the files after this error makes it so the program literally cannot open without deleting the rom files. I haven't found a way to fix this myself, so I'm hoping there's some fix for it. I'm using the latest version from pipelines, but I found that the version didn't matter.

Exception Details: System.UnauthorizedAccessException: Access to the path 'C:\Users\Gamer\Desktop\pk3DS\backup\MoonHack\bakinfo.txt' is denied. 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, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost) at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost) at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost) at pk3DS.Main.openQuick(String path) in d:\a\1\s\pk3DS\Main.cs:line 231 at pk3DS.Main.B_Open_Click(Object sender, EventArgs e) in d:\a\1\s\pk3DS\Main.cs:line 102 at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e) at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e) at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea) at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ToolStrip.WndProc(Message& m) at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Loaded Assemblies:

mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll

pk3DS, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null C:\Users\Gamer\Desktop\pk3DS\pk3DS.exe

System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll

System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll

System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll

System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll

System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll

System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll

pk3DS.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null C:\Users\Gamer\Desktop\pk3DS\pk3DS.Core.dll


User Message: An unhandled exception has occurred. You can continue running the program (albeit with potential side-effects), but please report this error.

kwsch commented 3 years ago

at pk3DS.Main.openQuick(String path) in d:\a\1\s\pk3DS\Main.cs:line 231

Why are you using an old version?

Anyways, pk3DS requires r/w access to files in its directory & the ROM it is editing.

https://stackoverflow.com/a/24796126

Make sure it can modify files where it needs to.

Eddiemate commented 3 years ago

Like I said, this was the newest version on the Pipelines link shared on projectpokemon. This is the only way I know to get versions of pk3ds since the github repository doesn't feature downloads and I don't know how to take the code and use it to create the most up to date version.

But this did help me realise that the pk3ds folder continues to set itself to read-only, so this definitely was user error. My bad.