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

OOM crash after connecting NFC reader #434

Closed
jasells opened this issue Feb 26, 2024 · 2 comments
Closed

OOM crash after connecting NFC reader #434

jasells opened this issue Feb 26, 2024 · 2 comments

Comments

@jasells
Copy link

jasells commented Feb 26, 2024

Summary

After connecting to NFC reader (30 sec or more sometimes). We get the following crash:

java.lang.OutOfMemoryError: Failed to allocate a 1129272416 byte allocation with 29686584 free bytes and 246MB until OOM, target footprint 39582112, growth limit 268435456
  at com.squareup.tape2.QueueFile$ElementIterator.next(QueueFile.java:549)
  at com.squareup.tape2.QueueFile$ElementIterator.next(QueueFile.java:514)
  at com.stripe.jvmcore.batchdispatcher.collectors.QueueFileCollector$peek$2.invokeSuspend(QueueFileCollector.kt:388)
  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
  at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
  at java.lang.Thread.run(Thread.java:1012)

Code to reproduce

Android version

13, 14

Impacted devices (Android devices or readers)

Internal NFC reader/device

Pixel 4/4a
Samsung Galaxy S21FE
Lenovo Tab M8 (4th gen)

SDK version

2.20.0 / 2.23.3 (much more prevalent)

Other information

This seems to be the same issue posted on the tape2 repo.

We only recently started seeing this in our branch where we were updating from 2.20.0 -> 2.23.3, however we just saw one report from our production app still on 2.20.0

In our development to upgrade to v2.23.3, it is occurring regularly anytime we connect the NFC reader in our production app (both debug and release builds), but attempts to reproduce in a simpler app have thus far failed.

Is there a reason stripe is using what appears to be a dead library?

@ugochukwu-stripe
Copy link
Contributor

Hi @jasells, we rolled out a fix for a similar issue in 3.3.1, could you try reproducing with the latest release and let us know if you're still experiencing the same problem.

@ugochukwu-stripe
Copy link
Contributor

Closing due to inactivity, feel free to open a new issue if you're still experiencing the same error

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

2 participants