MaterialFiles icon indicating copy to clipboard operation
MaterialFiles copied to clipboard

App crashes when unpacking files (tried with: zip, 7z, tar, xz, rar)

Open sdazero opened this issue 1 year ago • 24 comments

First oft all thank you very very much for this cool piece oft Software and the effort and time you spent creating it.

I have the Problem that files (formats mentioned in the title) cannot be extracted or opened. I only tried this ones, maybe there are more. Please see the Error Report:

type: crash
osVersion: google/husky/husky:14/UD1A.231105.004/2023110700:user/release-keys
package: me.zhanghai.android.files:34
process: me.zhanghai.android.files
processUptime: 0 + 0 ms
installer: com.android.packageinstaller

signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000008

backtrace:
      #00 pc 0000000000081230  /data/app/~~5IocaLmMOVHyyXfkdrf4Kg==/me.zhanghai.android.files-C42hXRn_kIHDDFrlSBJkTA==/lib/arm64/libarchive-jni.so (Java_me_zhanghai_android_libarchive_Archive_free+68) (BuildId: 5aac375a93b05300900d02c95f753f1f160904ba)
      #01 pc 00000000007bb834  /data/app/~~5IocaLmMOVHyyXfkdrf4Kg==/me.zhanghai.android.files-C42hXRn_kIHDDFrlSBJkTA==/oat/arm64/base.odex (art_jni_trampoline+116)
      #02 pc 00000000008dd1b0  /data/app/~~5IocaLmMOVHyyXfkdrf4Kg==/me.zhanghai.android.files-C42hXRn_kIHDDFrlSBJkTA==/oat/arm64/base.odex (p6.f.j0+1696)
      #03 pc 0000000000cb09a0  /data/app/~~5IocaLmMOVHyyXfkdrf4Kg==/me.zhanghai.android.files-C42hXRn_kIHDDFrlSBJkTA==/oat/arm64/base.odex (ha.f.m+192)
      #04 pc 0000000001507bac  /data/app/~~5IocaLmMOVHyyXfkdrf4Kg==/me.zhanghai.android.files-C42hXRn_kIHDDFrlSBJkTA==/oat/arm64/base.odex (ha.d.k+300)
      #05 pc 00000000015076b4  /data/app/~~5IocaLmMOVHyyXfkdrf4Kg==/me.zhanghai.android.files-C42hXRn_kIHDDFrlSBJkTA==/oat/arm64/base.odex ([DEDUPED] ha.d.a+36)
      #06 pc 0000000001409e78  /data/app/~~5IocaLmMOVHyyXfkdrf4Kg==/me.zhanghai.android.files-C42hXRn_kIHDDFrlSBJkTA==/oat/arm64/base.odex (me.zhanghai.android.files.provider.remote.f1.j+1528)
      #07 pc 0000000000c833dc  /data/app/~~5IocaLmMOVHyyXfkdrf4Kg==/me.zhanghai.android.files-C42hXRn_kIHDDFrlSBJkTA==/oat/arm64/base.odex (fj.k.o+668)
      #08 pc 0000000000cb55d8  /data/app/~~5IocaLmMOVHyyXfkdrf4Kg==/me.zhanghai.android.files-C42hXRn_kIHDDFrlSBJkTA==/oat/arm64/base.odex (ha.g.v+856)
      #09 pc 0000000001368ef8  /data/app/~~5IocaLmMOVHyyXfkdrf4Kg==/me.zhanghai.android.files-C42hXRn_kIHDDFrlSBJkTA==/oat/arm64/base.odex (c2.h.j+1640)
      #10 pc 0000000000c833dc  /data/app/~~5IocaLmMOVHyyXfkdrf4Kg==/me.zhanghai.android.files-C42hXRn_kIHDDFrlSBJkTA==/oat/arm64/base.odex (fj.k.o+668)
      #11 pc 0000000000db9630  /data/app/~~5IocaLmMOVHyyXfkdrf4Kg==/me.zhanghai.android.files-C42hXRn_kIHDDFrlSBJkTA==/oat/arm64/base.odex (me.zhanghai.android.files.provider.root.u.v+320)
      #12 pc 0000000000a1de08  /data/app/~~5IocaLmMOVHyyXfkdrf4Kg==/me.zhanghai.android.files-C42hXRn_kIHDDFrlSBJkTA==/oat/arm64/base.odex (y6.j.a+200)
      #13 pc 0000000000a1e4fc  /data/app/~~5IocaLmMOVHyyXfkdrf4Kg==/me.zhanghai.android.files-C42hXRn_kIHDDFrlSBJkTA==/oat/arm64/base.odex (y6.j.d+124)
      #14 pc 0000000000a1f100  /data/app/~~5IocaLmMOVHyyXfkdrf4Kg==/me.zhanghai.android.files-C42hXRn_kIHDDFrlSBJkTA==/oat/arm64/base.odex (y6.n.e+144)
      #15 pc 00000000008e32ec  /data/app/~~5IocaLmMOVHyyXfkdrf4Kg==/me.zhanghai.android.files-C42hXRn_kIHDDFrlSBJkTA==/oat/arm64/base.odex (p6.f.s0+412)
      #16 pc 0000000000f7b64c  /data/app/~~5IocaLmMOVHyyXfkdrf4Kg==/me.zhanghai.android.files-C42hXRn_kIHDDFrlSBJkTA==/oat/arm64/base.odex (v9.f.b+4140)
      #17 pc 000000000063e180  /data/app/~~5IocaLmMOVHyyXfkdrf4Kg==/me.zhanghai.android.files-C42hXRn_kIHDDFrlSBJkTA==/oat/arm64/base.odex (e.u.run+3344)
      #18 pc 00000000001b9a84  /system/framework/arm64/boot.oat (java.util.concurrent.Executors$RunnableAdapter.call+68) (BuildId: 0686d55c9f429dd9716b30e825e5e39c4394cbb9)
      #19 pc 0000000000254a94  /system/framework/arm64/boot.oat (java.util.concurrent.FutureTask.run+180) (BuildId: 0686d55c9f429dd9716b30e825e5e39c4394cbb9)
      #20 pc 00000000002b3d3c  /system/framework/arm64/boot.oat (java.util.concurrent.ThreadPoolExecutor.runWorker+796) (BuildId: 0686d55c9f429dd9716b30e825e5e39c4394cbb9)
      #21 pc 00000000002b0e60  /system/framework/arm64/boot.oat (java.util.concurrent.ThreadPoolExecutor$Worker.run+64) (BuildId: 0686d55c9f429dd9716b30e825e5e39c4394cbb9)
      #22 pc 000000000015f828  /system/framework/arm64/boot.oat (java.lang.Thread.run+72) (BuildId: 0686d55c9f429dd9716b30e825e5e39c4394cbb9)
      #23 pc 00000000002109a4  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612) (BuildId: f7bdda9948b15b446da6cfac2db76877)
      #24 pc 0000000000253b3c  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+172) (BuildId: f7bdda9948b15b446da6cfac2db76877)
      #25 pc 000000000069abc8  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1416) (BuildId: f7bdda9948b15b446da6cfac2db76877)
      #26 pc 00000000000daeac  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+204) (BuildId: ec367bcc42a0769197eb58413b7349bd)
      #27 pc 000000000006fbf0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: ec367bcc42a0769197eb58413b7349bd)

