Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
RegisCasey opened this issue Nov 5, 2023 · 6 comments
Labels
invalid This doesn't seem right question Further information is requested

Comments

@RegisCasey
Copy link

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:

  • Horizon OS (Switch FW) version: [e.g. 17.0.0]
  • CFW: [Atmosphère]
  • CFW version: [1.6.2 (EmuMMC)]
  • Atmosphère launch method (if applicable): [Hekate]
  • nxdumptool version: [2.0.0]
  • Homebrew launch method: [title override]
  • Source storage used with the application (if applicable): [gamecard]
  • SD card specs: [SanDisk ImageMate 400gb A1]

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 RegisCasey added the bug Something isn't working label Nov 5, 2023
@RegisCasey
Copy link
Author

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
Copy link
Owner

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
Copy link
Collaborator

Unable to reproduce here either.

@DarkMatterCore DarkMatterCore added the question Further information is requested label Nov 5, 2023
@RegisCasey
Copy link
Author

RegisCasey commented Nov 5, 2023

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
Copy link
Author

RegisCasey commented Nov 5, 2023

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.

@DarkMatterCore
Copy link
Owner

Sorry for the long delay. Life's keeping me busy.

Update: So I figured out that while dumping the game, NXDumpTool disables the recognition of most inputs (including the disconnection of the joy-cons).

That's not exactly how it works. nxdumptool only disables HOME button inputs -- all other buttons still work, but it's possible they give off the impression that they don't because only B button reads are being carried out during a dump process (e.g. to determine whether the ongoing dump process should be cancelled or not). All other buttons are ignored because they're not needed at that specific point.

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).

System-wide error messages like the one you mention are triggered and displayed by Horizon OS itself, not by the application that's running at that exact point. It sounds like your Joy-Con rails may be a bit worn out.


To be honest, I still don't know what's happening here nor why is it happening, given that me and others have been unable to reproduce the issue and your logfile doesn't really provide any clear reason for this behavior. I'd like to know if you can consistently reproduce the problem with one of the newer builds.

@DarkMatterCore DarkMatterCore added invalid This doesn't seem right and removed bug Something isn't working labels Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants