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

Occasional "Handler on dead thread" exception when backing out of VideoActivity #71

Closed
oseparovic opened this issue Sep 19, 2017 · 4 comments

Comments

@oseparovic
Copy link
Contributor

Not a crash but a logged error (probably a printStackTrace()). Please close if this is not an issue. Happens SOMETIMES when leaving an active dash video activity. Am I missing some tear-down code?

This is in my onPause()

    if (mVideoView.isPlaying()) {
        mVideoView.stopPlayback();
        mVideoView.setVideoSource(null);
    }

And here is the stacktrace

W/MessageQueue: Handler (android.os.Handler) {421a1010} sending message to a Handler on a dead thread
java.lang.RuntimeException: Handler (android.os.Handler) {421a1010} sending message to a Handler on a dead thread
at android.os.MessageQueue.enqueueMessage(MessageQueue.java:294)
at android.os.Handler.enqueueMessage(Handler.java:618)
at android.os.Handler.sendMessageAtTime(Handler.java:587)
at android.os.Handler.sendMessageDelayed(Handler.java:558)
at android.os.Handler.sendMessage(Handler.java:495)
at net.protyposis.android.mediaplayer.dash.DashMediaExtractor$2.onSuccess(DashMediaExtractor.java:625)
at net.protyposis.android.mediaplayer.dash.SegmentDownloader$ResponseCallback.onResponse(SegmentDownloader.java:239)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:141)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
at java.lang.Thread.run(Thread.java:856)
@protyposis
Copy link
Owner

Thanks, this seems to happen when a segment download finishes at the same time the activity is destroyed. Not really a problem, but I'll still fix it for the next version.

protyposis added a commit that referenced this issue Oct 7, 2017
@protyposis
Copy link
Owner

Issue is fixed in 4.3.2.

@oseparovic
Copy link
Contributor Author

Awesome, I'll test it out ASAP and let you know if I see it anymore

@oseparovic
Copy link
Contributor Author

Cannot reproduce. Closing

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

No branches or pull requests

2 participants