Skip to content

OOM in acquisitionScanner for artifacts that are too large #51

@lsd-cat

Description

@lsd-cat

While working on #38 I created hundreds of thousands of files for testing, and while I fixed the files module, the OOM then happens at the analysis level (when loading a files.json that is too big).

2025-10-02 10:38:14.377 22066-22066 AndroidRuntime          org.osservatorionessuno.bugbane      E  FATAL EXCEPTION: main
                                                                                                    Process: org.osservatorionessuno.bugbane, PID: 22066
                                                                                                    java.lang.OutOfMemoryError: Failed to allocate a 32 byte allocation with 163024 free bytes and 159KB until OOM, target footprint 201326592, growth limit 201326592; giving up on allocation because <1% of heap free after GC.
                                                                                                    	at java.lang.StringFactory.newStringFromChars(StringFactory.java:112)
                                                                                                    	at java.io.BufferedReader.readLine(BufferedReader.java:367)
                                                                                                    	at java.io.BufferedReader.readLine(BufferedReader.java:400)
                                                                                                    	at java.nio.file.Files.readAllLines(Files.java:3205)
                                                                                                    	at java.nio.file.Files.readAllLines(Files.java:3242)
                                                                                                    	at org.osservatorionessuno.bugbane.analysis.AcquisitionScanner.scanWithIndicators(AcquisitionScanner.kt:42)
                                                                                                    	at org.osservatorionessuno.bugbane.analysis.AcquisitionScanner.scan(AcquisitionScanner.kt:18)
                                                                                                    	at org.osservatorionessuno.bugbane.screens.AcquisitionDetailScreenKt$AcquisitionDetailScreen$1$1$4.invokeSuspend(AcquisitionDetailScreen.kt:78)
                                                                                                    	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
                                                                                                    	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
                                                                                                    	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)
                                                                                                    	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)
                                                                                                    	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
                                                                                                    	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:811)
                                                                                                    	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:715)
                                                                                                    	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:702)
                                                                                                    	Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [androidx.compose.ui.platform.MotionDurationScaleImpl@e0ea271, androidx.compose.runtime.BroadcastFrameClock@61fc856, StandaloneCoroutine{Cancelling}@316b0d7, AndroidUiDispatcher@7d4fdc4]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions