Open Kita2345 opened 2 years ago
Can you provide the URL to reproduce it?
Then again this is a very long URL. We should be able to fix it though.
See https://sqlite.org/limits.html: LIKE
is (by default) limited to 50000 bytes.
Looks like HistoryDatabase.findHistoryEntriesContaining
needs to be adjusted, maybe a length limit for query
?
And indeed, limiting search
stops the crash from happening: search = "%${query.substring(0, query.lastIndex.coerceAtMost(1000))}%"
o7.c: The exception was not handled due to missing onError handler in the subscribe() method call. Further reading: https://github.com/ReactiveX/RxJava/wiki/Error-Handling | android.database.sqlite.SQLiteException: LIKE or GLOB pattern too complex (code 1 SQLITE_ERROR) at s7.a$f.d(:1) at c8.c.a(Unknown Source:13) at w7.w$a.f(:4) at w7.w$c.m(Unknown Source:29) at w7.w$a.run(Unknown Source:17) at m7.b$b.run(Unknown Source:2) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6692) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) Caused by: android.database.sqlite.SQLiteException: LIKE or GLOB pattern too complex (code 1 SQLITE_ERROR) at android.database.sqlite.SQLiteConnection.nativeExecuteForCursorWindow(Native Method) at android.database.sqlite.SQLiteConnection.executeForCursorWindow(SQLiteConnection.java:859) at android.database.sqlite.SQLiteSession.executeForCursorWindow(SQLiteSession.java:836) at android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:62) at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:149) at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:137) at android.database.AbstractCursor.moveToPosition(AbstractCursor.java:220) at android.database.AbstractCursor.moveToNext(AbstractCursor.java:269) at h.i.call(:17) at z7.b.i(:1) at l7.o.c(:2) at w7.k$a.g(:2) at w7.b0$b.g(Unknown Source:2) at w7.z$b.d(Unknown Source:122) at w7.z$b.g(Unknown Source:23) at w7.j$b.h(Unknown Source:28) at w7.j$b.g(Unknown Source:0) at w7.v$a.g(:2) at w7.x$a.d(Unknown Source:49) at w7.x$a.g(Unknown Source:5) at w7.n$a.g(Unknown Source:2) at y7.f$a.g(Unknown Source:2) at j8.b.g(:3) at o0.h$a.performFiltering(Unknown Source:26) at android.widget.Filter$RequestHandler.handleMessage(Filter.java:234) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:193) at android.os.HandlerThread.run(HandlerThread.java:65)