Closed Bug 658060 Opened 13 years ago Closed 13 years ago

The Preferences Popup Windows Sound play button is not enabled.

Categories

(SeaMonkey :: Preferences, defect)

SeaMonkey 2.1 Branch
defect
Not set
normal

Tracking

(seamonkey2.2 fixed, seamonkey2.3 fixed)

RESOLVED FIXED
seamonkey2.4
Tracking Status
seamonkey2.2 --- fixed
seamonkey2.3 --- fixed

People

(Reporter: losepete, Assigned: iannbugzilla)

References

()

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (OS/2; Warp 4.5; rv:2.0.1) Gecko/20110513 Firefox/4.0.1 SeaMonkey/2.1
Build Identifier: Mozilla/5.0 (OS/2; Warp 4.5; rv:2.0.1) Gecko/20110513 Firefox/4.0.1 SeaMonkey/2.1

Play a Sound is checked (ticked actually) and:-

1] with "System beep" selected when I click the "Play" button no sound is heard

2] if I select "Custom sound file" and then click the "Browse..." nothing happens ie no file dialog allowing me to select a sound file.


However, this seems to only affect 1 of my 3 Profiles so I would take a guess that this is, somehow, a Profile related problem.

The question is: What do I need to do to fix this problem?

Reproducible: Always

Steps to Reproduce:
1. Open Preferences -> Privacy and Security -> Popup Windows
2. With "Play an sound" checked(ticked) and "System beep" selected no sound occurs when clicking the "Play" button
3. With "Play an sound" checked(ticked) and "Custom sound file" selected no file chooser dialog appears when clicking on the "Browse" button


Expected Results:  
For 2. above the System beep should have played.

For 3. above a file dialog should appear allowing the selection of a sound file.
Ah is this a OS/2 specific problem?
Hardware: Other → x86
Version: unspecified → SeaMonkey 2.1 Branch
(In reply to comment #1)
> Ah is this a OS/2 specific problem?

No idea - but doubt it.

It is a Profile specific problem is my best guess as it only affects 1 of my 3 Profiles.

What files in a Profile would affect the behaviour of this section of the Preferences interface?
Works for me, but Peter mentioned in the newsgroups that he already tried removing xul.mfl.  I don't know what to else to suggest - maybe startupCache?

If we can't narrow down the profile problem, we should probably resolve as WORKSFORME.
I'd try renaming prefs.js (make sure you have a backup!)
If that works, copy half of the saved prefs.js back, do a bisect until you isolate the problem.
By backing up the prefs.js file then deleting the original prefs.js file I may have found the cause of this problem by comparing the old prefs.js with a newly generated prefs.js.

The difference between the 2 prefs.js files are that the old prefs.js has this line

user_pref("privacy.popups.showBrowserMessage", false);

Also the user_pref("privacy.popups.sound_url" values are different; the old prefs.js shows drive:\path data in an OS/2 and Windows style

user_pref("privacy.popups.sound_url", "H:\\MMOS2\\SOUNDS\\eeeooop.wav");

whereas the new prefs.js shows it as a url starting with file:///

user_pref("privacy.popups.sound_url", "file:///H:/MMOS2/SOUNDS/boo.wav");


Copying the "file:///H:/MMOS2/SOUNDS/boo.wav" over the "H:\\MMOS2\\SOUNDS\\eeeooop.wav" in the old prefs.js and then using the old prefs.js there is no longer a problem with playing the popup windows sound or browsing to find a custom sound file.
Was the profile inherited from SeaMonkey 2.0 (or migrated from SeaMonkey 1.x)?
Did the old URL "H:\\etc" used to work under older versions of SeaMonkey?

I ask this because in Windows and Linux feeding an incorrect url to the OS filepicker would eventually timeout (this might take up to 30 minutes in Windows) but in the end the filepicker will show up. Of course OS/2 might never time out.
This profile was used with Seamonkey 1.x, migrated to Seamonkey 2.0 - and on.

Yes, it used to work under older versions of Seamonkey but, I have to admit, I have no idea when it stopped working - I'm blocking popups and if no sound happens when that happens I have no idea that a popup has been blocked.

What I do find strange is:-

1] this blocked the filepicker from working at all - well, it did not appear onscreen. I would have expected an invalid url to simply be ignored - after all, we are trying to select a different file so the current value is not really relevant.

2] this also prevented the "System beep" from being played.
Well all we do (or Gecko does) is to pass the currently defined url as the starting point or hint to the OS file picker. Then it's up to the OS to handle things and return something sensible to us. In Windows, the OS will churn for a while looking for an invalid url then decide to open the file picker anyway but with the default directory (or MRU) open. I have no idea what the OS/2 file manager does - probably fail silently.
I assume you already checked the Error Console for any relevant error messages?
(In reply to comment #8)
> Well all we do (or Gecko does) is to pass the currently defined url as the
> starting point or hint to the OS file picker. Then it's up to the OS to
> handle things and return something sensible to us. In Windows, the OS will
> churn for a while looking for an invalid url then decide to open the file
> picker anyway but with the default directory (or MRU) open. I have no idea
> what the OS/2 file manager does - probably fail silently.

Most of the OS/2 API really doesn't care what the directory separater is and I'm quite surprised to see this failure. Of course the oldest parts of OS/2 was written by Microsoft so ...
Unluckily due to an IRQ conflict I can't test as sound is totally broken here.
I'll note that Mozilla handles broken sound much better then most apps. (running with reduced functionality instead of hanging).
(In reply to comment #9)
> I assume you already checked the Error Console for any relevant error
> messages?

Sorry Philip but I did not think to check that at the time and I do not currently see any entry that I think could be related...

I thought I'd make a copy of the current log entries but that is far more difficult than it needs to be because part way through copying each entry and pasting into a text file my system seems to lose the ability to copy from the error console.

However, I have discovered that if I type something in here then go back to the copying process it works again for a few more entries.

I'll clear the error console, reinstate the prefs.js that seemed to have the problem and then check for entries in the error console.
I reinstated the old prefs.js, started Seamonkey, opened Preferences, Privacy and Security, Popup Windows and checked that:-

1] Play a sound is selected

2] Custom sound is selected - no filename showing though; when using the prefs.js without the problem the sound file name is displayed below the Custom sound file option.

