java.lang.OutOfMemoryError: Failed to allocate a 178131144 byte allocation with 50331648 free bytes and 163MB until OOM, target footprint 416188144, growth limit 536870912
at com.google.protobuf.AbstractMessageLite.toByteArray(AbstractMessageLite.java:47)
at anki.backend.GeneratedBackend.addMediaFile(GeneratedBackend.kt:2883)
at com.ichi2.anki.libanki.Media.addFile(Media.kt:69)
at com.ichi2.anki.servicelayer.NoteService.importMediaToDirectory(NoteService.java:144)
at com.ichi2.anki.NoteEditorFragment$addMediaFileToField$1.invokeSuspend$lambda$0(NoteEditorFragment.kt:2079)
at com.ichi2.anki.CollectionManager.withCol$lambda$1(CollectionManager.kt:146)
at com.ichi2.anki.CollectionManager$withQueue$3.invokeSuspend(CollectionManager.kt:128)
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.java: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: [r0{Cancelling}@e987957, Dispatchers.Main.immediate]
178MB file: https://ankidroid.org/acra/app/1/bug/360462/report/91d6bb58-e609-440f-9bc0-e021667d50b6
Errorand warn the userAddMediaFileonly accepts a byte array, not a file referenceaddMediaFile[ByPath]inAnki-Android-Backend