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

Crash - java.lang.IllegalStateException: Couldn't read row 32, col 0 from CursorWindow #244

Open
jameshermida opened this issue Oct 31, 2024 · 9 comments

Comments

@jameshermida
Copy link

Hi,

We're experiencing a crash in our Android app:

          Fatal Exception: java.lang.RuntimeException: Unable to stop activity {com.grubhub.android/com.grubhub.dinerapp.android.splash.SplashActivity}: java.lang.IllegalStateException: Couldn't read row 32, col 0 from CursorWindow.  Make sure the Cursor is initialized correctly before accessing data from it.
       at android.app.ActivityThread.callActivityOnStop(ActivityThread.java:4977)
       at android.app.ActivityThread.performStopActivityInner(ActivityThread.java:4948)
       at android.app.ActivityThread.handleStopActivity(ActivityThread.java:5022)
       at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:233)
       at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
       at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
       at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2152)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loop(Looper.java:250)
       at android.app.ActivityThread.main(ActivityThread.java:7886)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:970)
          Caused by java.lang.IllegalStateException: Couldn't read row 32, col 0 from CursorWindow.  Make sure the Cursor is initialized correctly before accessing data from it.
       at android.database.CursorWindow.nativeGetString(CursorWindow.java)
       at android.database.CursorWindow.getString(CursorWindow.java:469)
       at android.database.AbstractWindowedCursor.getString(AbstractWindowedCursor.java:53)
       at com.tealium.core.persistence.m.b(SourceFile:37)
       at com.tealium.core.persistence.m.dequeue(SourceFile:2)
       at com.tealium.core.persistence.l.dequeue(SourceFile:108)
       at com.tealium.core.messaging.a.b(SourceFile:3)
       at com.tealium.core.messaging.a.onRevalidate(SourceFile:4)
       at com.tealium.core.messaging.c$q.a(SourceFile:86)
       at com.tealium.core.messaging.c$q.invoke(SourceFile:1)
       at com.tealium.core.messaging.c.a(SourceFile:13)
       at com.tealium.core.messaging.c.onRevalidate(SourceFile:1)
       at com.tealium.core.validation.a.onActivityStopped(SourceFile:3)
       at com.tealium.core.messaging.c$c.a(SourceFile:109)
       at com.tealium.core.messaging.c$c.invoke(SourceFile:1)
       at com.tealium.core.messaging.c.a(SourceFile:13)
       at com.tealium.core.messaging.c.onActivityStopped(SourceFile:1)
       at com.tealium.core.a$a.onActivityStopped(SourceFile:1)
       at android.app.Application.dispatchActivityStopped(Application.java:496)
       at android.app.Activity.dispatchActivityStopped(Activity.java:1497)
       at android.app.Activity.onStop(Activity.java:2659)
       at androidx.fragment.app.FragmentActivity.onStop(FragmentActivity.java:368)
       at androidx.appcompat.app.AppCompatActivity.onStop(AppCompatActivity.java:257)
       at com.grubhub.dinerapp.android.splash.SplashActivity.onStop(SplashActivity.kt:109)
       at android.app.Instrumentation.callActivityOnStop(Instrumentation.java:1476)
       at android.app.Activity.performStop(Activity.java:8329)
       at android.app.ActivityThread.callActivityOnStop(ActivityThread.java:4969)
       at android.app.ActivityThread.performStopActivityInner(ActivityThread.java:4948)
       at android.app.ActivityThread.handleStopActivity(ActivityThread.java:5022)
       at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:233)
       at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
       at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
       at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2152)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loop(Looper.java:250)
       at android.app.ActivityThread.main(ActivityThread.java:7886)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:970)

We're unable to reproduce the issue. Over the past 90 days, it has occurred ~300 times, impacting ~250 users.

Here are the libraries and their version we're using:

tealium_core = { module = "com.tealium:kotlin-core", version.ref = "tealium_core" }
tealium_tagmanagement = { module = "com.tealium:kotlin-tagmanagement-dispatcher", version.ref = "tealium_tagmanagement" }
tealium_ad_identifier = { module = "com.tealium:kotlin-ad-identifier", version.ref = "tealium_ad_identifier" }

tealium_core = "1.5.4"
tealium_tagmanagement = "1.2.0"
tealium_ad_identifier = "1.1.2"

Thank you!

@jameskeith
Copy link
Contributor

Hi @jameshermida
Sorry to hear about the crashes, we'll get someone to look into it and let you know what we find.

@jameskeith
Copy link
Contributor

@jameshermida whilst we're looking into the issue, is it possible for you to provide us the configuration code you use to initialize Tealium? if you cannot post that here, then could you send it via a ticket at support.tealiumiq.com ?

@jameshermida
Copy link
Author

Hi @jameskeith,

Here's the initialization code. Let me know if you need anything else!

val tealiumConfig = TealiumConfig(
    application,
    tealiumAccount,
    tealiumProfileId,
    if (tealiumDebugEnv) Environment.DEV else Environment.PROD,
    collectors = mutableSetOf(
        Collectors.Tealium,
        Collectors.App,
    ),
    modules = mutableSetOf(AdIdentifier),
    dispatchers = mutableSetOf(TagManagementDispatcher)
)
Tealium.create(TealiumClient.TEALIUM_INSTANCE, tealiumConfig)

@jameshermida
Copy link
Author

Hi @jameskeith. Any updates on this? Thanks

@jameskeith
Copy link
Contributor

@jameshermida Thanks for the config; much appreciated.

We've found the cause of the crash and are currently working on a fix - so I'll get back in touch once there's a new release available.

@jameshermida
Copy link
Author

Thanks @jameskeith! Do you have an idea when the next release will be?

@jameskeith
Copy link
Contributor

@jameshermida - I'm afraid I don't have a fixed date yet. There are a couple of fixes we've got planned for the next release, along with this one. The work for these are mostly finished, but need to go through test/review before I can offer anything more concrete.

@JakubObroslak
Copy link

@jameskeith Did this particular issue got fixed in latest version (1.7.0)?

@jameskeith
Copy link
Contributor

@JakubObroslak @jameshermida - yes, there were some changes added to v1.7.0 to alleviate a few similar issues - apologies I'd meant to notify on this issue once it was released.

please let me know how you get on.

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