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 when installing BGM-only without ever using a non-stock theme #278

Closed Spagett1 closed 3 months ago

Spagett1 commented 2 years ago

Description When i try to install a theme with the BGM option i get an ARM11 crash

Steps to reproduce Download any theme via either qr code or copying to the sd card.

Hold a, then the d-pad to install bgm, then release a

the theme seems to install but when it is almost done the system crashes (log attached)

Expected behavior The theme to install properly

Crash dumps not sure if this is supposed to be uploaded in plaintext.

       $\0`�������1��0tl��(���`�zw�zw��4����O>��
                                                0�0��� ��� ������4����� ��
                                                                          �Republic CommandoClassic Star Wars FPS17hitcombooo/Themes/Star Wars Republic Commando by 17hi�(f���oo (44561).zip��0r�
     3���0r`0rL<\<\<�3�`P0rd�   ��0r#30rX����(fStar Wars Republic CommandoClassic Star Wars FPS17hitcombooo/Themes/Star Wars Republic Commando by 17hitcombooo (44561).zip (�� h�$� ��Star Wars Republic CommandoClassic Star Wars FPS17hitcombooo/Themes/Star Wars Republic Commando by 17hitcombooo (44561).zip
                                                     g����4�D�l�:@:T:h:�:�-�2Anemone3�

System information new3DS XL

System firmware version 11.16.0-49E

Anemone3DS version v2.3.1

Luma3DS version v11.0

LiquidFenrir commented 2 years ago

Please upload the dump file directly here, not as text. You can drag and drop. Do you have a theme installed already? and you just want to replace the bgm?

Spagett1 commented 1 year ago

github doesnt seem to let me upload the .dmp so ive made a zip archive with it inside, i think i misunderstood what the install bgm was doing crash_dump_00000002.zip (i thought that was how it installed the theme normally), i now have the theme installed so this crash doesnt actually affect me so if you want to close the issue that makes sense.

LiquidFenrir commented 1 year ago

BGM install is for replacing the installed theme's music no BGM install is for installing the theme graphics and sfx, and setting the music to the default one of the 3ds normal is install the entire theme

doing a bgm only install when there is no previously installed theme is going to crash. at least until a check is added.

Helloman892 commented 1 year ago

Yep, as pointed out to me by Théo yesterday, this is an actual bug that ought to be fixed. The issue rests with the check here, which assumes that BodyCache.bin exists always - which, in almost all cases, it does, as it is created as part of the 'normal install' theme installation process and also when you install a theme from the theme shop. However, as he says above, if you've never used a theme aside from the stock themes that ship with the console, this causes what I think is a null dereference, and therein lies the problem.

astronautlevel2 commented 3 months ago

Fixing this bug isn't as simple as adding a NULL check on the body_buf variable; while that would stop it from crashing, it would mean that the BGM install effectively fails as the default themes won't use the BGM stored in the BGM Cache (In fact, I actually suspect that this would cause the stock theme to be removed on reboot due to the cache being bad).

astronautlevel2 commented 3 months ago

Closed by 0420b23