-
Notifications
You must be signed in to change notification settings - Fork 6k
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
ImageReader's OnImageAvailableListener gives a massive uncatchable runtime error #8918
Comments
This makes me crazy... What does this exactly mean? How can any nullptr has non-zero capacity?? I'm checking also if
|
Another valuable detail: my sample application works perfectly on Android Emulator (X86), but crashes with the above error on real target device (Samsung, Android 11). |
Here are the full description: Source (in Activity's onResume):
Error (on device):
|
I'm going to put all details into one issue: #8920 |
I'm trying to get frames from video and I'm getting a good progress, but there is a last piece missing:
After creating an ImageReader:
ImageReader r = ImageReader.newInstance(1600,900, ImageFormat.YUV_420_888, 5);
And setting its image available listener:
I'm adding it to ExoPlayer by
setSurface(r.getSurface());
.Luckily,
onImageAvailable
is called, but every time I'm trying to get the planes from the image, it results a very big runtime error, and my application quits.I guess, there is a multithreading issue here, (has some paths in the log pointing to locks and threads).
When I'm trying to use an ImageReader with Exo, what should I give to second parameter of
setOnImageAvailableListener
?It requires a
Handler
. But as ExoPlayer here will be initialized without UI, I think it's not running on the UI thread.Here is my error, related to Exo:
The text was updated successfully, but these errors were encountered: