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

"main" tid=1 Waiting ```Input dispatching timed out (No focused window)```

Open
#1,716 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
18/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
android, kotlin

Research direction

Start with Camera2ApiManager.kt around openCameraId, where the semaphore acquireUninterruptibly call blocks, then trace openCameraFacing and Camera2Source.start up to StreamBase.startPreview in StreamBase.kt. Check every path that acquires the camera semaphore for a missing release, especially failure and close paths. Done means the camera opens without the main thread parking, verified on a device or emulator where the open callback fires.

Written by the indexing model from the issue text.

Description

Describe the bug
The app freezes when attempting to start the camera preview using the startPreview method from StreamBase. The main thread gets stuck in a waiting state at Unsafe.park, causing a deadlock. This issue seems related to the Camera2ApiManager class, particularly around semaphore handling.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the camera preview feature in the app.
  2. Click on 'Start Preview'.
  3. Observe the app freezing without starting the preview.
  4. Check the logcat to see the waiting state error in the stack trace.

Expected behavior
The camera preview should start smoothly without causing the app to hang or enter a waiting state.

Screenshots
No available

Smartphone (please complete the following information):

  • RAM (total memory): 2,048 MB (1,960 MB)
  • System on Chip (SOC): Spreadtrum T603
  • CPU: 4x ARM Cortex-A55 (1800 MHz), 4x ARM Cortex-A55 (1200 MHz)
  • ABI: armeabi-v7a, armeabi
  • Form factor: Phone
  • Screen size: 720x1612
  • Screen density (DPI): 320 (xhdpi)
  • Android version: Android 14 (SDK 34)
  • OpenGL ES version: 3.2
  • GPU: Imagination Tech PowerVR GE8322 (600 MHz)
  • Device: itel-A667L
  • Media server: [e.g. srs, version 5.0]
  • Class used: [e.g. RtmpCamera1]

Additional context
Stack trace highlights:

"main" tid=1 Waiting
  at jdk.internal.misc.Unsafe.park (Native method)
  at java.util.concurrent.locks.LockSupport.park (LockSupport.java:211)
  at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire (AbstractQueuedSynchronizer.java:715)
  at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireShared (AbstractQueuedSynchronizer.java:1027)
  at java.util.concurrent.Semaphore.acquireUninterruptibly (Semaphore.java:341)
  at com.pedro.encoder.input.video.Camera2ApiManager.openCameraId (Camera2ApiManager.kt:616)
  at com.pedro.encoder.input.video.Camera2ApiManager.openCameraFacing (Camera2ApiManager.kt:431)
  at com.pedro.encoder.input.sources.video.Camera2Source.start (Camera2Source.kt:55)
  at com.pedro.library.base.StreamBase.startPreview (StreamBase.kt:366)
  at com.pedro.library.base.StreamBase.startPreview (StreamBase.kt:344)
  at com.pedro.library.base.StreamBase.startPreview$default (StreamBase.kt:326)

Possible causes:

  • Semaphore not being released properly.
  • Deadlock due to improper synchronization.
  • Resource conflict with other threads accessing the camera.

using com.github.pedroSG94.RootEncoder:library:2.5.5

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.