Skip to content
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

[core] Application crashes if the custom object associated with the event was too large. #6

Closed
wasnot opened this issue Jan 26, 2021 · 1 comment

Comments

@wasnot
Copy link
Contributor

wasnot commented Jan 26, 2021

Expected Behavior

SDK works properly without a crash.

Current Behavior

Application will crash if the custom object associated with the event was too large.

Possible Solution

This issue has been fixed in core 2.9.0
https://developers.karte.io/docs/release-notes-android-sdk-v2#core-290

Steps to Reproduce

  1. Implement the SDK to fire events containing large custom objects
  2. Launch the app

Context (Environment)

This problem occurs if you are using core 2.8.0 or lower.

Detailed Description

Crash Log
W/CursorWindow: Window is full: requested allocation 6915905 bytes, free space 2096537 bytes, window size 2097152 bytes
E/SQLiteQuery: exception: Row too big to fit into CursorWindow requiredPos=0, totalRows=1; query: SELECT * FROM events WHERE state != ? ORDER BY _id ASC
E/AndroidRuntime: FATAL EXCEPTION: io.karte.android.Tracker
    Process: io.karte.android.sample, PID: 18314
    android.database.sqlite.SQLiteBlobTooBigException: Row too big to fit into CursorWindow requiredPos=0, totalRows=1
        at android.database.sqlite.SQLiteConnection.nativeExecuteForCursorWindow(Native Method)
        at android.database.sqlite.SQLiteConnection.executeForCursorWindow(SQLiteConnection.java:942)
        at android.database.sqlite.SQLiteSession.executeForCursorWindow(SQLiteSession.java:838)
        at android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:62)
        at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:153)
        at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:140)
        at io.karte.android.utilities.datastore.DataStore$Companion.read(DataStore.kt:166)
        at io.karte.android.utilities.datastore.Transaction.read(Interface.kt:72)
        at io.karte.android.utilities.datastore.Persister$DefaultImpls.read$default(Interface.kt:39)
        at io.karte.android.tracking.queue.Dispatcher.run(Dispatcher.kt:107)
        at io.karte.android.tracking.queue.Dispatcher.access$run(Dispatcher.kt:48)
        at io.karte.android.tracking.queue.Dispatcher$push$2.invoke(Dispatcher.kt:84)
        at io.karte.android.tracking.queue.Dispatcher$push$2.invoke(Dispatcher.kt:48)
        at io.karte.android.tracking.queue.DispatcherKt$sam$java_lang_Runnable$0.run(Unknown Source:2)
        at android.os.Handler.handleCallback(Handler.java:883)
        at android.os.Handler.dispatchMessage(Handler.java:100)
        at android.os.Looper.loop(Looper.java:214)
        at android.os.HandlerThread.run(HandlerThread.java:67)

Possible Implementation

@wasnot wasnot closed this as completed Jan 26, 2021
@wasnot
Copy link
Contributor Author

wasnot commented Jun 18, 2021

This crash was reproduced even after core 2.9.0, and we released core 2.9.1 with additional fixes.
https://developers.karte.io/docs/release-notes-android-sdk-v2#core-291

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

1 participant