RtspStream.stopRecord() sometimes blocks in Service.onDestroy() since 2.8.1
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
调研方向
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
- 平均合并
- 2 天 4 小时
- 30 天内合并 PR
- 7
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
pedroSG94/RootEncoder 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
pedroSG94/RootEncoder#2224 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
pedroSG94/RootEncoder#2213 ·
维护者通常 2 天内回复
-
难度 4/5 3-5 天 新手友好度 43/100
pedroSG94/RootEncoder#2220 · 1 条评论 ·
维护者通常 2 天内回复
-
难度 4/5 3-5 天 新手友好度 48/100
pedroSG94/RootEncoder#2207 · 1 个 reaction ·
维护者通常 2 天内回复
-
难度 4/5 3-5 天 新手友好度 35/100
pedroSG94/RootEncoder#2203 ·
维护者通常 2 天内回复
查看 pedroSG94/RootEncoder 的全部 Issue
相似的 Issue
-
bug core p3
难度 2/5 1-3 小时 新手友好度 72/100
RunanywhereAI/runanywhere-sdks#1258 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
Kotlin-server-squad/vizcore#278 ·
维护者通常 1 天内回复
-
Empty blood pressure handled as “null” string in exam edit可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 65/100
open-learning-exchange/myplanet#18484 ·
维护者通常 1 天内回复
-
enhancement
难度 1/5 1 小时以内 新手友好度 90/100
Seb3thehacker/gearslip#71 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
ccch1mneyyy/dsh-Go#426 ·
维护者通常 1 天内回复