kwsch / pkNX

Pokémon (Nintendo Switch) ROM Editor & Randomizer
https://projectpokemon.org/home/forums/topic/48647-pknx-nintendo-switch-rom-editor-randomizer/
GNU General Public License v3.0
352 stars 108 forks source link

Cannot edit file in pkNX, dumped multiple times still doesnt work. #150

Closed smrtg closed 3 years ago

smrtg commented 3 years ago

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

** Exception Text ** System.IO.FileNotFoundException: Could not find file 'C:\Users\spyfr\Desktop\shield\ExeFS\main.npdm'. File name: 'C:\Users\spyfr\Desktop\shield\ExeFS\main.npdm' 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.File.InternalReadAllBytes(String path, Boolean checkHost) at pkNX.Game.GameLocation.g__GetTitleID|22_0(<>cDisplayClass22_0& ) at pkNX.Game.GameLocation.GetGameFromCount(Int32 fileCount, String romfs, String exefs) at pkNX.Game.GameLocation.GetGame(String dir) at pkNX.WinForms.Controls.EditorBase.GetEditor(String loc, Int32 language) at pkNX.WinForms.Main.OpenFolder(String path) at pkNX.WinForms.Main.Menu_Open_Click(Object sender, EventArgs e) 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 Assembly Version: 4.0.0.0 Win32 Version: 4.8.4341.0 built by: NET48REL1LAST_C CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll

pkNX Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Users/spyfr/Downloads/pkNX/pkNX/net461/pkNX.exe

System.Windows.Forms Assembly Version: 4.0.0.0 Win32 Version: 4.8.4341.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.4300.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.4084.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

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

System.Core Assembly Version: 4.0.0.0 Win32 Version: 4.8.4341.0 built by: NET48REL1LAST_C 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.4084.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

System.Resources.Extensions Assembly Version: 5.0.0.0 Win32 Version: 5.0.20.51904 CodeBase: file:///C:/Users/spyfr/Downloads/pkNX/pkNX/net461/System.Resources.Extensions.DLL

System.Memory Assembly Version: 4.0.1.1 Win32 Version: 4.6.28619.01 CodeBase: file:///C:/Users/spyfr/Downloads/pkNX/pkNX/net461/System.Memory.DLL

System.Runtime.CompilerServices.Unsafe Assembly Version: 4.0.4.1 Win32 Version: 4.6.28619.01 CodeBase: file:///C:/Users/spyfr/Downloads/pkNX/pkNX/net461/System.Runtime.CompilerServices.Unsafe.DLL

System.Numerics.Vectors Assembly Version: 4.1.4.0 Win32 Version: 4.6.26515.06 CodeBase: file:///C:/Users/spyfr/Downloads/pkNX/pkNX/net461/System.Numerics.Vectors.DLL

pkNX.Structures Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Users/spyfr/Downloads/pkNX/pkNX/net461/pkNX.Structures.DLL

pkNX.Game Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Users/spyfr/Downloads/pkNX/pkNX/net461/pkNX.Game.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.

sora10pls commented 3 years ago

You’re not using the latest commits. This has already been fixed: https://github.com/kwsch/pkNX/commit/ae42c5ea45def573359627915e16dbc034bd0629

smrtg commented 3 years ago

You’re not using the latest commits. This has already been fixed: ae42c5e

I'm using the latest version on azure or whatever that site is. Dunno how to compile stuff from github

sora10pls commented 3 years ago

Unable to replicate using the latest build from Azure Pipelines. image

You're either not using the latest build, or your ExeFS dump is incomplete (missing main.npdm).

smrtg commented 3 years ago

Went from the guide to the azure link provided there, clicked on the latest one uploaded on April 22nd and I'm getting this error.

On Sat, 1 May 2021, 22:06 Matt, @.***> wrote:

Unable to replicate using the latest build from Azure Pipelines. My original comment still stands. [image: image] https://user-images.githubusercontent.com/17801814/116792467-bd1ffc00-aa8e-11eb-895b-837f838dc538.png

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kwsch/pkNX/issues/150#issuecomment-830679622, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHMQIBS2OFV6FW4R5UWRQW3TLRGLLANCNFSM436NNPMA .

sora10pls commented 3 years ago

