Skip to content

ExceptionInInitializerError #334

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
YuriZheng opened this issue May 2, 2017 · 8 comments
Closed

ExceptionInInitializerError #334

YuriZheng opened this issue May 2, 2017 · 8 comments

Comments

@YuriZheng
Copy link

I use sqlcipher to encrypt my database, but occur exception.
The detail:
app/gradle:
externalNativeBuild {
cmake {
cppFlags "-frtti -fexceptions"
}
}
ndk {
ldLibs "log"
abiFilters "armeabi", "x86"
}
......
compile "net.zetetic:android-database-sqlcipher:3.5.7@aar"

I use method:
SQLiteDatabase.openDatabase(path, password, null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READWRITE);

Run application once is success, but i press back to finish activity and re-run application, then occur exception:
`
com.xxx.xxx A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x208403b in tid 27784 (om.zyj.security)
? A/AEE/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
? A/AEE/DEBUG: Build fingerprint: 'LeEco/Le2_CN1/le_x6:6.0/HBXCNCU5902303291S/1490722623:user/release-keys'
? A/AEE/DEBUG: Revision: '0'
? A/AEE/DEBUG: ABI: 'arm'
? A/AEE/DEBUG: pid: 27784, tid: 27784, name: om.zyj.security >>> com.xxx.xxx <<<
? A/AEE/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x208403b
E/Surface: getSlotFromBufferLocked: unknown buffer: 0xede356e0
? A/AEE/DEBUG: r0 d8c73108 r1 00000000 r2 00000007 r3 02084037
? A/AEE/DEBUG: r4 d8c73108 r5 d8c73108 r6 d8459774 r7 d8459774
? A/AEE/DEBUG: r8 00000000 r9 f3d37a00 sl 12c57b20 fp 12cc4ee0
W/PackageManager: checkUidPermission(): android.permission.STATUS_BAR of 10011 is denied.
? A/AEE/DEBUG: ip 00000000 sp ffda20f8 lr d82b29df pc d82b2ba2 cpsr 000b0030
? A/AEE/DEBUG: backtrace:
? A/AEE/DEBUG: #00 pc 00059ba2 /data/app/com.xxx.xxx-1/lib/arm/libsqlcipher.so
? A/AEE/DEBUG: #1 pc 00088da5 /data/app/com.xxx.xxx-1/lib/arm/libsqlcipher.so
? A/AEE/DEBUG: #2 pc 000adf3b /data/app/com.xxx.xxx-1/lib/arm/libsqlcipher.so
? A/AEE/DEBUG: #3 pc 000aea45 /data/app/com.xxx.xxx-1/lib/arm/libsqlcipher.so
? A/AEE/DEBUG: #4 pc 00e946c5 /data/app/com.xxx.xxx-1/oat/arm/base.odex (offset 0x7d0000) (void net.sqlcipher.database.SQLiteDatabase.dbopen(java.lang.String, int)+104)
? A/AEE/DEBUG: #5 pc 00e982d3 /data/app/com.xxx.xxx-1/oat/arm/base.odex (offset 0x7d0000) (void net.sqlcipher.database.SQLiteDatabase.openDatabaseInternal(char[], net.sqlcipher.database.SQLiteDatabaseHook)+142)
? A/AEE/DEBUG: #6 pc 00e97e3f /data/app/com.xxx.xxx-1/oat/arm/base.odex (offset 0x7d0000) (net.sqlcipher.database.SQLiteDatabase net.sqlcipher.database.SQLiteDatabase.openDatabase(java.lang.String, char[], net.sqlcipher.database.SQLiteDatabase$CursorFactory, int, net.sqlcipher.database.SQLiteDatabaseHook, net.sqlcipher.DatabaseErrorHandler)+170)
? A/AEE/DEBUG: #7 pc 00e97bcb /data/app/com.xxx.xxx-1/oat/arm/base.odex (offset 0x7d0000) (net.sqlcipher.database.SQLiteDatabase net.sqlcipher.database.SQLiteDatabase.openDatabase(java.lang.String, java.lang.String, net.sqlcipher.database.SQLiteDatabase$CursorFactory, int, net.sqlcipher.database.SQLiteDatabaseHook, net.sqlcipher.DatabaseErrorHandler)+150)
? A/AEE/DEBUG: #8 pc 00e97b01 /data/app/com.xxx.xxx-1/oat/arm/base.odex (offset 0x7d0000) (net.sqlcipher.database.SQLiteDatabase net.sqlcipher.database.SQLiteDatabase.openDatabase(java.lang.String, java.lang.String, net.sqlcipher.database.SQLiteDatabase$CursorFactory, int, net.sqlcipher.database.SQLiteDatabaseHook)+132)
? A/AEE/DEBUG: #9 pc 00e97a49 /data/app/com.xxx.xxx-1/oat/arm/base.odex (offset 0x7d0000) (net.sqlcipher.database.SQLiteDatabase net.sqlcipher.database.SQLiteDatabase.openDatabase(java.lang.String, java.lang.String, net.sqlcipher.database.SQLiteDatabase$CursorFactory, int)+84)
? A/AEE/DEBUG: #10 pc 00b8aa63 /data/app/com.xxx.xxx-1/oat/arm/base.odex (offset 0x7d0000) (com.zyj.ieasytools.library.db.BaseDatabase$MySQLiteDatabase com.zyj.ieasytools.library.db.BaseDatabase.getSQLiteDatabase(java.lang.String, java.lang.String)+1342)
? A/AEE/DEBUG: #11 pc 00b8af71 /data/app/com.xxx.xxx-1/oat/arm/base.odex (offset 0x7d0000) (void com.zyj.ieasytools.library.db.BaseDatabase.initDatabase(java.lang.String, java.lang.String, java.lang.String)+84)
? A/AEE/DEBUG: #12 pc 00e7818b /data/app/com.xxx.xxx-1/oat/arm/base.odex (offset 0x7d0000) (void com.zyj.ieasytools.library.db.EasyContentProvider$EasySetting.(com.zyj.ieasytools.library.db.EasyContentProvider, android.content.Context)+694)
? A/AEE/DEBUG: #13 pc 00b8bc8d /data/app/com.xxx.xxx-1/oat/arm/base.odex (offset 0x7d0000) (boolean com.zyj.ieasytools.library.db.EasyContentProvider.openSettingsDatabase()+560)
? A/AEE/DEBUG: #14 pc 00b8cd59 /data/app/com.xxx.xxx-1/oat/arm/base.odex (offset 0x7d0000) (android.database.Cursor com.zyj.ieasytools.library.db.EasyContentProvider.query(android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String)+220)
? A/AEE/DEBUG: #15 pc 03017477 /system/framework/arm/boot.oat (offset 0x2679000)

`

