New email sound notification file cannot contain spaces (Linux - Thunderbird 12)

RESOLVED FIXED in Firefox 14



Widget: Gtk
5 years ago
5 years ago


(Reporter: Pascalis Ligdas, Assigned: wolfiR)



Firefox Tracking Flags

(firefox14 fixed)



(1 attachment, 1 obsolete attachment)



5 years ago
User Agent: Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20100101 Firefox/11.0
Build ID: 20120313130328

Steps to reproduce:

After update from v. 11 to 12.0 I cannot hear sound notification (.wav) If their filenames contain spaces. The "problem" is fixed if I rename the sound filo it doesn't contain spaces (My Sound.wav -> MySound.wav). I am using the Mailbox Alert 0.16.1 addon.

Comment 1

5 years ago
(In reply to Pascalis Ligdas from comment #0)
You have to report this to the add-on developer, this is not a bug in Thunderbird.

Comment 2

5 years ago
Reproduce in Thunderbird:

Edit > Preferences > General then check "Play a sound" and "Use the following sound file" and enter any wav file with spaces.

Note 1: Sound files with spaces play just fine in v.11
Note 2: This does not depend on the addon as I thought originally.

Comment 3

5 years ago
(In reply to Pascalis Ligdas from comment #2)
Confirmed here. Just after the upgrade, sounds don't play upon receiving messages. This is shown in the Error console when playing sounds from preferences:

Error: uncaught exception: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) []"  nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  location: "JS frame :: chrome://messenger/content/preferences/general.js :: <TOP_LEVEL> :: line 94"  data: no]

User Agent: Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120420 Thunderbird/12.0
Application Build ID: 20120420153403

Comment 4

5 years ago
(In reply to Pascalis Ligdas from comment #2)
Bug 635918 was filed to fix inability to play sounds. Recent Thunderbird update contains fix for it. Previously I used the SoundPlus add-on but when upgrade to V.12 happened, the add-on did not work (the add-on needs to be updated).

Comment 5

5 years ago
I can confirm that issue that a wav file with whitespace is not played.
I do not see the error in the error console though.

I do not know if that is a regression caused by the changes in nsSound though as the reporter used an addon before apparently.
As nsSound is core I'll move the report.
Component: General → Widget: Gtk
Ever confirmed: true
Product: Thunderbird → Core
QA Contact: general → gtk
Version: 12 → Trunk

Comment 6

5 years ago
Chris, I guess canberra does not like %20 as a whitespace?
Sounds like QueryInterface to nsIFileURL or perhaps g_filename_from_uri would be useful.
Blocks: 635918

Comment 8

5 years ago
looking into it
Assignee: nobody → mozilla

Comment 9

5 years ago
Created attachment 622167 [details] [diff] [review]

use g_filename_from_uri() to get full path from spec
Attachment #622167 - Flags: review?(karlt)
Comment on attachment 622167 [details] [diff] [review]

g_filename_from_uri returns a newly allocated string that needs to be freed.
It can return NULL on error so I think that should be checked.
Can you rename path to spec, please?
Attachment #622167 - Flags: review?(karlt) → review-

Comment 11

5 years ago
Created attachment 622292 [details] [diff] [review]
patch #2

null check and free path

I wasn't sure about the error ID (NS_ERROR_FILE_UNRECOGNIZED_PATH). Probably that choice doesn't match exactly. Should I just use a generic (NS_ERROR_FAILURE)?
Attachment #622167 - Attachment is obsolete: true
Attachment #622292 - Flags: review?(karlt)
Comment on attachment 622292 [details] [diff] [review]
patch #2

> I wasn't sure about the error ID (NS_ERROR_FILE_UNRECOGNIZED_PATH).

These error codes don't seem well defined, so I think this is fine as is.
Attachment #622292 - Flags: review?(karlt) → review+

Comment 13

5 years ago
Target Milestone: --- → mozilla15
Comment on attachment 622292 [details] [diff] [review]
patch #2

[Approval Request Comment]
Regression caused by (bug #): 
User impact if declined: Won't ear notifications
Testing completed (on m-c, etc.): yes
Risk to taking this patch (and alternatives if risky):None
String changes made by this patch: None
Attachment #622292 - Flags: approval-mozilla-aurora?
Last Resolved: 5 years ago
Resolution: --- → FIXED
Attachment #622292 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+

Comment 16

5 years ago
status-firefox14: --- → fixed
You need to log in before you can comment on or make changes to this bug.