Emulator Issues #12885
closedAndroid version crashes after choosing folder
0%
Description
What's the problem? Describe what went wrong.
After trying to allow access to folder on android device the app crashes.
What steps will reproduce the problem?
Open app, click plus button, choose any folder.
Is the issue present in the latest development version? For future reference, please also write down the version number of the latest development version.
Yes, 5.0-16267
Is the issue present in the latest stable version?
Yes, 5.0-16101
What are your PC specifications? (CPU, GPU, Operating System, more)
Android device: Xiaomi POCO F2 PRO
Custom ROM: Evolution X Snow 6.2.2-lmi-20220405
Android version: 12
Kernel version: 4.19.237-disrupt-ge47a0060ab85
Is there anything else that can help developers narrow down the issue? (e.g. logs, screenshots,
configuration files, savefiles, savestates)
04-11 13:09:58.213 13347 13347 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x18 in tid 13347 (nemu.dolphinemu), pid 13347 (nemu.dolphinemu)
04-11 13:09:58.782 14164 14164 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
04-11 13:09:58.782 14164 14164 F DEBUG : Build fingerprint: 'google/redfin/redfin:12/SP2A.220405.003/8210211:user/release-keys'
04-11 13:09:58.782 14164 14164 F DEBUG : Revision: '0'
04-11 13:09:58.782 14164 14164 F DEBUG : ABI: 'arm64'
04-11 13:09:58.782 14164 14164 F DEBUG : Timestamp: 2022-04-11 13:09:58.269582047+0200
04-11 13:09:58.782 14164 14164 F DEBUG : Process uptime: 0s
04-11 13:09:58.782 14164 14164 F DEBUG : Cmdline: org.dolphinemu.dolphinemu
04-11 13:09:58.782 14164 14164 F DEBUG : pid: 13347, tid: 13347, name: nemu.dolphinemu >>> org.dolphinemu.dolphinemu <<<
04-11 13:09:58.782 14164 14164 F DEBUG : uid: 10351
04-11 13:09:58.782 14164 14164 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x18
04-11 13:09:58.782 14164 14164 F DEBUG : Cause: null pointer dereference
04-11 13:09:58.782 14164 14164 F DEBUG : x0 0000000000000000 x1 0000007fe4f578c8 x2 0000007ad94cf2d0 x3 0000007fe4f57718
04-11 13:09:58.782 14164 14164 F DEBUG : x4 0000000000000022 x5 0000007fe4f57698 x6 000000000010ffff x7 0000000000000000
04-11 13:09:58.782 14164 14164 F DEBUG : x8 e42a3e317769b27c x9 e42a3e317769b27c x10 0000000000000002 x11 0000000000000008
04-11 13:09:58.782 14164 14164 F DEBUG : x12 0000fffffffff3ff x13 00000000137b99b8 x14 0000007aa6c9a000 x15 0000007fe4f57100
04-11 13:09:58.782 14164 14164 F DEBUG : x16 0000007a1f7e4480 x17 0000007d3e32e228 x18 0000007d5534a000 x19 0000000000000000
04-11 13:09:58.782 14164 14164 F DEBUG : x20 0000000000000003 x21 0000007d5492a000 x22 0000000000000000 x23 b400007c1947f860
04-11 13:09:58.782 14164 14164 F DEBUG : x24 0000007a7f0d3120 x25 0000000000000005 x26 0000000000000037 x27 0000007d5492a000
04-11 13:09:58.782 14164 14164 F DEBUG : x28 0000007fe4f57970 x29 0000007fe4f57970
04-11 13:09:58.782 14164 14164 F DEBUG : lr 0000007a1f0a06dc sp 0000007fe4f578c0 pc 0000007a1f0a06e0 pst 0000000060001000
04-11 13:09:58.782 14164 14164 F DEBUG : backtrace:
04-11 13:09:58.782 14164 14164 F DEBUG : #00 pc 00000000003946e0 /data/app/~~s5b39iRm96P_-pfWiUXidg==/org.dolphinemu.dolphinemu-5PwnOvVyv_2LPbcG5OnRgw==/lib/arm64/libmain.so (Java_org_dolphinemu_dolphinemu_features_settings_model_NativeConfig_getBoolean+80) (BuildId: ebbf2a51a1e13b4232e0345d235b136b39780524)
04-11 13:09:58.782 14164 14164 F DEBUG : #01 pc 00000000002d7644 /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+148) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
04-11 13:09:58.782 14164 14164 F DEBUG : #02 pc 00000000002cdfe8 /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
04-11 13:09:58.782 14164 14164 F DEBUG : #03 pc 00000000002f23d8 /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+320) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
04-11 13:09:58.782 14164 14164 F DEBUG : #04 pc 00000000002f121c /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, true>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+1480) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
04-11 13:09:58.782 14164 14164 F DEBUG : #05 pc 00000000007748f0 /apex/com.android.art/lib64/libart.so (MterpInvokeStatic+3736) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
04-11 13:09:58.782 14164 14164 F DEBUG : #06 pc 00000000002c8594 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_static+20) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
04-11 13:09:58.782 14164 14164 F DEBUG : #07 pc 00000000001b365e /data/app/~~s5b39iRm96P_-pfWiUXidg==/org.dolphinemu.dolphinemu-5PwnOvVyv_2LPbcG5OnRgw==/oat/arm64/base.vdex (org.dolphinemu.dolphinemu.features.settings.model.BooleanSetting.getBooleanGlobal+18)
04-11 13:09:58.782 14164 14164 F DEBUG : #08 pc 000000000027d748 /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.7449118509010352383)+644) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
04-11 13:09:58.782 14164 14164 F DEBUG : #09 pc 00000000002f1b98 /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, true>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+3908) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
04-11 13:09:58.782 14164 14164 F DEBUG : #10 pc 00000000002c4504 /apex/com.android.art/lib64/libart.so (MterpInvokeVirtual+5660) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
04-11 13:09:58.782 14164 14164 F DEBUG : #11 pc 00000000002c8414 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
04-11 13:09:58.782 14164 14164 F DEBUG : #12 pc 00000000001c7a0c /data/app/~~s5b39iRm96P_-pfWiUXidg==/org.dolphinemu.dolphinemu-5PwnOvVyv_2LPbcG5OnRgw==/oat/arm64/base.vdex (org.dolphinemu.dolphinemu.ui.main.MainPresenter.onDirectorySelected+12)
04-11 13:09:58.782 14164 14164 F DEBUG : #13 pc 000000000027d748 /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.7449118509010352383)+644) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
04-11 13:09:58.782 14164 14164 F DEBUG : #14 pc 00000000002f1b98 /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, true>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+3908) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
04-11 13:09:58.782 14164 14164 F DEBUG : #15 pc 00000000002c4504 /apex/com.android.art/lib64/libart.so (MterpInvokeVirtual+5660) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
04-11 13:09:58.782 14164 14164 F DEBUG : #16 pc 00000000002c8414 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
04-11 13:09:58.782 14164 14164 F DEBUG : #17 pc 00000000001c677c /data/app/~~s5b39iRm96P_-pfWiUXidg==/org.dolphinemu.dolphinemu-5PwnOvVyv_2LPbcG5OnRgw==/oat/arm64/base.vdex (org.dolphinemu.dolphinemu.ui.main.MainActivity.onActivityResult+176)
04-11 13:09:58.782 14164 14164 F DEBUG : #18 pc 000000000027d748 /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.7449118509010352383)+644) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
04-11 13:09:58.782 14164 14164 F DEBUG : #19 pc 000000000027c8f0 /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+1176) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
04-11 13:09:58.782 14164 14164 F DEBUG : #20 pc 00000000002d7778 /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
04-11 13:09:58.782 14164 14164 F DEBUG : #21 pc 000000000020a0a0 /apex/com.android.art/lib64/libart.so (nterp_helper+4016) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
04-11 13:09:58.782 14164 14164 F DEBUG : #22 pc 00000000001c4f46 /system/framework/framework.jar (android.app.Activity.dispatchActivityResult+14)
04-11 13:09:58.782 14164 14164 F DEBUG : #23 pc 000000000020a748 /apex/com.android.art/lib64/libart.so (nterp_helper+5720) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
04-11 13:09:58.782 14164 14164 F DEBUG : #24 pc 00000000001b93b0 /system/framework/framework.jar (android.app.ActivityThread.deliverResults+112)
04-11 13:09:58.782 14164 14164 F DEBUG : #25 pc 000000000020a044 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
04-11 13:09:58.782 14164 14164 F DEBUG : #26 pc 00000000001bdd20 /system/framework/framework.jar (android.app.ActivityThread.handleSendResult+292)
04-11 13:09:58.782 14164 14164 F DEBUG : #27 pc 000000000020a044 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
04-11 13:09:58.782 14164 14164 F DEBUG : #28 pc 00000000002bc15a /system/framework/framework.jar (android.app.servertransaction.ActivityResultItem.execute+22)
04-11 13:09:58.782 14164 14164 F DEBUG : #29 pc 000000000020a044 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
04-11 13:09:58.782 14164 14164 F DEBUG : #30 pc 00000000002bc258 /system/framework/framework.jar (android.app.servertransaction.ActivityTransactionItem.execute+8)
04-11 13:09:58.782 14164 14164 F DEBUG : #31 pc 000000000020a044 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
04-11 13:09:58.782 14164 14164 F DEBUG : #32 pc 00000000002bfe76 /system/framework/framework.jar (android.app.servertransaction.TransactionExecutor.executeCallbacks+154)
04-11 13:09:58.782 14164 14164 F DEBUG : #33 pc 000000000020a044 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
04-11 13:09:58.782 14164 14164 F DEBUG : #34 pc 00000000002bfdb2 /system/framework/framework.jar (android.app.servertransaction.TransactionExecutor.execute+146)
04-11 13:09:58.782 14164 14164 F DEBUG : #35 pc 000000000020a044 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
04-11 13:09:58.782 14164 14164 F DEBUG : #36 pc 00000000001b4f40 /system/framework/framework.jar (android.app.ActivityThread$H.handleMessage+256)
04-11 13:09:58.782 14164 14164 F DEBUG : #37 pc 00000000020866c4 /memfd:jit-zygote-cache (deleted) (android.os.Handler.dispatchMessage+180)
04-11 13:09:58.782 14164 14164 F DEBUG : #38 pc 000000000020a0a0 /apex/com.android.art/lib64/libart.so (nterp_helper+4016) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
04-11 13:09:58.782 14164 14164 F DEBUG : #39 pc 000000000044dc34 /system/framework/framework.jar (android.os.Looper.loopOnce+312)
04-11 13:09:58.782 14164 14164 F DEBUG : #40 pc 00000000020a4bec /memfd:jit-zygote-cache (deleted) (android.os.Looper.loop+572)
04-11 13:09:58.782 14164 14164 F DEBUG : #41 pc 0000000000209188 /apex/com.android.art/lib64/libart.so (nterp_helper+152) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
04-11 13:09:58.782 14164 14164 F DEBUG : #42 pc 00000000001bee74 /system/framework/framework.jar (android.app.ActivityThread.main+204)
04-11 13:09:58.782 14164 14164 F DEBUG : #43 pc 00000000002cdfe8 /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
04-11 13:09:58.782 14164 14164 F DEBUG : #44 pc 0000000000362f0c /apex/com.android.art/lib64/libart.so (_jobject* art::InvokeMethod<(art::PointerSize)8>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+608) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
04-11 13:09:58.782 14164 14164 F DEBUG : #45 pc 0000000000362c84 /apex/com.android.art/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+52) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
04-11 13:09:58.782 14164 14164 F DEBUG : #46 pc 00000000000b2f74 /apex/com.android.art/javalib/arm64/boot.oat (art_jni_trampoline+132) (BuildId: ad9ee401645a5135206a62ff86fc2ef5cdc29120)
04-11 13:09:58.782 14164 14164 F DEBUG : #47 pc 000000000020a0a0 /apex/com.android.art/lib64/libart.so (nterp_helper+4016) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
04-11 13:09:58.782 14164 14164 F DEBUG : #48 pc 00000000002433ba /system/framework/framework.jar (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+22)
04-11 13:09:58.782 14164 14164 F DEBUG : #49 pc 000000000020ae64 /apex/com.android.art/lib64/libart.so (nterp_helper+7540) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
04-11 13:09:58.782 14164 14164 F DEBUG : #50 pc 00000000002491f2 /system/framework/framework.jar (com.android.internal.os.ZygoteInit.main+562)
04-11 13:09:58.782 14164 14164 F DEBUG : #51 pc 00000000002cdfe8 /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
04-11 13:09:58.782 14164 14164 F DEBUG : #52 pc 00000000004550b4 /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeWithVarArgs<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+464) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
04-11 13:09:58.782 14164 14164 F DEBUG : #53 pc 0000000000633790 /apex/com.android.art/lib64/libart.so (art::JNI<true>::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+268) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
04-11 13:09:58.782 14164 14164 F DEBUG : #54 pc 00000000000b5ad0 /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+120) (BuildId: 22fb356142c34fc6511d225faf827c28)
04-11 13:09:58.782 14164 14164 F DEBUG : #55 pc 00000000000c0f68 /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+828) (BuildId: 22fb356142c34fc6511d225faf827c28)
04-11 13:09:58.782 14164 14164 F DEBUG : #56 pc 0000000000002580 /system/bin/app_process64 (main+1324) (BuildId: ddb233935f6ae6a038b020beea13d8fb)
04-11 13:09:58.782 14164 14164 F DEBUG : #57 pc 0000000000048410 /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+96) (BuildId: 1fa17e27d64c88ffbd1581656e34acda)
04-11 13:09:58.796 1779 14167 W ActivityTaskManager: Force finishing activity org.dolphinemu.dolphinemu/.ui.main.MainActivity
Updated by JosJuice over 2 years ago
Does Dolphin by any chance show the message "The external storage needs to be available in order to use Dolphin" when you start it?
Updated by No1ne over 2 years ago
JosJuice wrote:
Does Dolphin by any chance show the message "The external storage needs to be available in order to use Dolphin" when you start it?
It doesn't do so upon the start, but it does if I go to e.g. settings page. I've looked at the permissions and the only one that is possible to grant is access to files and media and "Allow access to media only".
Updated by JosJuice over 2 years ago
- Operating system Android added
- Operating system deleted (
N/A)
Okay, so the underlying problem here is that external storage isn't mounted. It's impossible for Dolphin to work correctly in this situation... but it's supposed to just show you the message about external storage instead of crashing, and that's not happening. So I'm willing to accept this issue report as a report of the crash only.
External storage not being mounted has nothing to do with permissions. On older phones, where external storage actually was external, it was dependent on whether the SD card was inserted and/or whether your phone's files were being accessed through USB from a PC. On newer phones (including your phone), external storage is implemented as "emulated external storage" (in which "external storage" is actually stored on the interral storage), and it's essentially impossible for external storage to not be mounted. I've never seen it happen on an OEM ROM. With this in mind, I'm suspecting that something is wrong with the custom ROM you're using. If someone can reproduce this problem on an OEM ROM, I'll reconsider whether this issue report should be accepted beyond just the crash part.
Updated by No1ne over 2 years ago
It may be due to a bug in the custom ROM, but other applications relying on access to storage (Syncthing, VLC, Simple File Manager) are working fine. They do have stronger file permissions though, having access to all files instead of the media only, like in case of dolphin. I've also noticed that when I'm asked to choose the folder to give access to I cannot choose to grant access to the root of external storage (i.e. /storage/emulated/0
). There is notice in the chooser "Can't use this folder. To protect your privacy, choose another folder". So I guess if Dolphin tries to access anything on the external storage beyond the folder it's been given access to, it may fail to do so.
Also the Dolphin was working correctly on the ROM before update from Android 11 to 12L (I'm not sure if the app worked on the Android 12 version).
Updated by JosJuice over 2 years ago
It may be due to a bug in the custom ROM, but other applications relying on access to storage (Syncthing, VLC, Simple File Manager) are working fine.
I've taken a look at whether those apps use Environment.getExternalStorageState and Environment.getExternalStorageDirectory, the two methods Dolphin uses for determining if external storage is mounted. The only uses of them are as follows:
- Syncthing uses getExternalStorageDirectory in a few places.
- VLC uses getExternalStorageState, but only for the sake of determining whether crash logs should be saved to internal storage or external storage after a crash has happened.
My best theory so far (and keep in mind that it's only a theory) is that Environment.getExternalStorageState is broken in your custom ROM. If it is the case that that method is broken and nothing else is broken, I think it would be possible to add a workaround to Dolphin, but I would be reluctant to do that since the problem in that case is in the custom ROM and most likely affects more apps than just Dolphin.
I know very little about how custom ROMs are developed, but perhaps you know a bit more. Is it possible to report this kind of thing to the developers of the custom ROM you're using?
I've also noticed that when I'm asked to choose the folder to give access to I cannot choose to grant access to the root of external storage (i.e.
/storage/emulated/0
). There is notice in the chooser "Can't use this folder. To protect your privacy, choose another folder". So I guess if Dolphin tries to access anything on the external storage beyond the folder it's been given access to, it may fail to do so.
This is the case for all devices that run Android 11 and newer. Dolphin takes it into account.
Updated by JosJuice over 2 years ago
Minor correction: In your case, Dolphin uses Context.getExternalFilesDir instead of Environment.getExternalStorageDirectory. Just like getExternalStorageDirectory, getExternalFilesDir is used by Syncthing but not the two other apps you mentioned, so my analysis is still the same as before.
Updated by No1ne over 2 years ago
Thanks for detailed response. I'll report the bug to the custom ROM developer and see if they can help.
Updated by realakito over 2 years ago
Hi!
I am the developer of the said custom ROM.
Due to filesystem changes in emulated storage in transition between Android 12 to Android 12.1, we have instructed users with a guide to make this transition smooth for them.
It seems that this user, in particular, does not follow the guide, resulting in apps not being able to access emulated storage.
Thank you for taking your time into this.
Updated by JosJuice over 2 years ago
- Status changed from New to Accepted
Thanks for the information. Then I will accept this issue report as a report of the crash only, meaning that once Dolphin shows an error message instead of crashing I will close this issue.
Updated by JosJuice over 2 years ago
- Status changed from Accepted to Fix pending
The crash should be fixed in this pull request: https://github.com/dolphin-emu/dolphin/pull/10589
APK for testing: https://dl.dolphin-emu.org/prs/6e/8a/pr-10589-dolphin-latest.apk
Updated by JosJuice over 2 years ago
- Status changed from Fix pending to Fixed
- Fixed in set to 5.0-16285