Can't extract .3ds file - Bad IVFC header
I dumped my copy of Pokemon Y using a 2DS XL using this tutorial (https://3ds.hacks.guide/dumping-titles-and-game-cartridges) and tried to get pk3ds to extract it so I can start modding, but it keeps throwing an error right before it's done. It extracts some files, including a CXI (trying to extract the CXI causes the same error as extracting the 3ds file).
I searched around (including closed Github issues here) for this error and what it means, and all I could find was that somehow this is a bad dump. However, I couldn't find anything with the process that I might have done wrong, or anyone else indicating that the directions I used were incorrect or somehow invalid for this game, and the 3ds file seems to work okay when I convert it to a CIA and install it to the system.
The only thing I can think might have caused an issue is that the system is JP and the game is US, but after I installed hacks onto the system it seemed to play my games fine, so I don't think that's the problem.
I get this issue on Linux with Mono, Linux with WINE, and Windows 7 with dotNET 4.6.2.
Here's the error message:
Exception Details:
System.ArgumentException: Bad IVFC Header
at pk3DS.Core.CTR.RomFS.GetIVFCInfoFromBytes (System.Byte[] headerBytes) [0x00024] in <f8d9814adf6e49629963cad954f5c777>:0
at pk3DS.Core.CTR.RomFS.ExtractRomFS (System.String outputDirectory, System.Windows.Forms.RichTextBox TB_Progress, System.Windows.Forms.ProgressBar PB_Show) [0x00032] in <f8d9814adf6e49629963cad954f5c777>:0
at pk3DS.Core.CTR.NCCH.ExtractRomFS (System.String NCCH_PATH, System.String outputDirectory, System.Windows.Forms.RichTextBox TB_Progress, System.Windows.Forms.ProgressBar PB_Show) [0x00169] in <f8d9814adf6e49629963cad954f5c777>:0
at pk3DS.Core.CTR.NCCH.ExtractNCCHFromFile (System.String NCCH_PATH, System.String outputDirectory, System.Windows.Forms.RichTextBox TB_Progress, System.Windows.Forms.ProgressBar PB_Show) [0x00106] in <f8d9814adf6e49629963cad954f5c777>:0
at pk3DS.Core.CTR.NCSD.ExtractFilesFromNCSD (System.String NCSD_PATH, System.String outputDirectory, System.Windows.Forms.RichTextBox TB_Progress, System.Windows.Forms.ProgressBar PB_Show) [0x0007f] in <f8d9814adf6e49629963cad954f5c777>:0
at pk3DS.Main+<>c__DisplayClass27_0.<ExtractNCSD>b__0 () [0x00011] in <6de441ba090141ee910a51bf2f560705>:0
at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00017] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x0008d] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x00031] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
at System.Threading.ThreadHelper.ThreadStart () [0x0000b] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
Loaded Assemblies:
--------------------
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
/usr/lib/mono/4.5/mscorlib.dll
pk3DS, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
/home/cfalcon/ROM Images/Mods/Mod tools/pk3DS/pk3DS.exe
System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
/usr/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll
System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
/usr/lib/mono/gac/System.Windows.Forms/4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
/usr/lib/mono/gac/System.Drawing/4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
Accessibility, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
/usr/lib/mono/gac/Accessibility/4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
pk3DS.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
/home/cfalcon/ROM Images/Mods/Mod tools/pk3DS/pk3DS.Core.dll
Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756
/usr/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/Mono.Posix.dll
System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
/usr/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll
System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
/usr/lib/mono/gac/System.Configuration/4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756
/usr/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll
System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
/usr/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll
--------------------
User Message:
An unhandled exception has occurred.
The program must now close.
Forgot to mention - This was with the Aug 8, 2021 build from Azure.
Have you tried other unpacking tools to see if they work with your dump?
I don't know of any other unpacking tools besides the mount+extract method using GM9 that I linked to in issue #495. I can only assume that it's correct dump, because when I converted it to a CIA and installed it to home menu, it was able to get to the intro with no problems.