Hope this helps tracking down the issue.



sdazero avatar Nov 13 '23 23:11 sdazero

Is this the same as #1039? What is your app version (and from Play or F-Droid)?

zhanghai avatar Nov 13 '23 23:11 zhanghai

Seems like it's the same as #1039 . The Version used is 1.6.2 (34) from F-Droid Store.

sdazero avatar Nov 14 '23 07:11 sdazero

That's strange though, #1039 has been fixed in 1.6.2.

zhanghai avatar Nov 14 '23 08:11 zhanghai

Screenshot_20231114-180529 Please let me know if I can support you with anything that may help.

sdazero avatar Nov 14 '23 17:11 sdazero

I am using GrapheneOS.

sdazero avatar Nov 14 '23 22:11 sdazero

I am also experiencing this issue on Android 13 DivestOS version 1.6.2 (34), downloaded from github.

However I can't even open the archive files as they crash immediately on click.

KaiserCalm avatar Nov 14 '23 23:11 KaiserCalm

I'm experiencing this issue too. I have the 1.6.2 (34) version of the app from F-droid and my phone is running Android 13 with DivestOS. Opening or extracting archive files crashes the app immediately.

0JCup0 avatar Nov 14 '23 23:11 0JCup0

Does (temporarily) turning on the "exploit protection compatibility mode" in "Settings ➔ Apps ➔ App ➔ Advanced" work around the issue for you?