I am very surprised why the second time to run to be crashed, The first time is good.
I use Android6.0, API is 23.
Please help me, think you very much!!!

@YuriZheng
Copy link
Author

@developernotes Help me, thank you!

@developernotes
Copy link
Member

Hi @YuriZheng

Are you able to isolate the issue into a repeatable unit test within the SQLCipher for Android test suite?

@YuriZheng
Copy link
Author

YuriZheng commented May 6, 2017

Hi @developernotes
I do not quite understand you, i did not do unit testing
I used the debug package, the problem occurred during the second run

@developernotes
Copy link
Member

Hello @YuriZheng

We are asking that you attempt to replicate the issue you are experiencing within the SQLCipher for Android test suite. Would you give that a try and let us know your results? Thanks!

@YuriZheng
Copy link
Author

Hi @developernotes
Very sorry,
is my code in jni led to the collapse of your library, I have found the reason, the use of illegal variables caused, I have solved, thank you!

@developernotes
Copy link
Member

Hello @YuriZheng

Thanks for reporting back. We are happy to hear you have identified the issue. Take care!

@pks90
Copy link

pks90 commented May 24, 2017

I am experiencing the same issue with 3.5.7 aar downloaded from

but it is crashing my application without any logs. looks like there is some build issue with this. I have another aar 3.5.2 but it works just fine.

Also I have tested using Test Suite but it runs fine 84 tests . Any thoughts ?

@developernotes
Copy link
Member

Hello @pks90

The original reporter of this ticket identified an issue within their code that caused their crash. Would you please open a new ticket, providing the stack trace of your crash, along with any additional relevant information regarding the crash you are experiencing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants