flutter-cavalry / fc_native_video_thumbnail

A Flutter plugin to create video thumbnails via native APIs
BSD 3-Clause "New" or "Revised" License
11 stars 4 forks source link

Crash com.fluttercavalry.fc_native_video_thumbnail.FcNativeVideoThumbnailPlugin.onMethodCall #10

Closed Rohan487 closed 3 months ago

Rohan487 commented 3 months ago

Getting some crashes in google play console related to out of memory issues while using this plugin. My usecase is long list of videos, and using this plugin to generate thumbs for the each item of list, and saving it to dir so that don't have to generate thumb again. But still some user are facing this issue

logs

Exception java.lang.OutOfMemoryError:
  at android.graphics.Bitmap.nativeCreate
  at android.graphics.Bitmap.createBitmap (Bitmap.java:1144)
  at android.graphics.Bitmap.createBitmap (Bitmap.java:971)
  at android.graphics.Bitmap.createScaledBitmap (Bitmap.java:826)
  at android.media.MediaMetadataRetriever._getFrameAtTime
  at android.media.MediaMetadataRetriever.getFrameAtTime (MediaMetadataRetriever.java:767)
  at com.fluttercavalry.fc_native_video_thumbnail.FcNativeVideoThumbnailPlugin.onMethodCall (FcNativeVideoThumbnailPlugin.kt:74)
  at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage (MethodChannel.java:267)
  at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler (DartMessenger.java:292)
  at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger (DartMessenger.java:319)
  at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run
  at io.flutter.embedding.engine.dart.DartMessenger$SerialTaskQueue.flush (DartMessenger.java:173)
  at io.flutter.embedding.engine.dart.DartMessenger$SerialTaskQueue.lambda$dispatch$0$io-flutter-embedding-engine-dart-DartMessenger$SerialTaskQueue (DartMessenger.java:163)
  at io.flutter.embedding.engine.dart.DartMessenger$SerialTaskQueue$$ExternalSyntheticLambda1.run
  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)