ReadYouApp / ReadYouApp/ReadYou
OutOfMemoryException when opening an article from a notification
Open
Nobody has claimed this yet.
bug
untriaged
- Dominant language
- Kotlin
- Stars
- 7.5k
- Forks
- 330
- PR merge metrics
- No merged PRs in 30d
Description
Checklist
- I've already searched in existing issues and haven't found a similar problem reported.
- I'm using the latest version of the app
- This error caused the app to crash
- This error is reproducible
Which category best fits this error?
User Interface
App version
0.15.3
Reproduction steps
- Click notification
- Scroll down
- It crashes
Crash report
Version: 0.15.3
Device: Google Pixel 6 Pro
System: Android 16 (API 36)
Stack trace:
.lang.OutOfMemoryError: Failed to allocate a 80 byte allocation with 1191904 free bytes and 1163KB until OOM, target footprint 268435456, growth limit 268435456; giving up on allocation because <1% of heap free after GC.
at android.icu.text.DateTimePatternGenerator$DateTimeMatcher.<init>(DateTimePatternGenerator.java:2746)
at android.icu.text.DateTimePatternGenerator$DateTimeMatcher.<init>(Unknown Source:0)
at android.icu.text.DateTimePatternGenerator.addPatternWithSkeleton(DateTimePatternGenerator.java:855)
at android.icu.text.DateTimePatternGenerator$AvailableFormatsSink.put(DateTimePatternGenerator.java:280)
at android.icu.impl.ICUResourceBundle$1AllChildrenSink.put(ICUResourceBundle.java:505)
at android.icu.impl.ICUResourceBundle.getAllItemsWithFallback(ICUResourceBundle.java:530)
at android.icu.impl.ICUResourceBundle.getAllItemsWithFallback(ICUResourceBundle.java:547)
at android.icu.impl.ICUResourceBundle.getAllItemsWithFallback(ICUResourceBundle.java:547)
at android.icu.impl.ICUResourceBundle.getAllItemsWithFallback(ICUResourceBundle.java:434)
at android.icu.impl.ICUResourceBundle.getAllChildrenWithFallback(ICUResourceBundle.java:511)
at android.icu.text.DateTimePatternGenerator.addCLDRData(DateTimePatternGenerator.java:317)
at android.icu.text.DateTimePatternGenerator.initData(DateTimePatternGenerator.java:158)
at android.icu.text.DateTimePatternGenerator.getFrozenInstance(DateTimePatternGenerator.java:124)
at android.icu.text.DateTimePatternGenerator.getInstance(DateTimePatternGenerator.java:93)
at android.text.format.DateFormat.getTimeFormatString(DateFormat.java:310)
at android.text.format.DateFormat.getTimeFormatString(DateFormat.java:297)
at android.text.format.DateFormat.getTimeFormat(DateFormat.java:286)
at me.ash.reader.ui.ext.DateExtKt.toTimeString(DateExt.kt:1)
at me.ash.reader.ui.ext.DateExtKt.formatAsString(DateExt.kt:28)
at me.ash.reader.infrastructure.android.AndroidStringsHelper.formatAsString(AndroidStringsHelper.kt:5)
at me.ash.reader.infrastructure.android.AndroidStringsHelper.formatAsString$default(AndroidStringsHelper.kt:13)
at me.ash.reader.domain.model.article.ArticleFlowItemKt$mapPagingFlowItem$1.invokeSuspend(ArticleFlowItem.kt:33)
at me.ash.reader.domain.model.article.ArticleFlowItemKt$mapPagingFlowItem$1.invoke(ArticleFlowItem.kt:2)
at me.ash.reader.domain.model.article.ArticleFlowItemKt$mapPagingFlowItem$1.invoke(ArticleFlowItem.kt:1)
at androidx.paging.PageEvent$Insert.map(PageEvent.kt:203)
at androidx.paging.PagingDataTransforms__PagingDataTransformsKt$map$$inlined$transform$1$2.emit(Emitters.kt:70)
at kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2.emit(Emitters.kt:88)
at kotlinx.coroutines.flow.FlowKt__ChannelsKt.emitAllImpl$FlowKt__ChannelsKt(Channels.kt:129)
at kotlinx.coroutines.flow.FlowKt__ChannelsKt$emitAllImpl$1.invokeSuspend(Channels.kt:12)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:9)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:112)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:126)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [LazyStandaloneCoroutine{Cancelling}@6ccf1d0, Dispatchers.Default]
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with DateExt.kt and trace formatAsString through AndroidStringsHelper.kt and ArticleFlowItem.kt, following the stack trace from notification opening and scrolling. Try to reproduce the crash on the reported Android environment if available and inspect memory behavior around date formatting. Done means the reported notification flow no longer crashes with an OutOfMemoryError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100