我在我的应用程序中使用Facebook Conceal v2.0.1库,有时当我尝试解密图像时,我得到以下本机崩溃:
10-19 15:57:42.885 19174-19174/? A/fbassert: Assert (/Users/heliosalonso/github/helios175/conceal/first-party/fbjni/native/fb/jni/Exceptions.cpp:308): ptr
--------- beginning of crash
10-19 15:57:42.886 19174-19174/? A/libc: Fatal signal 11 (SIGSEGV), code 2, fault addr 0xdeadb00c in tid 19174 (.atheer.airflow)
[ 10-19 15:57:42.887 368: 368 W/ ]
debuggerd: handling request: pid=19174 uid=10278 gid=10278 tid=19174
10-19 15:57:42.985 19268-19268/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
10-19 15:57:42.985 19268-19268/? A/DEBUG: Build fingerprint: 'samsung/gts28vewifixx/gts28vewifi:7.0/NRD90M/T713XXU2BQD3:user/release-keys'
10-19 15:57:42.985 19268-19268/? A/DEBUG: Revision: '5'
10-19 15:57:42.985 19268-19268/? A/DEBUG: ABI: 'arm'
10-19 15:57:42.985 19268-19268/? A/DEBUG: pid: 19174, tid: 19174, name: .atheer.airflow >>> com.atheer.airflow <<<
10-19 15:57:42.985 19268-19268/? A/DEBUG: signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xdeadb00c
10-19 15:57:42.990 19268-19268/? A/DEBUG: Abort message: 'Assert (/Users/heliosalonso/github/helios175/conceal/first-party/fbjni/native/fb/jni/Exceptions.cpp:308): ptr'
10-19 15:57:42.990 19268-19268/? A/DEBUG: r0 0000006d r1 00000000 r2 00000000 r3 deadb00c
10-19 15:57:42.990 19268-19268/? A/DEBUG: r4 cebe1098 r5 fff40824 r6 fff40820 r7 f0d09008
10-19 15:57:42.990 19268-19268/? A/DEBUG: r8 fff40824 r9 f0705900 sl 00000000 fp fff408fc
10-19 15:57:42.990 19268-19268/? A/DEBUG: ip f30d8c74 sp fff407d0 lr ceba7e6b pc ceba7e6e cpsr 600f0030
10-19 15:57:42.992 19268-19268/? A/DEBUG: backtrace:
10-19 15:57:42.992 19268-19268/? A/DEBUG: #00 pc 00009e6e /data/app/com.atheer.airflow-1/lib/arm/libfb.so (_ZN8facebook14assertInternalEPKcz+69)
10-19 15:57:42.992 19268-19268/? A/DEBUG: #01 pc 0000b6df /data/app/com.atheer.airflow-1/lib/arm/libfb.so (_ZN8facebook3jni31getJavaExceptionForCppExceptionENSt15__exception_ptr13exception_ptrE+42)
10-19 15:57:42.992 19268-19268/? A/DEBUG: #02 pc 0000b77f /data/app/com.atheer.airflow-1/lib/arm/libfb.so (_ZN8facebook3jni43translatePendingCppExceptionToJavaExceptionEv+26)
10-19 15:57:42.992 19268-19268/? A/DEBUG: #03 pc 0000dcdd /data/app/com.atheer.airflow-1/lib/arm/libconcealjni.so
10-19 15:57:42.992 19268-19268/? A/DEBUG: #04 pc 013680e5 /data/app/com.atheer.airflow-1/oat/arm/base.odex (offset 0x12f4000)
我有没有办法在Android端捕获该异常?
进入他们的代码似乎他们试图发送一个Android异常,但它在第一行崩溃。
#ifndef FBJNI_NO_EXCEPTION_PTR
local_ref<JThrowable> getJavaExceptionForCppException(std::exception_ptr ptr) {
FBASSERT(ptr); <------- CRASHES OVER HERE
local_ref<JThrowable> previous;
auto func = [&previous] (std::exception_ptr ptr) {
auto current = convertCppExceptionToJavaException(ptr);
if (previous) {
current->initCause(previous);
}
previous = current;
};
denest(func, ptr);
return previous;
}
#endif
答案 0 :(得分:0)
我确实遵循了逻辑,似乎只有在发布时,有时库无法加载。
因此经过大量的挖掘和测试后发现,我的问题的当前解决方案是添加到发布proguard文件-keep class com.facebook.** { *; }
。有关here的更多信息。