ShipBook / ShipBookSDK-Android

A logging system for Android
https://shipbook.io
MIT License
28 stars 7 forks source link

Fatal Exception: java.lang.OutOfMemoryError #5

Closed Arunachalamkalimuthu closed 3 years ago

Arunachalamkalimuthu commented 3 years ago

We are getting intermittent crash from the Production application.

Retrofit version -> 2.9.0

BuildToolsVersion 30.0.3

Android Version -> 10.0.0

Brand -> OnePlus

Model -> OnePlus Nord N10 5G

Fatal Exception: java.lang.OutOfMemoryError: Failed to allocate a 127314288 byte allocation with 2761160 free bytes and 2696KB until OOM, target footprint 536870912, growth limit 536870912 at libcore.util.CharsetUtils.toUtf8Bytes(CharsetUtils.java) at java.lang.String.getBytes(String.java:946) at kotlin.io.FilesKt__FileReadWriteKt.appendText(FileReadWrite.kt:142) at kotlin.io.FilesKt__FileReadWriteKt.appendText$default(FileReadWrite.kt:142) at io.shipbook.shipbooksdk.Appenders.SBCloudAppender.saveToFile(SBCloudAppender.kt:138) at io.shipbook.shipbooksdk.Appenders.SBCloudAppender.push(SBCloudAppender.kt:218) at io.shipbook.shipbooksdk.Appenders.SBCloudAppender.access$push(SBCloudAppender.kt:33) at io.shipbook.shipbooksdk.Appenders.SBCloudAppender$push$1.invokeSuspend(SBCloudAppender.kt:204) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:919)

elishas commented 3 years ago

The place of the crash doesn't use lots of memory. Your app is probably using lots of memory and by chance this was the last straw. Did it happen several times or only once?

elishas commented 3 years ago

Due to now respond to my previous question I close the issue