Atmosphere-NX / Atmosphere

Atmosphère is a work-in-progress customized firmware for the Nintendo Switch.
GNU General Public License v2.0
14.44k stars 1.22k forks source link

BCat Persistent Delayed System Crash (2002-4373 0x222a02 010000000000000C) #2158

Closed HeyItsJono closed 1 year ago

HeyItsJono commented 1 year ago

Bug Report

What's the issue you encountered?

A delayed persistent system crash. Upon booting into Atmosphere EmuMMC (partition-based, Fat32) I can use my system for about 3 seconds before a crash always occurs.

Error Code: 2002-4373 (0x222a02)

Program: 010000000000000C

Firmware: 16.0.2 (atmosphere 1.5.3-master-8e042f226)

Usually errors like this can be solved by removing the corresponding program's folder from the atmosphere/contents folder but in this circumstance no such 010000000000000C folder exists. Indeed even renaming the entire contents folder doesn't fix the issue.

In my search I have found 010000000000000C corresponds to bcat, and the error code indicates some kind of read/write save error. I'm unsure how to proceed in resolving this though. The issue just started happening after my Switch ran out of power, it's never happened before. It was working fine prior to this, no files have been changed.

I feel my emuMMC isn't corrupted as I am able to use it normally, albeit very briefly, before the crash kicks in 3 seconds later. I can even open Hblauncher if I am fast enough.

How can the issue be reproduced?

Boot atmosphere either via Hekate or directly via fusee.

System crashes seconds after startup.

Crash Report

Will provide tomorrow once I have access to my laptop.

System Firmware Version

16.0.2

Environment?

Additional context?

PXL_20230621_152203612

SciresM commented 1 year ago

2002-4373 is fs::ResultUnclearedSaveDataRealDataVerificationFailed().

Your save data is corrupt.

You'll need to delete the corrupted save file, else re-clone your emummc from your non-corrupted sysmmc.

Closing, because this isn't an atmosphere bug, and the issue tracker is for bugs, not for support.

SciresM commented 1 year ago

(The specific corrupt save file will be some one bcat is accessing, probably inferrable from the report).

HeyItsJono commented 1 year ago

(The specific corrupt save file will be some one bcat is accessing, probably inferrable from the report).

Thank you so much for the reply and the nudge in the right direction, my apologies for posting this here incorrectly, I was unsure where the suitable area to ask for help might be. I know you're busy and this issue is closed but is there any chance you might be able to help me figure out which title has the corrupted save data on the basis of the crash reports? I'm struggling to find a title ID in there, and if I know which it is I might be able to just delete that save data via NxNandManager and save myself hours of work of recloning.

01687362168_010000000000000c.log

01687360021_010000000000000c.log

Alternatively is there a way to temporarily disable bcat so I can use the system normally without it crashing, at least until I figure out the culprit?

EDIT:

I still had no luck trying to decipher the crash reports, but after much digging I think I found the culprit save file(s). They are in EmuMMC SYSTEM /saves directory under the names:

80000000000000a0
80000000000000a1
80000000000000a2
80000000000000f0

Removing these has stopped bcat from crashing the system on startup. I'm unsure which of them specifically has stopped the crashing, or what system data I have compromised by removing them, but the system appears to work for now. I determined these files should be deleted after finding a GBATemp Post and a homebrew tool that seem to suggest those system save files are in some way related to bcat, so I decided to try removing them.

I did this by mounting the EmuMMC via Hekate's USB Mount (with Read-only disabled), then opening it as a drive in NxNandManager, mounting the System partition (again, not as read-only), then opening the saves directory. I backed the files up to my computer then removed them from the saves directory. I suppose this could also be done on the switch with TegraExplorer.

I had first previously tried removing any saves that NxNandManager listed as BcatDeliveryCacheStorage when exploring USER saves but this had done nothing to fix the issue, and now that the system is working again I have restored them without the issue recurring, so I can confirm they don't contribute to this error.

I leave this here in the hopes that it may help another user with this issue; as anyone else online who has documented this has only been able to recover by a full EmuMMC reclone or initialising their EmuMMC, both of which are a huge headache because of all the data you lose.

Ammako commented 1 year ago

It won't hurt anything btw. This just clears your play data logs. So unless you care about preserving an accurate play history, you're good.

AntonFilip commented 1 month ago

(The specific corrupt save file will be some one bcat is accessing, probably inferrable from the report).

Thank you so much for the reply and the nudge in the right direction, my apologies for posting this here incorrectly, I was unsure where the suitable area to ask for help might be. I know you're busy and this issue is closed but is there any chance you might be able to help me figure out which title has the corrupted save data on the basis of the crash reports? I'm struggling to find a title ID in there, and if I know which it is I might be able to just delete that save data via NxNandManager and save myself hours of work of recloning.

01687362168_010000000000000c.log

01687360021_010000000000000c.log

Alternatively is there a way to temporarily disable bcat so I can use the system normally without it crashing, at least until I figure out the culprit?

EDIT:

I still had no luck trying to decipher the crash reports, but after much digging I think I found the culprit save file(s). They are in EmuMMC SYSTEM /saves directory under the names:

80000000000000a0
80000000000000a1
80000000000000a2
80000000000000f0

Removing these has stopped bcat from crashing the system on startup. I'm unsure which of them specifically has stopped the crashing, or what system data I have compromised by removing them, but the system appears to work for now. I determined these files should be deleted after finding a GBATemp Post and a homebrew tool that seem to suggest those system save files are in some way related to bcat, so I decided to try removing them.

I did this by mounting the EmuMMC via Hekate's USB Mount (with Read-only disabled), then opening it as a drive in NxNandManager, mounting the System partition (again, not as read-only), then opening the saves directory. I backed the files up to my computer then removed them from the saves directory. I suppose this could also be done on the switch with TegraExplorer.

I had first previously tried removing any saves that NxNandManager listed as BcatDeliveryCacheStorage when exploring USER saves but this had done nothing to fix the issue, and now that the system is working again I have restored them without the issue recurring, so I can confirm they don't contribute to this error.

I leave this here in the hopes that it may help another user with this issue; as anyone else online who has documented this has only been able to recover by a full EmuMMC reclone or initialising their EmuMMC, both of which are a huge headache because of all the data you lose.

Thanks a lot, this solution worked like a charm and as you said, saved me from headache of losing all the data! Only difference was that I had to dump my keys first to be able to mount the disk and also my EmuMMC was not partitioned so I opened it as a file in NxNandManager (file 00).

HeyItsJono commented 1 month ago

@AntonFilip Glad it worked for you! :)