3] No sound when I click the "Play" button

4] The "Browse" button does not work

5] When I select System beep it does not play when I click the "Play" button


Entries in error console:-

Warning: Warning: Ignoring obsolete chrome registration modifier 'xpcnativewrappers=no'.
Source File: i:\Mozilla\SeaMonkey\Profiles\vb5bjd6y.losepete\extensions\inspector@mozilla.org.xpi:chrome.manifest
Line: 45

Could not read chrome manifest file 'i:\Mozilla\SeaMonkey\Profiles\vb5bjd6y.losepete\extensions\en-GB@dictionaries.addons.mozilla.org\chrome.manifest'.

Warning: Expected declaration but found '*'.  Skipped to next declaration.
Source File: file:///i:/Mozilla/SeaMonkey/Profiles/vb5bjd6y.losepete/chrome/userChrome.css
Line: 39

Warning: Expected declaration but found '*'.  Skipped to next declaration.
Source File: file:///i:/Mozilla/SeaMonkey/Profiles/vb5bjd6y.losepete/chrome/userChrome.css
Line: 40

Warning: Expected ',' or '{' but found '/'.  Ruleset ignored due to bad selector.
Source File: file:///i:/Mozilla/SeaMonkey/Profiles/vb5bjd6y.losepete/chrome/userChrome.css
Line: 42

Error: aElement is null
Source File: chrome://communicator/content/pref/preferences.js
Line: 49

Error: [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIFileProtocolHandler.getFileFromURLSpec]"  nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)"  location: "JS frame :: chrome://communicator/content/pref/pref-popups.js :: ReadSoundLocation :: line 152"  data: no]
Source File: chrome://global/content/bindings/preferences.xml
Line: 406

Error: uncaught exception: [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIFileProtocolHandler.getFileFromURLSpec]"  nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)"  location: "JS frame :: chrome://communicator/content/pref/pref-popups.js :: SelectSound :: line 166"  data: no]

Error: uncaught exception: [Exception... "Could not convert JavaScript argument arg 0 [nsISound.play]"  nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)"  location: "JS frame :: chrome://communicator/content/pref/pref-popups.js :: PlaySound :: line 182"  data: no]

Error: aElement is null
Source File: chrome://communicator/content/pref/preferences.js
Line: 49

Error: uncaught exception: [Exception... "Could not convert JavaScript argument arg 0 [nsISound.play]"  nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)"  location: "JS frame :: chrome://communicator/content/pref/pref-popups.js :: PlaySound :: line 182"  data: no]

Error: uncaught exception: [Exception... "Could not convert JavaScript argument arg 0 [nsISound.play]"  nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)"  location: "JS frame :: chrome://communicator/content/pref/pref-popups.js :: PlaySound :: line 182"  data: no]

