Skip to content

Crash on 4.7.0 #55

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
jcrabanal opened this issue Mar 26, 2025 · 9 comments
Closed

Crash on 4.7.0 #55

jcrabanal opened this issue Mar 26, 2025 · 9 comments

Comments

@jcrabanal
Copy link

jcrabanal commented Mar 26, 2025

My app crashes when using net.zetetic:sqlcipher-android:4.7.0, it was fine with 4.6.1. This is a fairly large database.

03-26 17:09:13.464 V/XOneAndroidFramework( 5169): Internal stack trace:
03-26 17:09:13.464 W/System.err( 5169): com.xone.exceptions.XoneGenericException: Javascript runtime exception in native method.
03-26 17:09:13.464 W/System.err( 5169): Exception type: XoneGenericException
03-26 17:09:13.464 W/System.err( 5169): Source: scripts/ot/f_MenuListadoOT.js
03-26 17:09:13.464 W/System.err( 5169): Cause: com.xone.db.commons.SQLException: java.lang.IllegalStateException: UNKNOWN type 7893
03-26 17:09:13.464 W/System.err( 5169): Line number: 215
03-26 17:09:13.464 W/System.err( 5169): In anonymous function
03-26 17:09:13.464 W/System.err( 5169): at xone.runtime.core.XoneDataCollection.LoadAll(XoneDataCollection.java:6232)
03-26 17:09:13.465 W/System.err( 5169): at xone.runtime.core.XoneDataCollection.loadAll(XoneDataCollection.java:9182)
03-26 17:09:13.465 W/System.err( 5169): at java.lang.reflect.Method.invoke(Native Method)
03-26 17:09:13.465 W/System.err( 5169): at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:153)
03-26 17:09:13.465 W/System.err( 5169): at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:223)
03-26 17:09:13.465 W/System.err( 5169): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1186)
03-26 17:09:13.465 W/System.err( 5169): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:468)
03-26 17:09:13.465 W/System.err( 5169): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:87)
03-26 17:09:13.465 W/System.err( 5169): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:375)
03-26 17:09:13.465 W/System.err( 5169): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3361)
03-26 17:09:13.465 W/System.err( 5169): at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:98)
03-26 17:09:13.465 W/System.err( 5169): at com.xone.android.javascript.RhinoJavascriptEngine.run(RhinoJavascriptEngine.java:109)
03-26 17:09:13.465 W/System.err( 5169): at com.xone.android.javascript.XOneJavascript.run(XOneJavascript.java:119)
03-26 17:09:13.465 W/System.err( 5169): at xone.runtime.core.XoneApplication.RunScript(XoneApplication.java:2653)
03-26 17:09:13.465 W/System.err( 5169): at xone.runtime.core.XoneDataObject.DoRunScript(XoneDataObject.java:6867)
03-26 17:09:13.465 W/System.err( 5169): at xone.runtime.core.XoneDataObject.ExecuteNodeAction(XoneDataObject.java:6690)
03-26 17:09:13.465 W/System.err( 5169): at xone.runtime.core.XoneDataObject.ExecuteNodeAction(XoneDataObject.java:6620)
03-26 17:09:13.465 W/System.err( 5169): at xone.runtime.core.XoneDataObject.ExecuteNodeAction(XoneDataObject.java:6607)
03-26 17:09:13.466 W/System.err( 5169): at xone.runtime.core.XoneDataObject.ExecuteNodeActions(XoneDataObject.java:9418)
03-26 17:09:13.466 W/System.err( 5169): at xone.runtime.core.XoneDataObject.ExecuteNodeActions(XoneDataObject.java:9387)
03-26 17:09:13.466 W/System.err( 5169): at xone.runtime.core.XoneDataObject.ExecuteNode(XoneDataObject.java:8801)
03-26 17:09:13.466 W/System.err( 5169): at com.xone.android.framework.tasks.ExecuteNodeTask.doInBackground(ExecuteNodeTask.java:138)
03-26 17:09:13.466 W/System.err( 5169): at com.xone.android.framework.tasks.ExecuteNodeTask.doInBackground(ExecuteNodeTask.java:34)
03-26 17:09:13.466 W/System.err( 5169): at android.os.AsyncTask$3.call(AsyncTask.java:394)
03-26 17:09:13.466 W/System.err( 5169): at java.util.concurrent.FutureTask.run(FutureTask.java:264)
03-26 17:09:13.466 W/System.err( 5169): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:305)
03-26 17:09:13.466 W/System.err( 5169): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
03-26 17:09:13.466 W/System.err( 5169): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
03-26 17:09:13.466 W/System.err( 5169): at java.lang.Thread.run(Thread.java:1117)
03-26 17:09:13.467 W/System.err( 5169): Caused by: com.xone.db.commons.SQLException: java.lang.IllegalStateException: UNKNOWN type 7893
03-26 17:09:13.467 W/System.err( 5169): at com.cgsoft.db.impl.sqlite.SqliteResultSet.getValue(SqliteResultSet.java:232)
03-26 17:09:13.467 W/System.err( 5169): at xone.runtime.core.XoneDataObject.Load(XoneDataObject.java:5478)
03-26 17:09:13.467 W/System.err( 5169): at xone.runtime.core.XoneDataCollection.LoadAll(XoneDataCollection.java:6198)
03-26 17:09:13.467 W/System.err( 5169): ... 28 more
03-26 17:09:13.468 W/System.err( 5169): Caused by: java.lang.IllegalStateException: UNKNOWN type 7893
03-26 17:09:13.469 W/System.err( 5169): at net.zetetic.database.CursorWindow.nativeGetString(Native Method)
03-26 17:09:13.469 W/System.err( 5169): at net.zetetic.database.CursorWindow.getString(CursorWindow.java:286)
03-26 17:09:13.469 W/System.err( 5169): at net.zetetic.database.AbstractWindowedCursor.getString(AbstractWindowedCursor.java:57)
03-26 17:09:13.469 W/System.err( 5169): at com.cgsoft.db.impl.sqlite.SqliteResultSet.getValue(SqliteResultSet.java:224)

