So I'm trying to make a rom hack of pokemon ultra moon where all battles are changed to double battles and changes to some pokemon to make them more viable. I used Pk3DS to unpack and edit the ROM. I've tried this before but last time when trying to rebuild the rom it would say: 'an unandled exeption has occured' just before closing Pk3DS entirely. I figured that I had done some weird input of some sort but I want to try to look what happened and figured it would be faster to just start fresh. So I got a fresh Ultra Moon ROM, changed some stuff and tried to rebuild it. But the same message occured. I didn't change to much but for some reason pk3ds just crashes when I try to rebuild, it works just fine if I rebuild just the romfs or exefs file. This is the entire message:
Exception Details:
System.NullReferenceException: Object reference not set to an instance of an object.
at pk3DS.Core.CTR.CTRUtil.setNCCH(String EXEFS_PATH, String ROMFS_PATH, String EXHEADER_PATH, String TB_Serial, String LOGO_NAME, ProgressBar PB_Show, RichTextBox TB_Progress)
at pk3DS.Core.CTR.CTRUtil.buildROM(Boolean Card2, String LOGO_NAME, String EXEFS_PATH, String ROMFS_PATH, String EXHEADER_PATH, String SERIAL_TEXT, String SAVE_PATH, Boolean trimmed, ProgressBar PB_Show, RichTextBox TB_Progress)
at pk3DS.Main.<>c__DisplayClass66_0.<B_Rebuild3DS_Click>b__0() in d:\a\1\s\pk3DS\Main.cs:line 1267
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
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\(my username)\Desktop\pk3DS (2)\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\(my username)\Desktop\pk3DS (2)\pk3DS\pk3DS.Core.dll
Accessibility, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Accessibility\v4.0_4.0.0.0__b03f5f7f11d50a3a\Accessibility.dll
--------------------
User Message:
An unhandled exception has occurred.
The program must now close.