zhanghai avatar Nov 15 '23 02:11 zhanghai

No. It does not make and difference whether it is enabled/disabled.

sdazero avatar Nov 15 '23 06:11 sdazero

I am also having this problem, guaranteed crash when opening or creating any archive format on GrapheneOS, Android 14 Pixel 8 Pro

Doc-4 avatar Nov 19 '23 01:11 Doc-4

Okay, maybe this is interesting. I tried to create an archive from 6 MP3s, it took ~ 1,5 seconds to crash, but the archive was completely written by its subprocess and is not corrupted.

sdazero avatar Nov 19 '23 13:11 sdazero

Does (temporarily) turning on the "exploit protection compatibility mode" in "Settings ➔ Apps ➔ App ➔ Advanced" work around the issue for you?

I see. If you downgrade to app version 1.6.1 and follow the steps above, does the error go away?

zhanghai avatar Nov 19 '23 15:11 zhanghai

I tested the workaround above, it stops the crashing entirely. You don't even have to downgrade to 1.6.1. From what I can tell at a glance, everything that was broken seems to work with the workaround.

Doc-4 avatar Nov 19 '23 20:11 Doc-4

I tested the workaround above, it stops the crashing entirely. You don't even have to downgrade to 1.6.1. From what I can tell at a glance, everything that was broken seems to work with the workaround.

Just turning on exploit protection compatibility worked for you? I tried again and for me it does not work. I'll try with 1.6.1 now.

sdazero avatar Nov 19 '23 20:11 sdazero

Okay. I tried with 1.6.1 and it works, no matter if exploit protection compatibility mode is enabled/disabled. Tried again with 1.6.2 results in crashing again.

sdazero avatar Nov 19 '23 20:11 sdazero

Does (temporarily) turning on the "exploit protection compatibility mode" in "Settings ➔ Apps ➔ App ➔ Advanced" work around the issue for you?

On GrapheneOS 14 and v1.6.2 and this fixed the issue.

lokesh-krishna avatar Nov 21 '23 05:11 lokesh-krishna

Okay, my failure. I enabled/disabled it in Security Settings. In App-Settings it works.

sdazero avatar Nov 21 '23 08:11 sdazero

I've built a new release APK (please manually remove the .zip suffix, GitHub doesn't let me upload .apk) from tip of master. Could you please test it with Hardened memory allocator on and see if it crashes?

zhanghai avatar Dec 20 '23 04:12 zhanghai

I've built a new release APK (please manually remove the .zip suffix, GitHub doesn't let me upload .apk) from tip of master. Could you please test it with Hardened memory allocator on and see if it crashes?

I ran it through some tests, was unable to make it crash with hardening turned on by creating or extracting archives

Doc-4 avatar Dec 20 '23 07:12 Doc-4

OK that's super weird, I haven't done anything to fix this. But if the above release build fixes the issue you can expect the next release version to fix it as well. For now, you may temporarily turn off Hardened memory allocator.

zhanghai avatar Dec 20 '23 07:12 zhanghai

I've built a new release APK (please manually remove the .zip suffix, GitHub doesn't let me upload .apk) from tip of master. Could you please test it with Hardened memory allocator on and see if it crashes?

I also had no Problem extracting/creating files with this release and enabled HMA. Besides there where 3 or maybe more grapheneos updates since our last test.

_20231220_083047

sdazero avatar Dec 20 '23 07:12 sdazero

Tested with prior release to compare again and the prior release crashed.

sdazero avatar Dec 20 '23 07:12 sdazero

Latest release was crashing for me when either hardened memory allocator or memory tagging (available on pixel 8 series) were enabled. However with the apk provided here it works fine with both of them enabled. Thanks!

k2helix avatar Dec 30 '23 20:12 k2helix

Pixel 6 Pro - GrapheneOS (Latest A14) Fdroid version of Material Files crashes when zip/unzip files unless Hardened memory allocator is disabled. But latest CI build of Material files works well without changing any security settings of GrapheneOS.

Undisputed00x avatar Feb 17 '24 13:02 Undisputed00x

I'll close this as fixed since the release APK in https://github.com/zhanghai/MaterialFiles/issues/1065#issuecomment-1863818336 is said to be fixing the issue.

zhanghai avatar Mar 04 '24 08:03 zhanghai