DarkMatterCore / nxdumptool

Generates XCI/NSP/HFS0/ExeFS/RomFS/Certificate/Ticket dumps from Nintendo Switch gamecards and installed SD/eMMC titles.
GNU General Public License v3.0
949 stars 74 forks source link

nxdumptool-rewrite - System crashes if Joy-con is disconnected during dumping while on airplane mode #145

Open RegisCasey opened 8 months ago

RegisCasey commented 8 months ago

Describe the bug The current build of NXDumpTool has a bug where if the system is set to "Airplane Mode", and the Joy-Cons were to disconnect while a dumping operation is happening, the Switch hard crashes and can only be powered off by holding the power button down for 10 seconds.

To Reproduce Steps to reproduce the behavior:

  1. Have "Airplane Mode" enabled.
  2. Proceed to dump a title (a game card in my case).
  3. Have a Joy-Con disconnect during the dumping process.
  4. Have the Horizon Airplane Mode error pop-up, and close the error.
  5. The system has now hard crashed.

Please fill the following information:

Video Clip https://github.com/DarkMatterCore/nxdumptool/assets/138264475/259961a1-3f26-423c-8eb1-f65a2e9546b8

Logfile nxdt_rw_poc[1].log

Additional context My launch model Switch has a slight defect where the left Joy-Con randomly "disconnects" from the system (this happened prior to hacking my system with the RCM jig), I was using emuMMC while on Airplane Mode, so any Joy-Con disconnects will momentarily interrupt the system. This Joy-Con disconnecting thing is out of my control (happens at random), and I am hesitant about sending my Switch off to Nintendo for repairs.

RegisCasey commented 8 months ago

I know this is a very oddly-specific (and unlikely) circumstance (and also beta builds tend to be buggy in general), but I'm submitting this report in case this is indicative of a much larger issue, and also to prevent this from possibly happening to anyone else

DarkMatterCore commented 8 months ago

Hi there. I've been trying to reproduce the issue on my own using my Erista unit (sysMMC, Atmosphère 1.6.2, flight mode enabled, latest rewrite build) and I can't get it to crash. I even reconnected both Joy-Cons to the console and took them out -- the process still continues just fine.

Since this appears to be a system-wide crash and no meaningful error information is part of your logfile, please take a look at the /atmosphere/fatal_errors/ directory in your SD card.

If there are too many files in there, just delete all of them (preferably using Hekate UMS) and reproduce the crash once more, then share the generated file(s) here.

Whovian9369 commented 8 months ago

Unable to reproduce here either.

RegisCasey commented 8 months ago

I've looked at the "fatal_errors" folder, but it appears to be empty. I don't homebrew the Switch often due to fear of bans, so I'm not sure if the logging is something that needs to be enabled or such (I don't mess with the defaults). It's possible it might have something to do with me using emuMMC and you using sysMMC (I'm too chicken to use CFW on sysMMC haha), but I'm not sure. If it's also worth nothing, my emuMMC was a "SD File" and not an "SD Partition".

Update: I've enabled debugmode_user in exosphere.ini, and I will try this glitch again. debugmode already appears to be enabled.

RegisCasey commented 8 months ago

Update: So I figured out that while dumping the game, NXDumpTool disables the recognition of most inputs (including the disconnection of the joy-cons). The homebrew program only seems to recognize the joy-cons were disconnected once the program is either done dumping the ROM, or encounters an error when reading the game card. If the program encounters an error when it is reading a game card (i.e. dirty contacts or outside interference) and prompts the "You must have Joy-Cons connected on flight mode" message, the progam hangs (along with all inputs) upon closing the OS pop-up, but I figured out that if you remove the game card, the program unhangs itself, since removing the game card forcefully cancels the dumping operation (holding down B doesn't seem to work). This was done for game card dumping though, but I'm not sure about digital title dumping.

Because the system never truly froze (NXDumpTool just disables virtually all buttons and inputs, mimicking a hard crash), there were no error logs to generate. It may be worth adding "removing the game card" as a possible "bug fix" if this issue becomes prevalent.