Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

RtspStream.stopRecord() sometimes blocks in Service.onDestroy() since 2.8.1

オープン
#2,192 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
android, kotlin

調査の方向性

Start by reading the RtspStream.stopRecord() implementation and the RecordController stop/status-callback path, then check how they interact with Android Service onDestroy(). Try to reproduce the intermittent hang on the reported Android 13 device and compare behavior between library versions 2.6.7 and 2.8.1. Done means stopRecord() returns during service destruction and the STOPPED event is emitted.

索引モデルが issue の本文から書いたものです。

説明

Describe the bug
After upgrading the library from version 2.6.7 to 2.8.1, RtspStream.stopRecord() sometimes blocks when it is called from the onDestroy() method of an Android Service.
With library version 2.6.7, the same implementation worked correctly.
When the issue occurs, the call to:
rtspStream.stopRecord()
does not appear to return. The expected RecordController onStatusChange STOPPED event is not received.
The issue is intermittent and does not occur every time the Service is destroyed.

To Reproduce
Steps to reproduce the behavior:

Use com.github.pedroSG94.RootEncoder:library:2.8.1.
Use an Android 13 custom device.
Create and start an RtspStream.
Start recording.
Destroy the Android Service that manages the stream.
Call rtspStream.stopRecord() from the Service onDestroy() method.
In some cases, stopRecord() appears to block.
The expected RecordController onStatusChange STOPPED event is never received.
Code after rtspStream.stopRecord() is not executed.

The same steps work correctly with library version 2.6.7.

Expected behavior
rtspStream.stopRecord() should complete normally when called from the Service onDestroy() method.
The RecordController should emit the STOPPED status event and execution should continue with the code following rtspStream.stopRecord().
This behavior worked correctly with library version 2.6.7.

Library version: 2.8.1
Device: Custom Android device
OS: Android 13
Media server: RTSP
Class used: RtspStream

Additional context
The application uses:

implementation "com.github.pedroSG94.RootEncoder:library:2.8.1"

The problem appears to be a regression between library versions 2.6.7 and 2.8.1, since the same application code and device configuration worked correctly with version 2.6.7.

The relevant code is executed from the onDestroy() method of an Android Service:

override fun onDestroy() {
// ...
rtspStream.stopRecord()
// These instructions are not executed when the issue occurs
// ...
super.onDestroy()
}

When the problem occurs, execution stops at rtspStream.stopRecord(). I do not receive the expected:
RecordController onStatusChange STOPPED callback.

The issue is intermittent: sometimes stopRecord() works correctly, while other times it appears to remain blocked indefinitely.

主要言語
Kotlin
スター
3k
フォーク
946
平均マージ
4日 6時間
マージ済み PR(30日)
9

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pedroSG94/RootEncoder のほかの issue

pedroSG94/RootEncoder の issue をすべて見る

似ている issue

Kotlin の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。