Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

sending message to a Handler on a dead thread

Open
#2,038 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
15/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
android, kotlin
Domain
mobile

Research direction

The stack trace ends in Android framework code (CameraDeviceImpl.ClientStateCallback.onClosed), with no RootEncoder frame, so the cause is not visible from the payload. Start by reproducing it: stream from the camera, then turn the camera off, and look for where the repository closes the camera and releases its handler or thread. Done when the 'dead thread' error no longer appears in logcat after that sequence.

Written by the indexing model from the issue text.

Description

When the camera is turned off?

2026-02-18 15:29:38.237 LegacyMessageQueue      com.pedro.streamer                  Handler (android.os.Handler) {1d575b8} sending message to a Handler on a dead thread
                                                                                    java.lang.IllegalStateException: Handler (android.os.Handler) {1d575b8} sending message to a Handler on a dead thread
                                                                                    	at android.os.MessageQueue.enqueueMessageLegacy(MessageQueue.java:1391)
                                                                                    	at android.os.MessageQueue.enqueueMessage(MessageQueue.java:1500)
                                                                                    	at android.os.Handler.enqueueMessage(Handler.java:790)
                                                                                    	at android.os.Handler.sendMessageAtTime(Handler.java:739)
                                                                                    	at android.os.Handler.sendMessageDelayed(Handler.java:709)
                                                                                    	at android.os.Handler.post(Handler.java:439)
                                                                                    	at android.hardware.camera2.impl.CameraDeviceImpl$CameraHandlerExecutor.execute(CameraDeviceImpl.java:2874)
                                                                                    	at android.hardware.camera2.impl.CameraDeviceImpl$ClientStateCallback.onClosed(CameraDeviceImpl.java:348)
                                                                                    	at android.hardware.camera2.impl.CameraDeviceImpl$7.run(CameraDeviceImpl.java:301)
                                                                                    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1154)
                                                                                    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:652)
                                                                                    	at java.lang.Thread.run(Thread.java:1563)

Dominant language
Kotlin
Stars
3k
Forks
946
Avg merge
4d 6h
Merged PRs (30d)
9

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pedroSG94/RootEncoder

All issues in pedroSG94/RootEncoder

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.