The log is also filled with entries like this:

2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 287,103 is INTEGER 0x0000000000000000
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 287,104 is TEXT with 39 bytes
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 287,105 is TEXT with 1 bytes
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 287,106 is NULL
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 287,107 is NULL
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 287,108 is NULL
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 287,109 is INTEGER 0x0000000000000001
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 287,110 is TEXT with 19 bytes
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 287,111 is TEXT with 19 bytes
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 287,112 is TEXT with 8 bytes
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D Stepped statement 0x7654b29a38 to row 288
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,0 is INTEGER 0x0000000000001660
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,1 is TEXT with 9 bytes
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,2 is TEXT with 22 bytes
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,3 is TEXT with 6 bytes
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,4 is TEXT with 34 bytes
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,5 is TEXT with 17 bytes
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,6 is INTEGER 0x0000000000000001
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,7 is NULL
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,8 is INTEGER 0x0000000000000001
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,9 is INTEGER 0x0000000000000001
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,10 is INTEGER 0x0000000000000001
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,11 is TEXT with 2 bytes
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,12 is TEXT with 20 bytes
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,13 is TEXT with 20 bytes
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,14 is TEXT with 5 bytes
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,15 is TEXT with 4 bytes
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,16 is TEXT with 8 bytes
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,17 is TEXT with 10 bytes
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,18 is TEXT with 11 bytes
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,19 is NULL
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,20 is NULL
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,21 is NULL
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,22 is TEXT with 7 bytes
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,23 is NULL
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,24 is NULL
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,25 is TEXT with 11 bytes
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,26 is TEXT with 11 bytes
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,27 is TEXT with 36 bytes
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,28 is FLOAT 0.000000
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,29 is FLOAT 0.000000
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,30 is NULL
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,31 is NULL
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,32 is TEXT with 5 bytes
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,33 is TEXT with 9 bytes
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,34 is NULL
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,35 is TEXT with 4 bytes
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,36 is TEXT with 4 bytes
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,37 is TEXT with 10 bytes
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,38 is NULL
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,39 is NULL
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,40 is TEXT with 2 bytes
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,41 is TEXT with 9 bytes
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,42 is TEXT with 6 bytes
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,43 is TEXT with 6 bytes
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,44 is NULL
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,45 is NULL
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,46 is NULL
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,47 is TEXT with 9 bytes
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,48 is NULL
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,49 is NULL
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,50 is NULL
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,51 is NULL
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,52 is NULL
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,53 is NULL
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,54 is NULL
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,55 is TEXT with 19 bytes
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,56 is TEXT with 10 bytes
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,57 is INTEGER 0x0000000000000000
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,58 is INTEGER 0x0000000000000001
2025-03-26 17:19:28.035 5803-5892 SQLiteConnection com.xone.android.framework D 288,59 is INTEGER 0x0000000000000000

@developernotes
Copy link
Member

Hi @jcrabanal,

Thank you for sharing this feedback, it is helpful. We have just released a new SQLCipher for Android 4.7.1 Community edition build on Maven Central which will address the logcat output from the CursorWindow. Would you give that a try?

With regard to this error message:

03-26 17:09:13.468 W/System.err( 5169): Caused by: java.lang.IllegalStateException: UNKNOWN type 7893
03-26 17:09:13.469 W/System.err( 5169): at net.zetetic.database.CursorWindow.nativeGetString(Native Method)

Would it be possible for you to reach out to us directly at [email protected] with either a sample database that reproduces the issue, or a sample schema, SQL query, and the approximate data size you are querying that is producing this? We would like to investigate the issue further to understand why the unknown type is being reported. Thanks!

@almozavr
Copy link

We have the same issue with net.zetetic:sqlcipher-android:4.7.1 (it was fine with 4.6.1):

Crash for the entity with:

@PrimaryKey
@ColumnInfo(name = "id")
val id: String,

Crash at the Room's generated dao:

java.lang.IllegalStateException: UNKNOWN type 1275068437
	at net.zetetic.database.CursorWindow.nativeGetString(Native Method)
	at net.zetetic.database.CursorWindow.getString(CursorWindow.java:286)
	at net.zetetic.database.AbstractWindowedCursor.getString(AbstractWindowedCursor.java:57)
_tmpId = _cursor.getString(_cursorIndexOfId)
  • _cursor.count is 120
  • _cursor.position is 0
  • _cursor.getType is 1275068437

@jcrabanal
Copy link
Author

Hi @jcrabanal,

Thank you for sharing this feedback, it is helpful. We have just released a new SQLCipher for Android 4.7.1 Community edition build on Maven Central which will address the logcat output from the CursorWindow. Would you give that a try?

With regard to this error message:

03-26 17:09:13.468 W/System.err( 5169): Caused by: java.lang.IllegalStateException: UNKNOWN type 7893
03-26 17:09:13.469 W/System.err( 5169): at net.zetetic.database.CursorWindow.nativeGetString(Native Method)

Would it be possible for you to reach out to us directly at [email protected] with either a sample database that reproduces the issue, or a sample schema, SQL query, and the approximate data size you are querying that is producing this? We would like to investigate the issue further to understand why the unknown type is being reported. Thanks!

I've sent to that email a database and a SQL query that triggers the issue when running the cursor through the rows and the columns.

@jcrabanal jcrabanal reopened this Mar 27, 2025
@developernotes
Copy link
Member

Hi @jcrabanal,

Thank you for sharing the database and query. We are actively investigating the issue and will reach out again when we have more information to share.

@developernotes
Copy link
Member

Hi @almozavr,

Thank you for sharing your details as well. We believe we have isolated the issue and have an internal debug build available with changes we believe will resolve the crash. Would you mind reaching out to us at [email protected] and we can provide you with a link to the debug build for verification? We have supplied the same build to @jcrabanal. We look forward to hearing from you. Thanks!

@jcrabanal
Copy link
Author

Tested the debug aar, it seems to be working fine. No crashes when running the same queries.

@developernotes
Copy link
Member

Hi @jcrabanal, @almozavr,

A new release of SQLCipher for Android 4.7.2 has been published which contains fixes for the issues identified in this thread, along with separate but related issue. Thank you again for your help in isolating the issue so it could be resolved quickly.

@almozavr
Copy link

almozavr commented Apr 1, 2025

@developernotes thank you for a blazing fast response and the fixes ⭐️

@jcrabanal
Copy link
Author

Fixed on 4.7.2, yes.

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