Opened 14 years ago
Closed 14 years ago
#9031 closed defect (Fixed)
Pulse audio assert failure
Reported by: | markk | Owned by: | JYA |
---|---|---|---|
Priority: | blocker | Milestone: | 0.24 |
Component: | MythTV - General | Version: | Unspecified |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
Mythfrontend is repeatedly crashing on video playback startup. Backtrace and log attached.
Attachments (3)
Change History (13)
Changed 14 years ago by
Attachment: | pulse-audio-assert-failure-1.txt.tar.gz added |
---|
Changed 14 years ago by
Attachment: | pulse-audio-assert-failure-2.txt.tar.gz added |
---|
comment:1 Changed 14 years ago by
Owner: | set to JYA |
---|---|
Status: | new → assigned |
comment:2 Changed 14 years ago by
Priority: | minor → blocker |
---|
Changed 14 years ago by
Attachment: | new-pulse-handler.diff added |
---|
Complete re-write of the suspend code
comment:3 Changed 14 years ago by
I've attached a patch with a complete re-think of the suspend code. It uses a global singleton that should:-
- be thread safe and entirely serialised
- handle wildly asynchronous callbacks gracefully
- be faster as we don't need to re-connect each time.
- work
My only real concern is unexpected server behaviour over long periods and, as noted in the code, it's not entirely clear whether we need to 'drain' the connection at any point.
comment:4 Changed 14 years ago by
On one test system here, using the myth_system call (IsPulseAudioRunning?) to check whether the server is present takes around 0.13 seconds. If I disable that call and just let the PulseAudio? connection fail takes around 0.02 seconds - a saving of around 1/10th second each time we start the frontend and start playback.
comment:5 Changed 14 years ago by
(In [26702]) Add a new PulseHandler? class that will be used to suspend/resume the PulseAudio? server. Refs #9031
comment:6 Changed 14 years ago by
(In [26703]) Switch over to using the new PulseHandler? class.
The PulseAudio? suspend/resume code now uses a global singleton to interact with the sound server. It should be entirely thread safe, handle unexpected callbacks from the server in a graceful manner, be faster in operation (we no longer connect each time) and it does not require an additional thread to operate.
A couple of items still need cleaning up:-
- need to add back a check into IsPulseAudioRunning? when pulse support
is not compiled in and warn the user when PulseAudio? is running (once on startup)
- really need to cleanup the connection on exit
(Suspend(PulseHandler::kPulseCleanup)) to ensure we don't leak connections in the server.
Refs #9031
comment:8 Changed 14 years ago by
(In [26705]) Re-instate the PulseAudio? warning on systems that are not compiled with PulseAudio? support. This is a once only warning the first time the audio device is opened. Refs #9031
comment:9 Changed 14 years ago by
(In [26706]) Small fix to the PulseHandler? suspend code to ensure we return when asked to cleanup and no object exists. Refs #9031
comment:10 Changed 14 years ago by
Resolution: | → Fixed |
---|---|
Status: | assigned → closed |
(In [26707]) Cleanup the PulseAudio? suspend/resume object when exiting MythFrontend. This ensures we don't leak connections in the PulseAudio? lib/server.
Closes #9031
Slightly different assertion