Unpaired surrogate handled wrongly + breaks text after it (Acid3 "report" is missing letters)




10 years ago
10 years ago


(Reporter: dolphinling, Unassigned)


Dependency tree / graph

Firefox Tracking Flags

(Not tracked)




(4 attachments)



10 years ago
2008030704 trunk nightly, linux

The Acid3 test has a reporting function: if you click on the A, it pops up in an alert a report of tests failed; if you shift-click it opens a new page with the report.

This report is missing a lot of letters. Specifically, almost every word from Test 0: on is missing its first letter.

This applies to the dialog and the report. It even applies to the view-source of the report.

BUT! if you highlight the text in the dialog and resize it a lot, you can sometimes get the letters to come back! This also works in the separate page report, and the view-source. I can't find a specific combination of highlighting and resizing that works--sometimes just a little bit of only one will do it, other times it takes a lot of both.

Once you've made the letters appear, they usually stay for subsequent clicks of the A--for a while. Or until you refresh the test. Usually.

Selecting all and pasting into another app pastes all the characters, even if they're not displayed.

I'll post a screenshot in a moment.

Comment 1

10 years ago
Created attachment 307980 [details]
Screenshot -- dialog

Comment 2

10 years ago
Created attachment 307981 [details]
Screenshot -- page

Comment 3

10 years ago
Created attachment 307982 [details]
Screenshot -- making it work

Comment 4

10 years ago
(not sure what the weird grey highlighting on the 3rd screenshot is, probably an artifact of the screenshot program popping up a dialog and changing focus.)

Comment 5

10 years ago
Looks like it has something to do with line 68, when I select all-copy-paste into text editor-save, I get a different line 68 than when I save page as from firefox.

Comment 6

10 years ago
So, the report even says what's wrong. Updating title appropriately.

This may be bug 377314, not sure.
Blocks: 410460
Summary: Acid3 "report" is missing letters → Unpaired surrogate handled wrongly + breaks text after it (Acid3 "report" is missing letters)

Comment 7

10 years ago
This doesn't prevent us from passing acid3.
No longer blocks: 410460
Depends on: 377314

Comment 8

10 years ago
My expectation was that fixing acid3 #68 would also fix the missing letters issue, given that 68 is "we fail on unpaired surrogate pairs" and this was "we fail *spectacularly* on unpaired surrogate pairs".

Given that, I figured it was easier to morph this into issue 68 than create a new bug and mark all the various dependencies. Hence the title change. 

Comment 9

10 years ago
Oh, yeah, I thought this was blocking the acid bug, not depending on it. In any case, it's probably better to make bug 377314 block the acid bug, if you think that's the underlying problem.
(In reply to comment #9)
> Oh, yeah, I thought this was blocking the acid bug, not depending on it.

Well, you did actually make it block the acid bug, which seems wrong.
Never mind. Do whatever you like with this bug and/or bug 377314! :)

"fixing acid3 #68 would also fix the missing letters issue" means to depend on acid3, "fixing the missing letters issue would make us pass acid3 #68" means to block acid3.

Comment 12

10 years ago
Okay, so to make this simplest, I've filed bug 421576 for acid3 #68, it blocks the acid tracking bug, this bug depends on it (and probably will be fixed for free when it gets fixed). 

377314 looks WFM, but it might just be that the problem is hidden because other things changed with the testcase.

Sorry for the confusion.
Depends on: 421576
Main cause of funny error message is;
  Stupid error message by Acid3 test 68 in environment where test 68 fails.
Even though the error message(finally by alert) is issued when test 68 fails,
i.e. when invalid unicode data of 0xd863+'test' is not converted properly,
Acid3 test 68 finally issues alert(...+0xd863+'test'+...).

  test 68 : before=0xd863+'test'
            after becomes 0xFFFD+ext ('t' is lost) when Fx latest-trunk
            => test 68 issues fail(...+0xd863+'test'+...)
  Note: fail(...) will never be called when test 68 is successful
  function fail(message) { throw { message: message }; }
  <h1 onclick="report(event)">
  function report(event) {
    issues document.write or alert for logged message data via throw in fail()

To avoid unwanted result like this bug, and to avoid confusion by testers, and to notify user about binary data when test failure, error message is usually coded like fail(...+escape(before)+...), if test failure in special test case such as test 68.
But developement team of Acid3 seem to dislike such extra coding.

See Bug 415391 for phenomenon of unexpected display of alert(0xd863+'test') and conusion by tester of Acid3 when test 68 fails.

Comment 14

10 years ago
...And all that confusion could have been avoided if I'd noticed this was a dupe :(
Last Resolved: 10 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 415391
I don't think DUPing to bug 415391 is good, because what is the problem of bug 415391 by bug opener is still unclear.
There are at least three issues relate to Acid3 test 68.
 (1) Bug 421576 : Acid3 test 68 still fails when Mozilla family
 (2) This big   : Because Acid3 test 68 issues alert(...+before+...)
     where before is String.fromCharCode(0xd863)+'text',
     error message becomes funny(useless) when environment where test 68 fails.
     This will also produce confusion of testers of Acid3 test 68.
 (3) Inconsistent display of alert(String.fromCharCode(0xd863)+'text').
     In bug opener's environment of bug 415391(Linux), it looks to be displayed
     as if or as u%FFFDext(==current failure of Acid3 test 68).
If (1) or (2), DUPing bug 415391 to Bug 421576 or this bug is sufficient.
But if problem of bug 415391 by bug opener is (3), further analysis or discussion will be required, because "what should be displayed by alert(String.fromCharCode(0xd863)+'text')" is unclear.

Re-opening this bug, in order to DUP bug 415391 to this bug if (2).
Blocks: 415391
Resolution: DUPLICATE → ---
I think both of following solutions will be required.
(A) Change code in Acid3 test 68 to fail(...+escape(before)+...+escape(after)+...)
    from fail(...+before+...+after+...)
(B) Resolve Bug 421576
Created attachment 309728 [details]
JavaScript code(javascript:... URI) to see escaped log data of Acid3 test

1. Execute Acid3 test
2. After test ends, Click "A" of "Acid3" => log is displayed by alert()
3. After test ends, Shift+Click "A" of "Acid3" => log is displayed as HTML
4. Paste the javasctipt:... URI in URL bar, and execute it
 (window.open() should be permitted. "Go" shouldn't be set as "open in new tab")  
   Search for '%u' => found in error message for test 68 only.

Currently(with Fx trunk), test 88 fails and error messages relates to binary data(\u002b) is issued. However, error message for binary data is carefully displayed as ascii text by test 88 and binary data is not put in log data of Acid3 test. Stupid error message(binary data && incorrect unicode data) is issued by test 68 only.
(In reply to comment #2)
> Screenshot -- page

Addition of a space & loss of first character of a word is seen in error message of Test 68 itself.
>                   +- 2 spaces  +-- loss of '   
>                   |            |
>                   V            V 
> (input was '#ext',  output was #ext')
> Notes : # == glyph for U+FFFD in your environment



10 years ago
Last Resolved: 10 years ago10 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 421576
You need to log in before you can comment on or make changes to this bug.