rafaelvcaetano / melonDS-android

Android port of melonDS
GNU General Public License v3.0
728 stars 45 forks source link

App crashes immediately when trying to launch a game #1292

Open pqueiro opened 3 months ago

pqueiro commented 3 months ago

Problem:
App crashes when launching any game. This happens whether there are save game files already or not. Happens with the latest version from the Play Store as well as with the latest nightly version I could find.

For some unknown reason, the very same game files work just fine on Retroarch with the MelonDS core, saves included, on the same device.

Edited to add: I connected to the device via ADB to see if I could somehow "force" all file access permissions. I couldn't figure out how to do that, but I did come across this message in regards to MelonDS's permissions:

"MANAGE_EXTERNAL_STORAGE: default; rejectTime=+4h32m55s915ms ago"

I don't know enough about Android to determine if that is a factor, but "rejectTime" does not sound good.

Steps to reproduce (if applicable):

  1. Install app, launch it
  2. Set the game files directory, allow MelonDS to access said directory
  3. Select a game to launch
  4. Watch it crash straight to the home screen

Add screenshots if the issue can be visualized.

Screenshot_20240313-232113_Settings

Screenshot_20240313-232300_melonDS

IMG_20240313_232416

The Retroarch core that loads the game correctly: Screenshot_20240313-232624_RetroArch (AArch64)

rafaelvcaetano commented 3 months ago

Could you show me a screenshot of the directory that contains your ROM files?

rafaelvcaetano commented 3 months ago

Also, could you try the latest nightly release? I've pushed a couple of fixes that may be related to your problem.

pqueiro commented 3 months ago
  1. screenshot of game directory: Screenshot_20240320-114112_Files

  2. Testing the nightly release: did so, same behaviour.

However, as I messaged you on reddit, I also reported this behaviour on the KT-R1 discord, and, after some testing, we have established that disabling an optional, experimental graphics driver, resolves this issue.

I don't know why Dolphin, Retroarch, and many others work just fine but MelonDS (and Drastic, it should be noted) do not. Retroarch with the MelonDS core works fine, albeit with reduced performance in some games, using this experimental graphics driver. It's the standalone MelonDS and Drastic apps that crash on game launch. Disabling that graphics driver costs us a little performance on the top end, but enables us to use MelonDS standalone. It's a tradeoff I'm willing to make on the few occasions I need it.

If you need or want a tester for future releases, I'll be glad to help :D thank you very much!