astronautlevel2 / Anemone3DS

A theme and boot splash manager for the Nintendo 3DS console
GNU General Public License v3.0
908 stars 44 forks source link

Arm11 Crash #248

Open HAMBRUGNATCHERS opened 3 years ago

HAMBRUGNATCHERS commented 3 years ago

I recently dumped the original Basic: Red theme by holding x and d-pad right(I might be wrong with that, I’ll need to double check). I installed the no-bgm version and then hovered over another theme and installed the bgm only version. I pressed start and then pushed the home button. As soon as I did so, I got an arm11 crash(see linked file). When I booted up my 3DS it crashed again. I had to take out the SD card, boot it up, select an original 3DS theme(probably not necessary, but I did this part anyways just to be sure), and then put the SD card back in. I can no longer replicate it, as every time I try to do so, it automatically select a very specific theme from anemone(always the same one). I will delete this theme in an attempt to replicate this bug. I will update this once I more info. Feel free to leave a comment on the crash dump. https://drive.google.com/file/d/1NyDFz1ZQu2oEjZgbuOC3edlPfhO-nhFk

Helloman892 commented 3 years ago

Hi there, are you still unable to replicate the issue?

Also, could you double-check that Google Drive link? It doesn't work.

HAMBRUGNATCHERS commented 3 years ago

I will fix the link on monday. Thank you for telling me. I am still unable to replicate it. Everytime I try, it defualts the theme the black and red.

HAMBRUGNATCHERS commented 3 years ago

Okay, I have the file back up and working. Here is the link. https://drive.google.com/file/d/1NyDFz1ZQu2oEjZgbuOC3edlPfhO-nhFk

Helloman892 commented 3 years ago

From inspecting the crash dump you uploaded, it appears that the crash occurs due to current_list being NULL at line 801 in main.c. I'm not entirely sure what could possibly cause this, so I'm going to have to have a closer look in a couple of weeks when time will allow.

That said, do you have any crash dumps generated from when your console crashed on boot? The crash dump you've given me could only have been from the initial crash.

HAMBRUGNATCHERS commented 3 years ago

Unfortunately not. I will try again to replicate it. I will try to use EmuNAND as it will count as a fresh start. I'll let you know what I come up with. Is there a reason it defaults to a theme I didn't select? If so, how do I clear this default?

HAMBRUGNATCHERS commented 3 years ago

After trying to replicate it, I get an error saying there is no Body_LZ.bin. (this is all the data about the theme, mostly colors) This happens when trying to dump any of the basic themes(Basic: Red, Basic: Blue). I can no longer replicate this without going back to a previous luma version. Is it worth it? If so, how do I do that?

LiquidFenrir commented 3 years ago

One way to get the default themes is to mount the home menu's data from godmode9 and copy the color_LZ.bin you want from the romfs/theme directory. They are not copied to the theme extdata when set from the official menu, which is where Anemone attempts to copy them from. A solution would be to check the savedata.dat file when dumping, and when a theme with an index below 5 is in use, mount the home menu romfs and do the copy from there instead of the extdata. The crash was most probably the copied theme files having the wrong size and thus being incomplete, making the home menu crash, depending on the order of your actions.

Helloman892 commented 7 months ago

@LiquidFenrir @HAMBRUGNATCHERS Does this still happen? I assume it does, so I won't close this quite yet.

LiquidFenrir commented 7 months ago

Quick check in themes.c tells me there hasn't been any logic added to handle this, yep. It shouldn't be too hard, just needs a couple addition in other files as well (supporting the Home Menu romFS as an archive, mainly), then a check for "is the current theme a default one" or "is it an installed one", in case A dump from romFS with the right filename, in case B business as usual.