Opened 10 years ago

Last modified 14 months ago

#3085 assigned bug

[Sounds] crashes after playing the event sounds consecutively.

Reported by: richienyhus Owned by: Barrett
Priority: normal Milestone: R1
Component: Preferences/Sounds Version: R1/Development
Keywords: Cc: mdisreali@…, degea@…
Blocked By: Blocking:
Has a Patch: Platform: x86

Description

After setting a file as a event sound in the 'sounds' preference app, and playing it a few times, 'sounds' crashes.

File used: http://local.elgsis.lt/files/mipi/mipi-haiku-start2.mp3

Attachments (11)

soundsprefapp-stacktrace.txt (1.4 KB) - added by richienyhus 10 years ago.
stack trace
sounds-pref-app-Terminal.txt (71.5 KB) - added by richienyhus 10 years ago.
Terminal
sounds-pref-debugger.txt (3.5 KB) - added by richienyhus 10 years ago.
debugger
r42930-2hn_sounds_preflet_crash_after_clicking_play_several_times.txt (3.5 KB) - added by Disreali 7 years ago.
info.wav.zip (8.9 KB) - added by Disreali 7 years ago.
syslog_r43005-2hn_sounds-pref_crash_on_play.txt (914.6 KB) - added by Disreali 7 years ago.
r43005-2hn_Sounds_crash_4-clicks.txt (3.4 KB) - added by Disreali 7 years ago.
r43005-2hn_sounds_pref_high_cpu_usage_01.png (148.7 KB) - added by Disreali 7 years ago.
r43005-2hn_sounds_pref_high_cpu_usage_02.png (192.1 KB) - added by Disreali 7 years ago.
Sounds-1711-debug-12-09-2015-08-36-24.report (13.1 KB) - added by humdinger 4 years ago.
crash when clicking 'play' a few times without waiting for the playback to finish
sounds.diff (3.9 KB) - added by Barrett 23 months ago.
Patch to move out of BGameSound, not properly working though.

Download all attachments as: .zip

Change History (30)

Changed 10 years ago by richienyhus

stack trace

Changed 10 years ago by richienyhus

Terminal

Changed 10 years ago by richienyhus

Attachment: sounds-pref-debugger.txt added

debugger

comment:1 Changed 10 years ago by marcusoverhagen

Owner: changed from marcusoverhagen to haiku-web

comment:2 Changed 10 years ago by anevilyak

Owner: changed from haiku-web to anevilyak

comment:3 Changed 10 years ago by richienyhus

whoops, I had forgotten that will the auich driver not working in virtualbox at the time(It now works in hrev28555, albeit buggy), I deleted the driver and installed OSS.

This kind of changes things, sorry.

So the problem of 'sounds' crashing still happens, albeit only using the Open Sound System driver.

comment:4 Changed 10 years ago by anevilyak

Owner: changed from anevilyak to mmu_man

This look like it could be a bug in OpenSound, I can't reproduce it here using emuxki. Francois, could you investigate when you have a chance?

comment:5 Changed 8 years ago by Disreali

Cc: mdisreali@… added

What is the status of this ticket?

comment:6 Changed 7 years ago by Disreali

This issues started occurring on my system sometime after Alpha3 was released. Around the same time, the pref started to fail actually play the sounds. (There may be a seperate ticket for that already.)

I will try to determine on which rev it started. Current install is hrev42930-2hn.

Attaching bt.

comment:7 Changed 7 years ago by Disreali

Forgot to mention that I do not has OSS install. Haiku used the HDA driver. Attaching a zip of the wave file with which I have been testing.

Changed 7 years ago by Disreali

Attachment: info.wav.zip added

comment:8 Changed 7 years ago by mmu_man

Can't reproduce the crash here, sure it wasn't fixed in hrev42453 ? I do get another one though (pure virtual)...

comment:9 Changed 7 years ago by Disreali

It is very easy to reproduce on my hardware, it only takes 4-10 clicks. My system is known to have sound/audio driver issues, though this is relatively new behaviour on this system.

Attaching a slightly different backtrace and a syslog that hopefully has the KDL session info.

Again, this is on hrev43005-gcc2hybrid nightly installed on an Acer AM5620 desktop.

Changed 7 years ago by Disreali

Changed 7 years ago by Disreali

comment:10 Changed 7 years ago by Disreali

I have found that simply selecting an Event which has an assigned sound and clicking the "Play" button once, causes Sounds CPU usage to spike and its mem usage to go from 2-3MB to sometimes over 20MB.

Attaching screenshots.

If there is a another way to get similar information, such as from Terminal, that could be more useful, please let me know.

Last edited 7 years ago by Disreali (previous) (diff)

Changed 7 years ago by Disreali

Changed 7 years ago by Disreali

comment:11 Changed 7 years ago by ttcoder

Cc: degea@… added

comment:12 Changed 6 years ago by diver

Version: R1/Development

It doesn't crash anymore (at least with BeStartup.wav sound) in hrev45179. Instead, Sounds siliently quits after a few clicks on Play button.

comment:13 Changed 6 years ago by ttcoder

Regarding Component: Preferences/Sounds,

In hrev45824 I witnessed just now a call to system_beep() (specifically, in BeShare) going "click" (brief click then silence, instead of playing the sound).. Went to Preferences/Sounds immediately, but when I selected the corresponding line and clicked "Play" it worked fine. A couple years ago it used to crash as described above. If memory serves, there has been changes in the media-kit but not in "Sounds" since that time, so it seems the MK was the culprit and has much improved since then.

There's a possibility the remaining problem is not in Sounds but rather in the MK implementation of system_beep(). I base that on a MK vulnerability I discovered recently (still have to file a ticket): if playing a sound in a certain way, one may block the media_server, such that all applications accessing it are "frozen". After some digging I found out that my code had to use Preroll() and call BSoundPlayer::Stop() before ever deleteing it (not sure which one of these two fixed it, but the vulnerability is fixed now). So the MK is a bit sensitive to the order in which functions are called to access it. If it can trigger a freeze, it can trigger a "click" or the old crash in older, more vulnerable versions. Maybe system_beep() (as presumably used in Sounds) forgets to call Stop() before recycling the BSoundPlayer, or something like that.

comment:14 Changed 4 years ago by Barrett

Is this still a problem?

comment:15 Changed 4 years ago by humdinger

Still reproducible for me. It doesn't seem to happen if you wait until a sound is played back completely (i.e. the stop button get 'un-ghosted'). But it does crash when pressing play e few timmes while it's still playing. Attached is a fresh backtrace with hrev49632.

Changed 4 years ago by humdinger

crash when clicking 'play' a few times without waiting for the playback to finish

comment:16 Changed 4 years ago by Barrett

Owner: changed from mmu_man to Barrett
Status: newassigned

Ok, thanks for the update!

Changed 23 months ago by Barrett

Attachment: sounds.diff added

Patch to move out of BGameSound, not properly working though.

comment:17 Changed 23 months ago by Barrett

Has a Patch: set

comment:18 Changed 14 months ago by pulkomandy

Has a Patch: unset

comment:19 Changed 14 months ago by pulkomandy

Has a Patch: unset

Patch migrated to Gerrit: https://review.haiku-os.org/57

Note: See TracTickets for help on using tickets.