As I mentioned, it could also mean that your ExeFS dump is incomplete. Either re-dump ExeFS with hactool or nxdumptool, or exclude it from your loaded ROM (pkNX doesn't offer any ExeFS editing for SWSH at the moment, anyway).

smrtg commented 3 years ago

That file does exist in my ExeFS folder, so i dont know why its saying its missing. Without the ExeFS folder i get this 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:\Users\spyfr\Desktop\shield\RomFS\bin\message\English\common'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileSystemEnumerableIterator1.CommonInit() at System.IO.FileSystemEnumerableIterator1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler1 resultHandler, Boolean checkHost) at System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption) at pkNX.Containers.FolderContainer.Initialize(Func2 filter) at pkNX.Game.GameManager.GetFilteredFolder(GameFile type, Func`2 filter) at pkNX.Game.GameManagerSWSH.Initialize() at pkNX.Game.GameManager..ctor(GameLocation rom, Int32 language) at pkNX.Game.GameManager.GetManager(GameLocation loc, Int32 language) at pkNX.WinForms.Controls.EditorBase.GetEditor(String loc, Int32 language) at pkNX.WinForms.Main.OpenFolder(String path) at pkNX.WinForms.Main.Menu_Open_Click(Object sender, EventArgs e) 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 Assembly Version: 4.0.0.0 Win32 Version: 4.8.4341.0 built by: NET48REL1LAST_C CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll

pkNX Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Users/spyfr/Downloads/pkNX/pkNX/net461/pkNX.exe

System.Windows.Forms Assembly Version: 4.0.0.0 Win32 Version: 4.8.4341.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.4300.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.4084.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

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

System.Core Assembly Version: 4.0.0.0 Win32 Version: 4.8.4341.0 built by: NET48REL1LAST_C 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.4084.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

System.Resources.Extensions Assembly Version: 5.0.0.0 Win32 Version: 5.0.20.51904 CodeBase: file:///C:/Users/spyfr/Downloads/pkNX/pkNX/net461/System.Resources.Extensions.DLL

System.Memory Assembly Version: 4.0.1.1 Win32 Version: 4.6.28619.01 CodeBase: file:///C:/Users/spyfr/Downloads/pkNX/pkNX/net461/System.Memory.DLL

System.Runtime.CompilerServices.Unsafe Assembly Version: 4.0.4.1 Win32 Version: 4.6.28619.01 CodeBase: file:///C:/Users/spyfr/Downloads/pkNX/pkNX/net461/System.Runtime.CompilerServices.Unsafe.DLL

System.Numerics.Vectors Assembly Version: 4.1.4.0 Win32 Version: 4.6.26515.06 CodeBase: file:///C:/Users/spyfr/Downloads/pkNX/pkNX/net461/System.Numerics.Vectors.DLL

pkNX.Structures Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Users/spyfr/Downloads/pkNX/pkNX/net461/pkNX.Structures.DLL

pkNX.Game Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Users/spyfr/Downloads/pkNX/pkNX/net461/pkNX.Game.DLL

pkNX.Containers Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Users/spyfr/Downloads/pkNX/pkNX/net461/pkNX.Containers.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.

IMG_20210501_222838

kwsch commented 3 years ago

Probably OneDrive isn't storing your desktop files locally on your hard drive.

The error messages are pretty clear.

smrtg commented 3 years ago

I don't even have one drive installed. I know that the error message says it can't find a file or smth, but I have no idea why

On Sat, 1 May 2021, 22:39 Kurt, @.***> wrote:

Probably OneDrive isn't storing your desktop files locally on your hard drive.

The error messages are pretty clear.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kwsch/pkNX/issues/150#issuecomment-830683790, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHMQIBULPXU4B7LRUDXRN43TLRKI5ANCNFSM436NNPMA .

kwsch commented 3 years ago

Files don't magically not exist. Confirm that files are present in the folder, and that you're using the complete unpacked game with the latest patch content.

smrtg commented 3 years ago

I have checked and I have dumped the game multiple times. With nxdumptool, choosing the update (and not a dlc or smth like that) and trying to open on in the latest version of pkNX from azure. The files do exist in their respective folders when I manually check and I have no cloud storage thingies so all my files are definitely local.

On Sun, 2 May 2021, 01:46 Kurt, @.***> wrote:

Files don't magically not exist. Confirm that files are present in the folder, and that you're using the complete unpacked game with the latest patch content.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kwsch/pkNX/issues/150#issuecomment-830704829, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHMQIBWUCXMSS3R37THTS6LTLSACXANCNFSM436NNPMA .

kwsch commented 3 years ago

Screenshot the file inside the folder, please. Need a full screenshot; so redact any personal information.

OneDrive is installed by default on all Windows 10 machines.

I'd still advise not storing dumped data on your desktop; better to be near the root of the drive.

smrtg commented 3 years ago

I have uninstalled OneDrive from my pc myself. I moved the folder to the root of my drive still the same issue. Here are some screenshots of RomFS/"gameid"/bin/message/English/common, aka the folder in the error. https://gyazo.com/bc318d4ae0af893aecfb54835105b8c7 https://gyazo.com/fbbb5e0ae24398fa522ae395b80aab0a https://gyazo.com/6485e5da5549f5bba35f60dd86df0dc8

kwsch commented 3 years ago

image

image

These aren't the same folder (UPD, v+numbers). The update has to be merged into the base ROM's content, yielding a complete ROM on the latest patch. The inside of the exefs/romfs folders should not contain any user-renamed files/folders.

smrtg commented 3 years ago

I just moved the same folder to the root of the drive as you told me before the screen shots.

On Sun, 2 May 2021, 02:25 Kurt, @.***> wrote:

[image: image] https://user-images.githubusercontent.com/6393368/116797344-961af780-aa99-11eb-9296-6a007becf216.png

[image: image] https://user-images.githubusercontent.com/6393368/116797348-a3d07d00-aa99-11eb-8393-937e8294c8c5.png

These aren't the same folder (UPD, v+numbers). The update has to be merged into the base ROM's content, yielding a complete ROM on the latest patch.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kwsch/pkNX/issues/150#issuecomment-830708523, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHMQIBWTBKK4WY3WXC7KPMTTLSEVNANCNFSM436NNPMA .

smrtg commented 3 years ago

Though I just noticed that the pok_mon folder isn't mentioned on the error at all. What the?

smrtg commented 3 years ago

Okay it worked now, I moved the folders inside the pok_mon folder up to the main romfs folder and now it works. The problem was the pok_mon folder. PkNX was trying to find romfs/bin but after the dump the folder was romfs/pok_mon/bin

wess9595 commented 2 years ago

hi, i recently have the same problem but dont know what exactly have to do :( , have to say that i recently unistall one drive because that cause a lot of problems with the function of my laptop, so please tell me that o dont have to reinstall one drive :.(

-the process i do -open yuzu -dump romfs pokemon sword from yuzu -full -it appear a folder "romfs" and create other folder "exefs" -then when u try to use pknx that show me that error message

image

duckdoom4 commented 2 years ago

@wess9595 If you click OK, can you still press "File -> Open..."? If so you can select the new location of your dumped files. As the error is telling you, it's looking for a file in your OneDrive folder. Probably because you had it located there before.

wess9595 commented 2 years ago

oh how can i change the locagion of dumped files? sorry im new of this :(

duckdoom4 commented 2 years ago

press "File -> Open..."

wess9595 commented 2 years ago

ok

wess9595 commented 2 years ago

image

duckdoom4 commented 2 years ago

Yes, now select the folder with your dumped files

wess9595 commented 2 years ago

ok it selected

wess9595 commented 2 years ago

image

wess9595 commented 2 years ago

bro?

duckdoom4 commented 2 years ago

That's it, just press okay.

Don't be afraid to try something, you can't go wrong. 😉 Same for error msgs, just read them. Sometimes the give you the answer you're looking for.

wess9595 commented 2 years ago

mm but still show mw this

image

duckdoom4 commented 2 years ago

Okay, in that case you might be selecting a folder shortcut that no longer exists. You have to select the full folder path

wess9595 commented 2 years ago

have to do file - open again+ from pknx right?

duckdoom4 commented 2 years ago

I've push a new code change that will help me, help you.

Could you please update your pkNX with the link below:

https://dev.azure.com/project-pokemon/pkNX/_build/results?buildId=5610&view=artifacts&pathAsName=false&type=publishedArtifacts

wess9595 commented 2 years ago

prees template button?

image

duckdoom4 commented 2 years ago

No, File -> Open

wess9595 commented 2 years ago

ok

image

duckdoom4 commented 2 years ago

Yes, now click select folder

wess9595 commented 2 years ago

ok

image

duckdoom4 commented 2 years ago

I mean the button next to cancel

wess9595 commented 2 years ago

:'( god :'(

image

duckdoom4 commented 2 years ago

You're looking at your one drive desktop folder. That folder doesn't exist.

I can tell because the message shows C:\Users\webst\-->OneDrive<--.

You have to select the correct location of the dumped files. The location where yuzu placed your dump

wess9595 commented 2 years ago

yeah but i dont know why it still open in that dam folder :(

duckdoom4 commented 2 years ago

Because it's a fake folder. Windows for some reason kept the shortcut to your one drive folders. You should delete it

duckdoom4 commented 2 years ago

Please Open file explorer; image Go to Local Disk (C:) image

wess9595 commented 2 years ago

image ok

duckdoom4 commented 2 years ago

Users image

Go to webst

Click OneDrive image

And delete that folder

wess9595 commented 2 years ago

ok its already delete

duckdoom4 commented 2 years ago

Ok, now show me the full path to your dumps in explorer

wess9595 commented 2 years ago

bro all files have been deleted

image

duckdoom4 commented 2 years ago

Yes, good, because again, you are looking at the wrong folder. Go to C:\Users\webst\Desktop <- that's the correct desktop folder

wess9595 commented 2 years ago

all my desktop hace been deleted :,d

image

duckdoom4 commented 2 years ago

Did you have one of those "zero hard drive space, so you're forced to use one drive" laptops?