Closed Bug 535955 Opened 15 years ago Closed 12 years ago

System alert sound is not played when new messages arrive

Categories

(MailNews Core :: Backend, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: flod, Unassigned)

References

Details

(Keywords: regression, Whiteboard: [workaround: comment 7, comment 10])

Thunderbird 3 with clean profile and default settings ("Play a sound" is checked and "System Alert Sound" is selected) on Mac OS X: when I receive a new message, the system sound is not played. If I select "Use the following sound file" and use a local .wav file, the sound is played as expected.

Tried both with localized and en-US nightlies (Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.5) Gecko/20091217 Shredder/3.0.1pre) with the same result.

I don't know if it matters, but this happen on Mac OS X 10.5.8 localized in Italian.
Changing platform to all, since the other person in cc has the same problem on PowerPC (Leopard, Italian).
Hardware: x86 → All
Anything in Tools -> Error console ?

Anything in /Applications/Utilities/console.app when you are trying to play the system sound ?
(In reply to comment #2)
> Anything in Tools -> Error console ?
> 
> Anything in /Applications/Utilities/console.app when you are trying to play the
> system sound ?

Both remain empty.

BTW, I also tried to set a custom sound and delete the .wav file right after to trigger an error, but nothing happens.
What sound did you try to play ?
(In reply to comment #4)
> What sound did you try to play ?

A random .wav file that I found on my Mac and copied on the desktop, to test if that could generate an error in console.app or Error console.

I also tried to change the system alert sound in System Preferences (from default "funk" to another) but no results.
(In reply to comment #4)
> What sound did you try to play ?

Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; it; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6

I'm the other person in cc ;-)
I tried the same flod's procedure but no results.
Another series of tests:
* no sound on Snow Leopard 10.6.2
* no sound if I switch to English as system language
* took the default funk.aif sound (/System/Library/Sounds), copied on the Desktop, renamed as funk.wav and selected as custom sound: it plays fine!
Phil, thoughts ?
In 1.8, we called http://mxr.mozilla.org/mozilla1.8/source/widget/src/mac/nsSound.cpp#233 which called http://mxr.mozilla.org/mozilla1.8/source/widget/src/mac/nsSound.cpp#431 which got the name of the new mail sound from InternetConfig (or, did whatever that call did, after InternetConfig mostly went away - probably got the name of the default sound) and played that sound, or if all else failed, did Beep(), but in any case treated our call to PlaySystemSound as a desire to play a damn sound.

In 1.9.1, our unchanged call now calls http://mxr.mozilla.org/mozilla1.9.1/source/widget/src/cocoa/nsSound.mm#108, which near as I can tell first checks (only in the case of calls from C++) whether you are asking for any system sound that you might reasonably ask for, including _moz_mailbeep, and if so just silently returns.

It may be that the remnants of InternetConfig will still let you get at "the default new mail sound" (which would be "what you have Mail.app set to play"), but I sort of doubt it, and more than sort of doubt it's the sort of thing we want to depend on. Luckily, ifdef XP_MACOSX, nsSound::Beep() actually does what we want to have done, and plays the System Alert Sound that our UI makes you think you'll get.
Component: General → Backend
Product: Thunderbird → MailNews Core
QA Contact: general → backend
Version: 3.0 → Trunk
Just wanted to say that this bug affected me as well. My workaround was just to rename the .aif system alert to a .wav and select it as a custom sound.
Similar issue it affects also Windows and Linux on TB 3.x: changed OS related.
OS: Mac OS X → All
Keywords: regression
Whiteboard: [workaround: comment 7, comment 10]
(In reply to comment #14)
> *** Bug 535189 has been marked as a duplicate of this bug. ***

My bug (535189) is about the system beep() (from the mother board sounder) - nothing to do with .wav or sound systems.

Is this really a duplicate ?
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.3a5pre) Gecko/20100429 SeaMonkey/2.1a1pre

Playing the system sound stopped working with SM 2.0.  I'm running Mac OS 10.6.3. I just checked SM 2.0.4 on my old iBook running Mac OS 10.4.11 and the system new mail sound is broken there too.)  Playing a custom sound does work.

My notification settings are:

When new messages arrive:
[x] Show an alert           [Growl - works]
[x] Animate the Dock icon   [does NOT work!]
[x] Play a sound
    (*) System New Mail Sound
    ( ) Custom sound file


Interestingly, Chatzilla still does play the OS X "alert sound", as it is called in System Preferences.  I've not had time to look for a bug about the Dock Icon totally not animating in SM 2.0.  Don't know if that is related breakage.
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.10) Gecko/20100630 Lightning/1.0b1 Shredder/3.0.5

No notification sounds at all.
No System Mobo beep, no sound card sound.
alsamixer unmuted
Using Fluxbox desktop - not gnome or kde.

sound in other apps, mplayer, vlc, kaffeine, xine, pidgin, all fine.

 edit->preferences and select a custom wav, press Play and nothing happens.
So we had an issue on linux that got fixed recently.
(In reply to comment #19)
> So we had an issue on linux that got fixed recently.

see bug 579877
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b11) Gecko/20110209 Firefox/ SeaMonkey/2.1b2

New mail alert sound has returned!  Now WFM for both system and custom sound.  (Still no dock icon animation.)
Sound now plays on new mail arrival, at least for my Gentoo x86 version.

Thunderbird Version 3.1.9

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15) Gecko/20110309 Lightning/1.0b2 Lanikai/3.1.9
Closing as WORKSFORME based on Comment 21 and Comment 23.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
It doesn't work for me (on Gentoo Linux: SeaMonkey-2.17 + Lightning-2.2b1 + ALSA) 

[test from preferences panel, error on console]
--------------------------------------------
Timestamp: 2013-04-10 19:56:30
Error: NS_ERROR_NOT_AVAILABLE: Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsISound.play]
Source File: chrome://communicator/content/pref/preferences.js
Line: 66

[lightning event, error on terminal]
--------------------------------------------
Error: Error playing alarm sound: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsISound.play]"  nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  location: "JS frame :: resource://calendar/modules/calUtils.jsm -> file:///home/marcoep/.mozilla/seamonkey/8mk2xqaq.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/calendar-js/calAlarmMonitor.js :: cAM_onAlarm :: line 117"  data: no]


I guess this should be reopened. It might possibly affect Bug 804009.
You need to log in before you can comment on or make changes to this bug.