-
Notifications
You must be signed in to change notification settings - Fork 602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React Native Android thread crashes in production (java.util.concurrent.RejectedExecutionException) #397
Comments
Is this issue reproducible? I don't see a clear explanation in the stack trace about why the execution is rejected. |
Additional info in my case:
Seems like the executor has been shutdown already? https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadPoolExecutor.html |
@mars-lan Thanks. Is this behaviour reproducible? |
@tanersener unfortunately it's kind of random and not readily reproducible. However, it's frequent enough that it's one of the top crashing issues on our Crashlytics. |
We don't see it in the test apps. So, hard to make a comment about it. |
I found the root cause and was able to reproduce it. This line shuts down the executor when the main activity is destroyed. In many cases, the application process will also be killed so the cleanup is justified. However, if the application has any other services running, e.g. a foreground service, the process won't be killed. As a result, the executor won't be recreated when the main activity is launched again, thus leading to the submission of tasks to a terminated executor. |
Thanks for the analysis. Let me check the lifecycle documentation to verify your theory. |
I removed that line in the new |
I updated v4.5.2 to production, looks like the bug is confirmed fixed. @tanersener I think we can resolve this issue now. Thank you. |
@davidshariff Great, thanks! |
Description
When running
FFmpegKit.execute
orFFmpegKit.executeWithArguments
on React Native Android, the app crashes abruptly incom.arthenica.ffmpegkit.reactnative.FFmpegKitReactNativeModule.ffmpegSessionExecute
throwingjava.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:
Screenshots
Devices having issues:
Logs
Environment
arm64-v8a
,armeabi-v7a
,armeabi
v4.5.1.full-gpl-lts
main
React: 16.13.1, ffmpeg-kit-react-native: 4.5.1
The text was updated successfully, but these errors were encountered: