matbo87 / snes9x_3ds

SNES9x Port for 3DS / 2DS
28 stars 4 forks source link

[O3DS + v1.51] ARM11 data abort on loading menu #11

Closed NintendoManiac64 closed 11 months ago

NintendoManiac64 commented 11 months ago

It would seem that the issue described in #2 still occurs on the O3DS with v1.51; attached is the crash dump: crash_dump_00000001.dmp.zip

But despite my keen eye for finding and identifying bugs, my software-dev skills are nearly zero to the point that even just compiling tends to trip me up...

My sister has an O2DS that I could also double-verify with since the software setup on our systems are basically identical, but I probably won't see her for at least a couple of months.

Anonymous941 commented 11 months ago

Strange, my O3DS and O2DS both aren't encountering this issue anymore. Could it be the old configuration files from the non-forked version of snes9x_3ds? You can try renaming snes9x_3ds and related folders and see if this still happens

NintendoManiac64 commented 11 months ago

No difference—it's still crashing.

Interestingly, it's able to create the 3ds/snes9x_3ds folderand all of its subfolders as well as its contained settings.cfg file without issue...

Anonymous941 commented 11 months ago

Wait a minute, I updated and it just crashed a few seconds ago. So for now you can try version 1.50, which worked for me in the past

NintendoManiac64 commented 11 months ago

Which is funny because v1.51 is specifically supposed to fix this issue on O2DS, but maybe it now introduced it on O3DS?

Might be wise to try v1.51 on both your O3DS and O2DS.

Anonymous941 commented 11 months ago

Update: I reinstalled version 1.50 and it now isn't crashing but 1.51 is on my O3DS

Which is funny because v1.51 is specifically supposed to fix this issue on O2DS, but maybe it now introduced it on O3DS?

That was v1.50, it seems that the changelog is incorrect in saying that it was fixed in v1.51, which ironically introduces the bug again :shrug:

Might be wise to try v1.51 on both your O3DS and O2DS.

Since I was the one who made that issue, I tested that 1.50 didn't crash but 1.49 did on my O2DS, so I can assume that 1.51 does. I can get my O2DS out again to test this if you want

NintendoManiac64 commented 11 months ago

Double-confirm: v1.50 is working on my O3DS!

despite my keen eye for finding and identifying bugs

Exhibit A: pretty much this very thread! XD

matbo87 commented 11 months ago

Ok, let's put all this together 😅

Because i can only test on N2DS and N3DS, I need more information to find out what causes the crash. The crash_dump doesn't help that much (at least not me) because it's rather low-level and doesn't contain a simple stack trace or similar.

@Anonymous941 was quite supportive the last time by compiling the app at different commits to find the error. Even if your software-dev skills are negligible you can still add value.

To avoid false positives you should also exit and restart the emulator 2-3 times. I had situations where everything seemed fine and when i opened the emulator again, it crashed.

AlbertoDiazC commented 11 months ago

Same crash here on my o3dsxl. V1.50 worked well. Tried deleting the settings cfg file to do a fresh start but no luck, still crashes. In the cfg subdirectory, each started game does write its own onfiguration file, that part is fine.

Edit: the cia crashes too

NintendoManiac64 commented 11 months ago

Do the nightly builds #3 and #6 also crash?

Build #3 does not crash, but build #6 does crash.

 

Does it always crash at the same point? At what point exactly? (app start, after loading any game, when opening pause menu, ...)

It crashes in the exact same way as issue #2, that being when you touch the bottom screen while a game is loaded.

 

Is 3dsx and cia version affected?

I was only testing the 3dsx versions—should I also be trying the cia versions?

matbo87 commented 11 months ago

@NintendoManiac64 @AlbertoDiazC thx for your feedback.

cia version seems also crashing, so there is no need to investigate it further.

There has been some refactoring within the setupPauseMenu() code that is likely causing the current crashes on O3DS devices. Please keep in mind that I still do not have an O3DS here and can therefore only make assumptions.

I've attached 3 test builds for you to try. Best case: snes9x_3ds_test3.3dsx doesn't crash and i can provide an official fix. If snes9x_3ds_test1.3dsx already crashes, you can skip the other two files. If snes9x_3ds_test3.3dsx runs fine, you may also navigate through the "Load Game" tab, set a default directory via options menu and restart the emulator to make sure it still works. Since you said that everything worked so far until you paused the game by touching the bottom screen, saving a default directory should actually work for you in v1.51 release version as well.

Anonymous941 commented 11 months ago

All 3 of them are crashing on my O3DS when I pause it, but nightly build #3 doesn't. Should I also clear the config files and test it again?

matbo87 commented 11 months ago

All 3 of them are crashing on my O3DS when I pause it, but nightly build #3 doesn't. Should I also clear the config files and test it again?

The config file shouldn't cause the crash. It's more likely a regression due to the new "default directory"-feature. Is the last selected game highlighted when you restart the emulator? Have you tried to set a default directory (Load Game Tab -> Options) before loading a game? Does it work as expected when you restart the emulator?

If test build 4 crashes too, one of the O2DS/O3DS guys will probably have to fix it. 😬

NintendoManiac64 commented 11 months ago

If test build 4 crashes too

Yeah, test build 4 crashes as well.

Please keep in mind that I still do not have an O3DS here and can therefore only make assumptions.

I'm not exactly emotionally attached to my own O3DS, so I'm open to trading it for one of your new 3DS/new 2DS systems. :P

matbo87 commented 11 months ago

I'm not exactly emotionally attached to my own O3DS, so I'm open to trading it for one of your new 3DS/new 2DS systems. :P

doesn't sound like a good deal for me ;)

If @Anonymous941, or someone else who can build the project on their own, can tell me which line in menuPause() / setupMenu(...) is actually causing the crash, I can take another look at it. Until then, the latest O3DS compatible version is v1.50 for now.

NintendoManiac64 commented 11 months ago

doesn't sound like a good deal for me ;)

It's not in bad condition, it's just that it's definitely the least comfortable handheld I ever bought (others being DS phat, original GBA, GBC; later got a backlit not front-lit GBA SP for almost free from a friend but I'm actually not a fan of "scanlines" on non-CRT screens so...). If my DS phat didn't succumb to the infamous borky shoulder button issue twice (we had an extended warranty on the first unit) and the DS Lite and DSi weren't so uncomfortable, then I'm not sure I would have ever gotten a 3DS at all.

...also the Game Boy/Color emulation situation for O3DS/O2DS users is particularly sub-par which greatly annoys me (mGBA has slow-down, Goomba/Color via open_agb_firm drops frames, ande GameYob 3DS hasn't been updated and is slower than the DSi version which itself is hampered by poor upscaling in part due to going 144p ▶ 192p ▶ 240p)

NintendoManiac64 commented 11 months ago

So um, with that whole spiel that I was getting off my chest, I forgot what I really wanted to ask:

What would be better to use for the time being: nightly build #3 or release v1.50?

Anonymous941 commented 11 months ago

After a lot of testing, it turns out that 493c1a2 (Remove obsolete custom picker, apply picker value after dialog has been closed) is the problem. So I guess it wasn't obsolete after all...

matbo87 commented 11 months ago

@NintendoManiac64 new release v1.51.1 should run fine now on O3DS and O2DS.

For those who are interested in the "technical background": t3dsButtonNames[BTN3DS_ZL] andt3dsButtonNames[BTN3DS_ZR] were unassigned on O3DS/O2DS which then caused the crash inside the loop. This was already the case in previous versions and should have caused the crash as well. I'm not entirely sure why it didn't.

Anonymous941 commented 11 months ago

Thanks for fixing this! I can confirm that it's working on my O3DS.

For those who are interested in the "technical background": t3dsButtonNames[BTN3DS_ZL] andt3dsButtonNames[BTN3DS_ZR] were unassigned on O3DS/O2DS which then caused the crash inside the loop. This was already the case in previous versions and should have caused the crash as well. I'm not entirely sure why it didn't.

I might be able to shed some light on this. On the older release I noticed that the ZL and ZR buttons are still there, but have nonsense characters instead of their name. So I assume that in the older releases, the pointer happened to point to valid (well, valid enough that it doesn't crash) text:

Screenshot