Closed
Bug 1417842
Opened 8 years ago
Closed 8 years ago
non-ASCII content of xulstore.json corrupted after bug 1363482, was: Non-ASCII(?) chars in toolbar names are destroyed (and error is multiplied every TB start)
Categories
(Core :: General, defect)
Tracking
()
RESOLVED
FIXED
mozilla59
Tracking | Status | |
---|---|---|
thunderbird_esr52 | --- | unaffected |
firefox-esr52 | --- | unaffected |
firefox57 | - | wontfix |
firefox58 | - | wontfix |
firefox59 | + | fixed |
People
(Reporter: jm_sz, Assigned: emk)
References
Details
(Keywords: regression)
Attachments
(2 files)
83.26 KB,
image/jpeg
|
Details | |
59 bytes,
text/x-review-board-request
|
erahm
:
review+
gchang
:
approval-mozilla-beta-
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0
Build ID: 20171112125346
Steps to reproduce:
I have updated TB 56.0b4 -> 57.0b1 (pl_PL)
Actual results:
Toolbar name changed from "Pasek narzędzi poczty 2" to "Pasek narzÃÂÃÂÃÂÃÂdzi poczty 2". Then I made simple test:
1. created toolbar and named it "Narzędzia"
2. closed and started TB
3. and again...
4. and again
You may find that error in name is multiplied every time (see attachment: toolbar_names.jpg, corresponding parts)
In addition:
• Stable TB52 and previous betas (including TB56) are not affected.
• Default TB toolbars are not affected ("Pasek narzędzi poczty", "Pasek panelu folderów" - see toolbar_names.jpg, part 2, yellow boxes)
Expected results:
Toolbar name should not change ;-)
Comment 1•8 years ago
|
||
I can confirm that. Add a toolbar with an accented character or some other non-ASCII character. Works. Restart TB and the name has mojibake in it.
Alice, this could be from bug 1363281. Could you please find the regression. I'm sure a Japanese toolbar name will also not work.
![]() |
||
Comment 2•8 years ago
|
||
Regression window:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=5278dfcf5eb9f58eaf06ad1ce67e7fd4aba34772&tochange=a46a5879b8781ae9ea99f37b5d34a891f0f75047
https://hg.mozilla.org/comm-central/pushloghtml?fromchange=f5394bcc7c1b41f1c8a2b1a8037a643a080b377f&tochange=f5394bcc7c1b41f1c8a2b1a8037a643a080b377f
Regressed by: Bug 1363482
Flags: needinfo?(alice0775)
![]() |
||
Updated•8 years ago
|
status-thunderbird50:
--- → unaffected
status-thunderbird51:
--- → unaffected
status-thunderbird52:
--- → unaffected
status-thunderbird53:
--- → unaffected
status-thunderbird54:
--- → unaffected
status-thunderbird56:
--- → unaffected
status-thunderbird57:
--- → affected
status-thunderbird58:
--- → affected
status-thunderbird59:
--- → affected
Comment 3•8 years ago
|
||
Thanks, Alice!!
Kris, please advise what we can do here. In TB we can create new named toolbars, and non-ASCII names get corrupted. I can't see that feature in FF.
Flags: needinfo?(kmaglione+bmo)
![]() |
||
Comment 4•8 years ago
|
||
xulstore.json file will be corrupted after restart and quit TB
When add custom toolbar and quit TB
"header-view-toolbox":{"labelalign":"end","iconsize":"small","mode":"icons"},"attachment-view-toolbar":{"iconsize":"small"},"msgHeaderViewDeck":{"selectedIndex":"0"},"statusbar-QLS":{"ccode":"ja-JP"},"folderPane-toolbar":{"currentset":"folderpane-mode-selector"},"customToolbars":{"toolbar1":"Narzędzia:button-goforward"}}
After restart and quit TB
"header-view-toolbox":{"labelalign":"end","iconsize":"small","mode":"icons"},"attachment-view-toolbar":{"iconsize":"small"},"msgHeaderViewDeck":{"selectedIndex":"0"},"statusbar-QLS":{"ccode":"ja-JP"},"folderPane-toolbar":{"currentset":"folderpane-mode-selector"},"customToolbars":{"toolbar1":"NarzÄdzia:button-goforward"}}
Updated•8 years ago
|
status-thunderbird50:
unaffected → ---
status-thunderbird51:
unaffected → ---
status-thunderbird52:
unaffected → ---
status-thunderbird53:
unaffected → ---
status-thunderbird54:
unaffected → ---
status-thunderbird56:
unaffected → ---
status-thunderbird57:
affected → ---
status-thunderbird58:
affected → ---
status-thunderbird59:
affected → ---
Component: Toolbars and Tabs → General
Product: Thunderbird → Core
Summary: Non-ASCII(?) chars in toolbar names are destroyed (and error is multiplied every TB start) → non-ASCII content of xulstore.json corrupted after bug 1363482, was: Non-ASCII(?) chars in toolbar names are destroyed (and error is multiplied every TB start)
Assignee | ||
Comment 5•8 years ago
|
||
Is this still broken after bug 1420427 is fixed?
Comment 6•8 years ago
|
||
Yes. We need to change Cu.readFile to return an AString rather than an ACString. XPC apparently doesn't handle UTF-8 correctly when converting CStrings.
Flags: needinfo?(kmaglione+bmo)
Assignee | ||
Comment 7•8 years ago
|
||
(In reply to Kris Maglione [:kmag] (long backlog; ping on IRC if you're blocked) from comment #6)
> Yes. We need to change Cu.readFile to return an AString rather than an
> ACString. XPC apparently doesn't handle UTF-8 correctly when converting
> CStrings.
What encoding will be used to convert the file content to nsString (i.e. UTF-16)? What happens if the file is a binary?
Cu.readFile should return ArrayBuffer or it should be changed to Cu.readJSON.
Assignee | ||
Comment 8•8 years ago
|
||
Or
AUTF8String readUTF8File(in nsIFile file);
.
Comment hidden (mozreview-request) |
Comment 10•8 years ago
|
||
[Tracking Requested - why for this release]: regression in 57 causing dataloss. The steps to reproduce given here only involve Thunderbird; if there's no way to reproduce on Firefox it probably doesn't matter much for 57/58, but we should really fix for 59 (the next esr branch that Thunderbird will be releasing from).
Comment hidden (mozreview-request) |
Updated•8 years ago
|
status-firefox57:
--- → wontfix
status-firefox58:
--- → fix-optional
status-firefox59:
--- → affected
Assignee | ||
Updated•8 years ago
|
Attachment #8933255 -
Flags: review?(erahm)
Comment 12•8 years ago
|
||
mozreview-review |
Comment on attachment 8933255 [details]
Bug 1417842 - Make Cu.readFile and Cu.readURI UTF-8 aware.
https://reviewboard.mozilla.org/r/204194/#review212598
Seems reasonable, r=me.
Attachment #8933255 -
Flags: review?(erahm) → review+
Comment hidden (mozreview-request) |
Comment 14•8 years ago
|
||
Pushed by VYV03354@nifty.ne.jp:
https://hg.mozilla.org/integration/autoland/rev/e6479b173009
Make Cu.readFile and Cu.readURI UTF-8 aware. r=erahm
Comment 15•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Comment 16•8 years ago
|
||
Please request Beta approval on this when you get a chance.
Assignee: nobody → VYV03354
Flags: needinfo?(VYV03354)
Updated•8 years ago
|
status-firefox-esr52:
--- → unaffected
Assignee | ||
Comment 17•8 years ago
|
||
Comment on attachment 8933255 [details]
Bug 1417842 - Make Cu.readFile and Cu.readURI UTF-8 aware.
Approval Request Comment
[Feature/Bug causing the regression]: 1363482
[User impact if declined]: Potentially dataloss (especially in Thunderbird)
[Is this code covered by automated tests?]: No
[Has the fix been verified in Nightly?]: Yes
[Needs manual test from QE? If yes, steps to reproduce]: No known regressions in Firefox. Thunderbird QE (if exists) should verify the fix following the step in comment #0.
[List of other uplifts needed for the feature/fix]: None
[Is the change risky?]: No
[Why is the change risky/not risky?]: Changed functions are used only for decoding JSON files which are encoded in UTF-8.
[String changes made/needed]: None
Flags: needinfo?(VYV03354)
Attachment #8933255 -
Flags: approval-mozilla-beta?
Comment 18•8 years ago
|
||
Comment on attachment 8933255 [details]
Bug 1417842 - Make Cu.readFile and Cu.readURI UTF-8 aware.
From comment #10, the issue is not reproduced in FF and the next esr branch that Thunderbird will be releasing from is 59/60. Beta58-.
Attachment #8933255 -
Flags: approval-mozilla-beta? → approval-mozilla-beta-
Updated•8 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•