Skip to content
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

Notify TransformationListener before releasing TransformationJob #198

Merged
merged 1 commit into from
Jun 28, 2022

Conversation

simekadam
Copy link
Contributor

I have seen the release() call hang in certain cases when processing failed as a result of which the listener
callback never invoked. Which then broke our internal app logic as the processing seemed stuck forever.
I think it's better to first invoke the callback so that LiTr users can at least somehow propagate the error to end users or log the associated exception.

How to test:

  1. It's hard to test, but I was able to simulate this on simulator with API 26 (arm64). Granted all video processing than seems broken as the emulator likely simply doesn't support it, but if you open LiTr demo there and try to encode any video it just appears stuck.

This video shows a recording of the issue in Android Studio. I set a breakpoint to manifest that the listener is never hit when it gets stuck in the release call.
https://youtu.be/vo-QVk0agJE

I have seen the release() call hang in certain cases when processing failed as a result of which the listener
callback never invoked which caused our internal logic to get stuck as well.
I think it's better to first invoke the callback so that LiTr users can at least somehow propagate the error to end users or log the associated exception.
@simekadam
Copy link
Contributor Author

simekadam commented Jun 28, 2022

Fixes #197

@izzytwosheds
Copy link
Contributor

Thank you for the fix and careful investigation.
In the future we will have to investigate why release call is hanging.

@izzytwosheds izzytwosheds merged commit 7e65a80 into linkedin:main Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants