Closed ibocon closed 2 years ago
I don't have a relevant device, and I couldn't reproduce the issue neither on Pixel 3 XL running Android 11 nor in an emulator running Android 7. Can you please record a logcat output using these commands:
$ adb logcat -G 16M
$ adb shell setprop debug.mono.log default,assembly,mono_log_level=debug,mono_log_mask=io-layer
$ adb logcat -c
# start the application here and cause it to error out
$ adb logcat -d > logcat.txt
Please attach the logcat.txt
file to this report, hopefully it will contain some clues we can follow, thanks!
$ adb logcat -G 16M
failed to set the log size(base)
$ adb logcat -g 16m
main: ring buffer is 2Mb (1Mb consumed), max entry is 5120b, max payload is 4076b
system: ring buffer is 256Kb (130Kb consumed), max entry is 5120b, max payload is 4076b
$ adb shell setprop debug.mono.log default,assembly,mono_log_level=debug,mono_log_mask=io-layer
$ adb logcat -c
# build and install, run application
$ adb logcat -d > ~/Desktop/logcat.txt
On line 7186 - 7290, you may find useful info.
09-29 08:55:57.174 3429 3429 D Mono : mono_w32file_create: Opening /storage/emulated/0/Android/data/com.ibocon.unauthorizedaccessexception/files/Test.txt with share 0x0 and access 0x40000000
09-29 08:55:57.104 3429 3429 D Mono : Request to load System.IO.Compression in (domain 0xae8a3a00, alc 0x0)
09-29 08:55:57.104 3429 3429 D Mono : Found assembly remapping for System.IO.Compression and was for the same version 2.0.5.0
09-29 08:55:57.104 3429 3429 D Mono : Found assembly remapping for System.IO.Compression and was for the same version 2.0.5.0
09-29 08:55:57.104 3429 3429 I monodroid-assembly: open_from_update_dir: trying to open assembly: /data/user/0/com.ibocon.unauthorizedaccessexception/files/.__override__/System.IO.Compression.dll
09-29 08:55:57.104 3429 3429 D monodroid-assembly: open_from_bundles: looking for bundled name: 'System.IO.Compression.dll'
09-29 08:55:57.104 3429 3429 I monodroid-assembly: mmap_start: 0x929dc000 mmap_end: 0x92a4f840 mmap_len: 118288 file_start: 0x929dca10 file_end: 0x92a4da10 file_len: 115712 apk descriptor: 22 file: System.IO.Compression.dll
09-29 08:55:57.104 3429 3429 I monodroid-assembly: file-offset: 4b7fa10 start: 0x929dca10 end: 0x929f8e10 len: 115712 zip-entry: System.IO.Compression.dll name: System.IO.Compression.dll [MZ......]
09-29 08:55:57.109 3429 3429 D Mono : mono_pe_file_map: Error opening file System.IO.Compression.dll (3): No such file or directory
09-29 08:55:57.109 3429 3429 I monodroid-assembly: mmap_start: 0x93c13000 mmap_end: 0x93c3aa60 mmap_len: 40600 file_start: 0x93c13e5c file_end: 0x93c37f4c file_len: 36924 apk descriptor: 22 file: System.IO.Compression.pdb
09-29 08:55:57.109 3429 3429 I Mono : Image addref System.IO.Compression[0x9729a1c0] (asmctx DEFAULT) -> System.IO.Compression.dll[0x94a5ff00]: 3
09-29 08:55:57.109 3429 3429 I Mono : Prepared to set up assembly 'System.IO.Compression' (System.IO.Compression.dll)
09-29 08:55:57.109 3429 3429 D Mono : Loading assembly System.IO.Compression (0x9729a1c0) into domain RootDomain (0xae8a3a00) and ALC 0x0
09-29 08:55:57.109 3429 3429 I Mono : Assembly System.IO.Compression[0x9729a1c0] added to domain RootDomain, ref_count=1
09-29 08:55:57.109 3429 3429 I Mono : Assembly Ref addref netstandard[0x9cc2c8a0] -> System.IO.Compression[0x9729a1c0]: 2
09-29 08:55:57.109 3429 3429 I Mono : Requesting loading reference 0 (of 2) of System.IO.Compression.dll
09-29 08:55:57.109 3429 3429 I Mono : Loading reference 0 of System.IO.Compression.dll asmctx DEFAULT, looking for mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
09-29 08:55:57.109 3429 3429 D Mono : Request to load mscorlib in (domain 0xae8a3a00, alc 0x0)
09-29 08:55:57.109 3429 3429 D Mono : Found assembly remapping for mscorlib and was for the same version 2.0.5.0
09-29 08:55:57.109 3429 3429 D Mono : Found assembly remapping for mscorlib and was for the same version 2.0.5.0
09-29 08:55:57.109 3429 3429 I Mono : Assembly Ref addref System.IO.Compression[0x9729a1c0] -> mscorlib[0xae571d40]: 61
09-29 08:55:57.109 3429 3429 I Mono : Requesting loading reference 7 (of 16) of netstandard.dll
09-29 08:55:57.109 3429 3429 I Mono : Loading reference 7 of netstandard.dll asmctx DEFAULT, looking for System.IO.Compression.FileSystem, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
09-29 08:55:57.109 3429 3429 D Mono : Request to load System.IO.Compression.FileSystem in (domain 0xae8a3a00, alc 0x0)
09-29 08:55:57.109 3429 3429 D Mono : Found assembly remapping for System.IO.Compression.FileSystem and was for the same version 2.0.5.0
09-29 08:55:57.109 3429 3429 D Mono : Found assembly remapping for System.IO.Compression.FileSystem and was for the same version 2.0.5.0
09-29 08:55:57.109 3429 3429 I monodroid-assembly: open_from_update_dir: trying to open assembly: /data/user/0/com.ibocon.unauthorizedaccessexception/files/.__override__/System.IO.Compression.FileSystem.dll
09-29 08:55:57.109 3429 3429 D monodroid-assembly: open_from_bundles: looking for bundled name: 'System.IO.Compression.FileSystem.dll'
09-29 08:55:57.109 3429 3429 I monodroid-assembly: mmap_start: 0x973c0000 mmap_end: 0x973d5bc0 mmap_len: 22256 file_start: 0x973c0ef0 file_end: 0x973d2ef0 file_len: 18432 apk descriptor: 22 file: System.IO.Compression.FileSystem.dll
09-29 08:55:57.109 3429 3429 I monodroid-assembly: file-offset: 4ba4ef0 start: 0x973c0ef0 end: 0x973c56f0 len: 18432 zip-entry: System.IO.Compression.FileSystem.dll name: System.IO.Compression.FileSystem.dll [MZ......]
09-29 08:55:57.109 3429 3429 D Mono : mono_pe_file_map: Error opening file System.IO.Compression.FileSystem.dll (3): No such file or directory
09-29 08:55:57.109 3429 3429 I monodroid-assembly: mmap_start: 0x97882000 mmap_end: 0x97888690 mmap_len: 6564 file_start: 0x97882748 file_end: 0x978870b8 file_len: 4700 apk descriptor: 22 file: System.IO.Compression.FileSystem.pdb
09-29 08:55:57.109 3429 3429 I Mono : Image addref System.IO.Compression.FileSystem[0x9729a160] (asmctx DEFAULT) -> System.IO.Compression.FileSystem.dll[0x972b4900]: 3
09-29 08:55:57.109 3429 3429 I Mono : Prepared to set up assembly 'System.IO.Compression.FileSystem' (System.IO.Compression.FileSystem.dll)
09-29 08:55:57.109 3429 3429 D Mono : Loading assembly System.IO.Compression.FileSystem (0x9729a160) into domain RootDomain (0xae8a3a00) and ALC 0x0
09-29 08:55:57.109 3429 3429 I Mono : Assembly System.IO.Compression.FileSystem[0x9729a160] added to domain RootDomain, ref_count=1
09-29 08:55:57.109 3429 3429 I Mono : Assembly Ref addref netstandard[0x9cc2c8a0] -> System.IO.Compression.FileSystem[0x9729a160]: 2
09-29 08:55:57.109 3429 3429 I Mono : Requesting loading reference 0 (of 3) of System.IO.Compression.FileSystem.dll
09-29 08:55:57.109 3429 3429 I Mono : Loading reference 0 of System.IO.Compression.FileSystem.dll asmctx DEFAULT, looking for mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
09-29 08:55:57.109 3429 3429 D Mono : Request to load mscorlib in (domain 0xae8a3a00, alc 0x0)
09-29 08:55:57.109 3429 3429 D Mono : Found assembly remapping for mscorlib and was for the same version 2.0.5.0
09-29 08:55:57.109 3429 3429 D Mono : Found assembly remapping for mscorlib and was for the same version 2.0.5.0
09-29 08:55:57.109 3429 3429 I Mono : Assembly Ref addref System.IO.Compression.FileSystem[0x9729a160] -> mscorlib[0xae571d40]: 62
09-29 08:55:57.109 3429 3429 I Mono : Requesting loading reference 1 (of 3) of System.IO.Compression.FileSystem.dll
09-29 08:55:57.109 3429 3429 I Mono : Loading reference 1 of System.IO.Compression.FileSystem.dll asmctx DEFAULT, looking for System.IO.Compression, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
09-29 08:55:57.109 3429 3429 D Mono : Request to load System.IO.Compression in (domain 0xae8a3a00, alc 0x0)
09-29 08:55:57.109 3429 3429 D Mono : Found assembly remapping for System.IO.Compression and was for the same version 2.0.5.0
09-29 08:55:57.109 3429 3429 D Mono : Found assembly remapping for System.IO.Compression and was for the same version 2.0.5.0
09-29 08:55:57.109 3429 3429 I Mono : Assembly Ref addref System.IO.Compression.FileSystem[0x9729a160] -> System.IO.Compression[0x9729a1c0]: 3
09-29 08:55:57.124 3429 3429 I Mono : Requesting loading reference 1 (of 2) of System.IO.Compression.dll
09-29 08:55:57.124 3429 3429 I Mono : Loading reference 1 of System.IO.Compression.dll asmctx DEFAULT, looking for System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
09-29 08:55:57.124 3429 3429 D Mono : Request to load System in (domain 0xae8a3a00, alc 0x0)
09-29 08:55:57.124 3429 3429 D Mono : Found assembly remapping for System and was for the same version 2.0.5.0
09-29 08:55:57.124 3429 3429 D Mono : Found assembly remapping for System and was for the same version 2.0.5.0
09-29 08:55:57.124 3429 3429 I Mono : Assembly Ref addref System.IO.Compression[0x9729a1c0] -> System[0x9cc2c360]: 9
09-29 08:55:57.139 3429 3429 I Mono : DllImport searching in: 'libmono-native.so' ('./libmono-native.so').
09-29 08:55:57.139 3429 3429 I Mono : Searching for 'SystemNative_MkDir'.
09-29 08:55:57.139 3429 3429 I Mono : Probing 'SystemNative_MkDir'.
09-29 08:55:57.139 3429 3429 I Mono : Found as 'SystemNative_MkDir'.
09-29 08:55:57.174 3429 3429 D Mono : mono_w32file_create: Opening /data/user/0/com.ibocon.unauthorizedaccessexception/cache/CASESENSITIVETESTf6dbcd7257b641158579833f6da380e6 with share 0x0 and access 0xc0000000
09-29 08:55:57.174 3429 3429 D Mono : share_allows_open: New file!
09-29 08:55:57.174 3429 3429 D Mono : mono_w32file_create: returning handle 0x25
09-29 08:55:57.174 3429 3429 D Mono : file_data_close: closing fd 37
09-29 08:55:57.174 3429 3429 D Mono : mono_w32file_create: Opening /storage/emulated/0/Android/data/com.ibocon.unauthorizedaccessexception/files/Test.txt with share 0x0 and access 0x40000000
09-29 08:55:57.179 3429 3429 D Mono : share_allows_open: New file!
09-29 08:55:57.179 3429 3429 D Mono : mono_w32file_create: returning handle 0x25
09-29 08:55:57.184 3429 3429 D Mono : file_seek: setting offset to 0 0x0 (high 0 0x0, low 0 0x0)
09-29 08:55:57.184 3429 3429 D Mono : file_seek: moving fd 37 by 0 bytes from 0
09-29 08:55:57.184 3429 3429 D Mono : file_seek: lseek returns 0
09-29 08:55:57.184 3429 3429 D Mono : file_seek: move of fd 37 returning 0/0
09-29 08:55:57.189 3429 3429 D Mono : file_data_close: closing fd 37
09-29 08:55:57.194 3429 3429 I Mono : DllImport searching in: 'libmono-native.so' ('./libmono-native.so').
09-29 08:55:57.194 3429 3429 I Mono : Searching for 'SystemNative_UTimes'.
09-29 08:55:57.194 3429 3429 I Mono : Probing 'SystemNative_UTimes'.
09-29 08:55:57.194 3429 3429 I Mono : Found as 'SystemNative_UTimes'.
09-29 08:55:57.194 3429 3429 I Mono : DllImport searching in: 'libmono-native.so' ('./libmono-native.so').
09-29 08:55:57.194 3429 3429 I Mono : Searching for 'SystemNative_ConvertErrorPalToPlatform'.
09-29 08:55:57.194 3429 3429 I Mono : Probing 'SystemNative_ConvertErrorPalToPlatform'.
09-29 08:55:57.194 3429 3429 I Mono : Found as 'SystemNative_ConvertErrorPalToPlatform'.
09-29 08:55:57.199 3429 3429 I Mono : DllImport searching in: 'libmono-native.so' ('./libmono-native.so').
09-29 08:55:57.199 3429 3429 I Mono : Searching for 'SystemNative_StrErrorR'.
09-29 08:55:57.199 3429 3429 I Mono : Probing 'SystemNative_StrErrorR'.
09-29 08:55:57.199 3429 3429 I Mono : Found as 'SystemNative_StrErrorR'.
09-29 08:55:57.279 3429 3561 D Mono : mono_w32handle_ref_core: ref Event handle 0xae291c58, ref: 3 -> 4
09-29 08:55:57.279 3429 3561 D Mono : ves_icall_System_Threading_Events_SetEvent_internal: setting Event handle 0xae291c58
09-29 08:55:57.279 3429 3561 D Mono : mono_w32handle_unref_core: unref Event handle 0xae291c58, ref: 4 -> 3 destroy: false
09-29 08:55:57.279 3429 3487 D Mono : mono_w32handle_unref_core: unref Event handle 0xae291c58, ref: 3 -> 2 destroy: false
09-29 08:55:57.279 3429 3487 D Mono : event_handle_own: owning Event handle 0xae291c58
09-29 08:55:57.279 3429 3487 D Mono : mono_w32handle_wait_one: handle 0xae291c58 signalled
09-29 08:55:57.279 3429 3487 D Mono : mono_w32handle_unref_core: unref Event handle 0xae291c58, ref: 2 -> 1 destroy: false
09-29 08:55:57.279 3429 3487 D Mono : mono_w32handle_unref_core: unref Event handle 0xae291c58, ref: 1 -> 0 destroy: true
09-29 08:55:57.279 3429 3487 D Mono : w32handle_destroy: destroy Event handle 0xae291c58
09-29 08:55:57.279 3429 3561 D Mono : mono_w32handle_ref_core: ref Event handle 0xae291c3c, ref: 3 -> 4
09-29 08:55:57.279 3429 3561 D Mono : ves_icall_System_Threading_Events_SetEvent_internal: setting Event handle 0xae291c3c
09-29 08:55:57.279 3429 3561 D Mono : mono_w32handle_unref_core: unref Event handle 0xae291c3c, ref: 4 -> 3 destroy: false
09-29 08:55:57.279 3429 3561 D Mono : mono_w32handle_ref_core: ref Event handle 0xae291c3c, ref: 3 -> 4
09-29 08:55:57.279 3429 3561 D Mono : ves_icall_System_Threading_Events_SetEvent_internal: setting Event handle 0xae291c3c
09-29 08:55:57.279 3429 3520 D Mono : mono_w32handle_unref_core: unref Event handle 0xae291c3c, ref: 4 -> 3 destroy: false
09-29 08:55:57.279 3429 3520 D Mono : event_handle_own: owning Event handle 0xae291c3c
09-29 08:55:57.279 3429 3520 D Mono : mono_w32handle_wait_one: handle 0xae291c3c signalled
09-29 08:55:57.279 3429 3520 D Mono : mono_w32handle_unref_core: unref Event handle 0xae291c3c, ref: 3 -> 2 destroy: false
09-29 08:55:57.279 3429 3561 D Mono : mono_w32handle_unref_core: unref Event handle 0xae291c3c, ref: 2 -> 1 destroy: false
09-29 08:55:57.279 3429 3520 D Mono : mono_w32handle_ref_core: ref Event handle 0xae291c3c, ref: 1 -> 2
09-29 08:55:57.279 3429 3520 D Mono : ves_icall_System_Threading_Events_ResetEvent_internal: resetting Event handle 0xae291c3c
09-29 08:55:57.279 3429 3520 D Mono : ves_icall_System_Threading_Events_ResetEvent_internal: obtained write lock on Event handle 0xae291c3c
09-29 08:55:57.279 3429 3520 D Mono : mono_w32handle_unref_core: unref Event handle 0xae291c3c, ref: 2 -> 1 destroy: false
On line 7512 - 7515, you can see exception.
09-29 08:56:01.634 3429 3429 F mono-rt : [ERROR] FATAL UNHANDLED EXCEPTION: System.UnauthorizedAccessException: Access to the path '/storage/emulated/0/Android/data/com.ibocon.unauthorizedaccessexception/files/Test.txt' is denied. ---> System.IO.IOException: Operation not permitted
09-29 08:56:01.634 3429 3429 F mono-rt : --- End of inner exception stack trace ---
09-29 08:56:01.634 3429 3429 F mono-rt : at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.57(intptr,intptr,intptr)
09-29 08:56:01.634 3429 3429 F mono-rt : at (wrapper native-to-managed) Android.Runtime.DynamicMethodNameCounter.57(intptr,intptr,intptr)
Hi @ibocon. Due to inactivity, we will be closing this issue. Please feel free to re-open this issue if the issue persists. For enhanced visibility, if over 7 days have passed, please open a new issue and link this issue there. Thank you.
Steps to Reproduce
Expected Behavior
Actual Behavior
throw System.UnauthorizedAccessException.
Version Information
Android Device
OS
Visual Studio for Mac
Log File
Notes
can be related with #3426 and issue