Error: aElement is null
Source File: chrome://communicator/content/pref/preferences.js
Line: 49

Error: uncaught exception: [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIFileProtocolHandler.getFileFromURLSpec]"  nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)"  location: "JS frame :: chrome://communicator/content/pref/pref-popups.js :: SelectSound :: line 166"  data: no]

aus2-community.mozilla.org : server does not support RFC 5746, see CVE-2009-3555


In the above the Messages and Warnings are the same as when using the prefs.js that works.

I suspect the errors listed are related to this Popup Windows problem with the exception of:-

Error: aElement is null
Source File: chrome://communicator/content/pref/preferences.js
Line: 49

This error also occurs in the working prefs.js
it looks like we need to check that we get back a valid url here:
gFileHandler.getFileFromURLSpec(aElement.value)
and here:
sound.play(gIOService.newURI(soundUrl, null, null));
(In reply to comment #13)
> it looks like we need to check that we get back a valid url here:
> gFileHandler.getFileFromURLSpec(aElement.value)
> and here:
> sound.play(gIOService.newURI(soundUrl, null, null));

The SM1.x->SM2.x profile migration should have correctly converted the relevant prefs from strings to fileUrls. For some reason either that conversion did not happen or the parts of the new prefs.js were overwritten in some way.

I'll do some more digging into the other errors.
(In reply to comment #12)
> 
> I suspect the errors listed are related to this Popup Windows problem with
> the exception of:-
> 
> Error: aElement is null
> Source File: chrome://communicator/content/pref/preferences.js
> Line: 49
> 
> This error also occurs in the working prefs.js

This error is generate because "previewSound" was renamed to "playSoundButton" in the fix to bug 170924 but the equivalent code in pref-popups.js was not changed http://mxr.mozilla.org/comm-central/source/suite/common/pref/pref-popups.js#145

From reading around if a valid URLSpec is not passed in then we get an assert so there will be a number of ways of tackling that.
Status: UNCONFIRMED → NEW
Ever confirmed: true
This issue around not being able to play the sound in the popups pref pane should be relnoted.
Keywords: relnote
OS: OS/2 → All
Hardware: x86 → All
Assignee: nobody → iann_bugzilla
Status: NEW → ASSIGNED
Attachment #534553 - Flags: review?(mnyromyr)
(In reply to comment #16)
> This issue around not being able to play the sound in the popups pref pane
> should be relnoted.

Relnoted, see bug 656719 comment 23.
Attachment #534553 - Flags: review?(mnyromyr) → review+
Blocks: 662757
Rest of issues spun off into bug 662757, this bug is just for fixing the play button not being enabled correctly.
Summary: The Preferences Popup Windows Sound setting options do not work → The Preferences Popup Windows Sound play button is not enabled.
Comment on attachment 534553 [details] [diff] [review]
Simple fix for play sound button patch [Checked in: trunk Comment 20, aurora/beta Comment 22]

http://hg.mozilla.org/comm-central/rev/7f3f984ba3a1

It would be good to get this simple, very low risk into both aurora and beta.
Attachment #534553 - Attachment description: Simple fix for play sound button patch → Simple fix for play sound button patch [Checked in: Comment 20]
Attachment #534553 - Flags: approval-comm-beta?
Attachment #534553 - Flags: approval-comm-aurora?
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.4
Comment on attachment 534553 [details] [diff] [review]
Simple fix for play sound button patch [Checked in: trunk Comment 20, aurora/beta Comment 22]

Simple regression fix. Looks low risk a-comm-aurora=me a-comm-beta=me
Attachment #534553 - Flags: approval-comm-beta?
Attachment #534553 - Flags: approval-comm-beta+
Attachment #534553 - Flags: approval-comm-aurora?
Attachment #534553 - Flags: approval-comm-aurora+
Comment on attachment 534553 [details] [diff] [review]
Simple fix for play sound button patch [Checked in: trunk Comment 20, aurora/beta Comment 22]

http://hg.mozilla.org/releases/comm-aurora/rev/00d7788a15d7
http://hg.mozilla.org/releases/comm-beta/rev/1bde52433d6c
Attachment #534553 - Attachment description: Simple fix for play sound button patch [Checked in: Comment 20] → Simple fix for play sound button patch [Checked in: trunk Comment 20, aurora/beta Comment 22]
Flags: in-testsuite-
Target Milestone: seamonkey2.4 → seamonkey2.2
Target Milestone: seamonkey2.2 → seamonkey2.4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: