Skip to content

React Native Android thread crashes in production (java.util.concurrent.RejectedExecutionException) #397

Closed
@davidshariff

Description

@davidshariff

Description
When running FFmpegKit.execute or FFmpegKit.executeWithArguments on React Native Android, the app crashes abruptly in com.arthenica.ffmpegkit.reactnative.FFmpegKitReactNativeModule.ffmpegSessionExecute throwing java.util.concurrent.RejectedExecutionException.

Expected behavior
Should resolve with the FFMPEG output or throw an error.

Current behavior
Crashes the app.

To Reproduce
I'm currently running the following command:

FFmpegKit.executeWithArguments([
    '-i', uri,
    '-ac', '1',
    '-vn',
    '-c:a', 'flac',
    outputFilePath
])

Screenshots
Devices having issues:
Screen Shot 2022-04-15 at 2 28 25 PM

Logs

java.util.concurrent.RejectedExecutionException: 
  at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution (ThreadPoolExecutor.java:2086)
  at java.util.concurrent.ThreadPoolExecutor.reject (ThreadPoolExecutor.java:848)
  at java.util.concurrent.ThreadPoolExecutor.execute (ThreadPoolExecutor.java:1394)
  at java.util.concurrent.AbstractExecutorService.submit (AbstractExecutorService.java:118)
  at com.arthenica.ffmpegkit.reactnative.FFmpegKitReactNativeModule.ffmpegSessionExecute (FFmpegKitReactNativeModule.java:595)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.facebook.react.bridge.JavaMethodWrapper.invoke (JavaMethodWrapper.java:372)
  at com.facebook.react.bridge.JavaModuleWrapper.invoke (JavaModuleWrapper.java:151)
  at com.facebook.react.bridge.queue.NativeRunnable.run (Native Method)
  at android.os.Handler.handleCallback (Handler.java:938)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage (MessageQueueThreadHandler.java:27)
  at android.os.Looper.loop (Looper.java:246)
  at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run (MessageQueueThreadImpl.java:226)
  at java.lang.Thread.run (Thread.java:923)

Environment

  • Platform: ReactNative Android
  • Architecture: arm64-v8a, armeabi-v7a, armeabi
  • Version: v4.5.1.full-gpl-lts
  • Source branch: main
  • react-native info: React: 16.13.1, ffmpeg-kit-react-native: 4.5.1

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions