Skip to content

fix: MPRIS D-Bus 断连后 seeked 事件导致崩溃 (#2204)#2457

Open
FSpark wants to merge 1 commit into
qier222:masterfrom
FSpark:fix/mpris-closed-stream
Open

fix: MPRIS D-Bus 断连后 seeked 事件导致崩溃 (#2204)#2457
FSpark wants to merge 1 commit into
qier222:masterfrom
FSpark:fix/mpris-closed-stream

Conversation

@FSpark

@FSpark FSpark commented Apr 26, 2026

Copy link
Copy Markdown

Summary

  • 修复 Linux 下 D-Bus/MPRIS 连接断开后,player.seeked() 抛出 "Tried to write a message to a closed stream" 未捕获异常导致 Electron 主进程崩溃的问题
  • 在两处 player.seeked() 调用添加 try-catch,D-Bus 不可用时静默忽略

Closes #2204

Test plan

  • Linux 下正常启动应用并播放音乐,确认 MPRIS 媒体控制正常
  • 模拟 D-Bus 断连(如 kill dbus-daemon)后拖动进度条,确认不再弹出错误对话框

🤖 Generated with Claude Code

D-Bus 连接断开时 player.seeked() 会抛出 "Tried to write a message to a closed stream"
未捕获异常,导致 Electron 主进程弹窗崩溃。加 try-catch 静默忽略。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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

Successfully merging this pull request may close these issues.

Error: Tried to write a message to a closed stream

1 participant