-
Notifications
You must be signed in to change notification settings - Fork 429
native crash and app can't pickup the exception #183
Comments
The reason why I got this error is because one of the files that I was decrypting was already unencrypted. I did add on my side a boolean to check before decrypting if the file was encrypted. It would be nice to have an api that checks if a file was encrypted or not or send a more descriptive exception. |
I will get into why the C++ exception is not thrown and handled by Java as it should! The stacktrace you posted suggest there's an "assert" problem when trying to convert the C++ exception to Java exception. If you want, you can check if the file starts with those bytes, to manually check the format (but yes, errors should be converted to Java!!):
|
@helios175 Thank you for the response :) |
I had the same problem. |
@sinianxunmi Sorry for the late reply. What I did was that I kept track, in my local DB, if a file is decrypted or not. Make sure that that boolean is always updated when encrypting/decrypting the file. Hope this helps! |
Sometimes I get the following crash in release mode only.
The crash:
fbassert: Assert (/Users/heliosalonso/github/helios175/conceal/first-party/fbjni/native/fb/jni/Exceptions.cpp:308): ptr
F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
F DEBUG : Build fingerprint: 'samsung/gts28vewifixx/gts28vewifi:7.0/NRD90M/T713XXU2BQD3:user/release-keys'
F DEBUG : Revision: '5'
F DEBUG : ABI: 'arm'
F DEBUG : pid: 30174, tid: 30174, name: .atheer.airflow >>> com.atheer.airflow <<<
F DEBUG : signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xdeadb00c
F DEBUG : Abort message: 'Assert (/Users/heliosalonso/github/helios175/conceal/first-party/fbjni/native/fb/jni/Exceptions.cpp:308): ptr'
F DEBUG : r0 0000006d r1 00000000 r2 00000000 r3 deadb00c
F DEBUG : r4 cebe1098 r5 fff408e4 r6 fff408e0 r7 f0d09008
F DEBUG : r8 fff408e4 r9 f0705900 sl 00000000 fp fff409bc
F DEBUG : ip f30d8c74 sp fff40890 lr ceba7e6b pc ceba7e6e cpsr 600f0030
F DEBUG :
F DEBUG : backtrace:
F DEBUG : #00 pc 00009e6e /data/app/com.atheer.airflow-1/lib/arm/libfb.so (_ZN8facebook14assertInternalEPKcz+69)
F DEBUG : #1 pc 0000b6df /data/app/com.atheer.airflow-1/lib/arm/libfb.so (_ZN8facebook3jni31getJavaExceptionForCppExceptionENSt15__exception_ptr13exception_ptrE+42)
F DEBUG : #2 pc 0000b77f /data/app/com.atheer.airflow-1/lib/arm/libfb.so (_ZN8facebook3jni43translatePendingCppExceptionToJavaExceptionEv+26)
F DEBUG : #3 pc 0000dcdd /data/app/com.atheer.airflow-1/lib/arm/libconcealjni.so
F DEBUG : #4 pc 013680e5 /data/app/com.atheer.airflow-1/oat/arm/base.odex (offset 0x12f4000)
Also I use the proguard that was provided here https://github.com/facebook/conceal/blob/master/proguard_annotations.pro
The library loads fine after I enabled multiDexEnabled in app gradle.
The text was updated successfully, but these errors were encountered: