Closed
Bug 99666
Opened 24 years ago
Closed 24 years ago
page is displayed as blank in certain situation
Categories
(Core :: DOM: HTML Parser, defect, P1)
Core
DOM: HTML Parser
Tracking
()
VERIFIED
FIXED
mozilla0.9.5
People
(Reporter: amyy, Assigned: shanjian)
References
()
Details
(Keywords: intl, regression, Whiteboard: PDT <html><body></body></html> bug)
Attachments
(6 files)
|
58.10 KB,
text/html
|
Details | |
|
71.15 KB,
text/html
|
Details | |
|
1.85 KB,
text/html
|
Details | |
|
1.15 KB,
patch
|
harishd
:
review+
rpotts
:
superreview+
|
Details | Diff | Splinter Review |
|
566 bytes,
patch
|
harishd
:
review+
rpotts
:
superreview+
|
Details | Diff | Splinter Review |
|
1.96 KB,
patch
|
shanjian
:
review+
shanjian
:
superreview+
|
Details | Diff | Splinter Review |
Build: 09-14 0.9.4 Branch build
Steps to reproduce:
1. Launch browser.
2. View | Character Coding | Auto-detect
3. -- Windows: "Universal" is there
-- Mac9.1-Ja and Linux RH6.2-Ja: "Universal" is not there
4. Go the page: http://home.netscape.com
-- Windows: set Auto-Detect to "Universal" or "All"
-- Mac and Linux: set Auto-Detect "All"
5. Click on the top news "Suspects Named" of 09-14 - I'll attach this page later.
6. A blank page with status "Done" in status bar will be loaded, if you reload
the page, then the correct page gets load correctly.
Note: Clear cache will help you to reproduce the problem.
| Reporter | ||
Comment 1•24 years ago
|
||
| Reporter | ||
Comment 2•24 years ago
|
||
| Reporter | ||
Updated•24 years ago
|
| Reporter | ||
Comment 4•24 years ago
|
||
Yes. We don't have Universal auto-detect before, and auto-detect All was work
fine before.
I believe it's cause by the check-in of Universal detector.
Comment 5•24 years ago
|
||
This sounds more like a problem with a new feature, then a regression to me.
Will the fix be ready soon? What is the user impact of this bug.
Added the URL which can be used to reproduce the problem. It only happens to
some web pages. http://cncenter.sina.com/newsEvent/index.html is also one of them.
Shanjian, could it be the case again that the auto-detector itself has no
problem, but just a trigger to the problem we saw?
is it a new feature? Yuying, did you mean that it is new or that the problem
wasn't there before?
| Reporter | ||
Comment 8•24 years ago
|
||
1. It's a new feature for auto-detect "Universal", however, the problems for
this are:
a. it's on Windows but not on Mac and Linux.
b. doens't work well on Windows.
2. And for the problem with auto-detect All not work well is a regression.
adding nsbranch+ and regression keyword for the auto-detect all part
| Assignee | ||
Comment 10•24 years ago
|
||
I reproduced the problem using http://cncenter.sina.com/newsEvent/index.html.
Page like this one and also netscape's home page all have metacharset specified.
Especially this one, the meta charset is specified in the beginning. So charset
sniffing should work. Tracing inside universal charset detector shows the
detector does got called and report something, but the reported charset is fine
and browser should at least show something.
My guess is something got recent checked in caused all this problem. The problem
is most likely caused by certain timing factor, which universal charset detector
play a role. This is a serious regression and should be resolved. I will
continue to look into this. In the meantime, please let parser and cache people
got involved.
Comment 11•24 years ago
|
||
Shanjian, who should we involve? Add the names to the cc list
| Assignee | ||
Comment 12•24 years ago
|
||
add harish, he knows well about parser
| Assignee | ||
Comment 13•24 years ago
|
||
add gagan, who knows cache issues.
Comment 14•24 years ago
|
||
that would really be gordon :)
| Assignee | ||
Comment 15•24 years ago
|
||
yuying, could you help find out when did we begin to have this problem? This
may help figure our whose checkin cause the problem. If my guess is correct (a
racing problem), this bug might be a little bit hard to trace.
| Assignee | ||
Comment 16•24 years ago
|
||
harish, I found something very interesting. I am not sure if that can provide
some hint to the problem. In nsParser,
nsresult nsParser::OnStopRequest(nsIRequest *request, nsISupports* aContext,
nsresult status)
{
nsresult result=NS_OK;
if(eOnStart==mParserContext->mStreamListenerState) {
//If you're here, then OnDataAvailable() never got called.
//Prior to necko, we never dealt with this case, but the problem may have
existed.
//What we'll do (for now at least) is construct a blank HTML document.
nsAutoString temp; temp.AssignWithConversion("<html><body></body></html>");
mParserContext->mScanner->Append(temp);
result=ResumeParse(PR_TRUE,PR_TRUE);
}
The first if is true and a empty document is constructed. That might be the
blank page we are observing. Do you have any idea why this function got called
without any data sent through OnDataAvailable()?
Comment 17•24 years ago
|
||
I belive that the code ( added by rickg ) is there just to ensure that the
browser window gets painted when something bad, such as OnStartRequest getting
fired before OnDataAvailable, happens. If we hit that condition then we need to
trace back and see who is responsible for not firing OnDataAvailable.
| Reporter | ||
Comment 18•24 years ago
|
||
Auto-detect All regression is some time between 08-27 ~ 09-03.
| Assignee | ||
Comment 19•24 years ago
|
||
| Assignee | ||
Comment 20•24 years ago
|
||
I simplified a problem html page from a sina website. There is nothing special
for this page except it contains some special multi-byte characters which make
the universal charset detector report something. When the detector report
something, it confuse the browser in certain situation.
Using shift-reload, you should see this problem on and off consistently.
| Assignee | ||
Comment 21•24 years ago
|
||
the summary and component of this bug need to be changed. (I just found out that
I did not have the privilege to do so.)
Cache is just a primary suspect, the problem might turn out to be somewhere
else, like parser, layout. But I am quite confident that it is not detector's
problem, though the detector act like a trigger. (According to yuying, this
regression began to happen in 8/27 to 9/3, and the last checkin for charset
detector in commercial tree was on 8/1.)
Please reassign to the right person.
| Assignee | ||
Comment 22•24 years ago
|
||
I changed the summary and component, and reassign this bug to gordon. As I
stated earlier, the problem might turn out to be somewhere else. Cache is the
top suspect in my mind.
Assignee: yokoyama → gordon
Component: Internationalization → Networking: Cache
Summary: Problems on Universal/All auto-detect → page is displayed as blank in certain situation
Updated•24 years ago
|
Whiteboard: <html><body></body></html> bug
| Assignee | ||
Comment 23•24 years ago
|
||
I spent more time on this, and I found that after charset autodetector
notification, parser received data and model is built. So that seems
network/cache is OK. I don't know why layout/refresh is not really initiated.
It seems like some state is mismanipulated inside parser/viewer/layout.
Reassign to harishd and hope he can provide more information.
Assignee: gordon → harishd
Updated•24 years ago
|
Whiteboard: <html><body></body></html> bug → PDT <html><body></body></html> bug
| Assignee | ||
Comment 24•24 years ago
|
||
Harish, I just pinned down the checkin that cause this problem. It is related to
your checkin to nsMetaCharsetObserver.cpp on 8/27. Backing out your patch in
current branch can prevent this problem from happening. I am not quite clear at
this time what is really happening, and your fix might be just a trigger of a
old problem. I will continue to look into this problem in one or 2 hours. You
probably have better understanding what the problem is. So I will keep this
assigned to you and please help.
Component: Networking: Cache → Parser
Comment 25•24 years ago
|
||
hmm, it looks like the DTD's internal state ( NS_ERROR_HTMLPARSER_STOPPARSING
)did not get reset to ( NS_OK ) when reloading the document with new charset.
This would explain why the content model wasn't getting created. Will work on it.
Status: NEW → ASSIGNED
| Assignee | ||
Comment 26•24 years ago
|
||
| Assignee | ||
Comment 27•24 years ago
|
||
| Assignee | ||
Comment 28•24 years ago
|
||
Harish pointed to me where the problem is. I just posted a patch. I will get the
bug back and try to fix it in emojo.
Harish, could you review my fix?
Assignee: harishd → shanjian
Status: ASSIGNED → NEW
| Assignee | ||
Comment 29•24 years ago
|
||
| Assignee | ||
Comment 30•24 years ago
|
||
Harish suggested to default a specific error message. This has been done in the
revised part1 patch. However, since NS_ERROR_MODULE_GENERAL is not available in
branch yet, I would suggest to use part1 instead. To be more clear, I want to :
. Apply patch part1 and part2 to branch.
. part2 and revised part1 for trunk.
Status: NEW → ASSIGNED
Comment 31•24 years ago
|
||
Shanjian: Could you please run browser buster ( international sites ) with your
patch? Browser buster could be found in http://komodo.mozilla.org.
| Assignee | ||
Comment 32•24 years ago
|
||
I am running the buster now. So far so good.
| Assignee | ||
Comment 33•24 years ago
|
||
bobj: Will you please add a comment to characterize what conditions will cause
this bug to occur?
(From the comments, it sounds like this bug has nothing to do with autodetect
and only with meta charset handling.)
When universal charset detector or charset detect all is on, and a webpage also
has a meta charset specified, if meta charset observer send its notification
after autodetector's notification, its request will be rejected by webshell
because a charset reloading is already on its way. However, the error message
returned from observer's notification function will stop parser from continuing
parsing. Theoritically, this may happen with other detectors as well. Because
universal charset detector is able to reach its conclusion earlier than other
detectors, it is more likely to happen when universal charset detector is
selected. So simply speaking, if a detector is selected and the webpage has
meta charset specified, this problem will happen in certain percentage. (for
universal charset detector, this percentage is simply too high. My guess is
50%.)
| Assignee | ||
Comment 34•24 years ago
|
||
harish, I have run both international and top 100 and did not encouner any
problem.
Comment 35•24 years ago
|
||
Comment on attachment 49808 [details] [diff] [review]
patch part1
r=harishd
Attachment #49808 -
Flags: review+
Attachment #49810 -
Flags: review+
| Assignee | ||
Comment 36•24 years ago
|
||
chris, could you sr' my fix?
Comment 37•24 years ago
|
||
I think rpotts might have a better handle on this than I would for sr purposes.
Comment 38•24 years ago
|
||
Comment on attachment 49808 [details] [diff] [review]
patch part1
I think this looks ok...
After these changes, we *really* should rename the nsIWebServices methods to better reflect that they *only* apply to charset-reload and are not generic...
Attachment #49808 -
Flags: superreview+
Comment 39•24 years ago
|
||
Attachment #49810 -
Flags: superreview+
Comment 40•24 years ago
|
||
Comment on attachment 49808 [details] [diff] [review]
patch part1
oops... forgot sr=rpotts@netscape.com
Comment 41•24 years ago
|
||
shanjian - make sure to update the patch status on the final patch.
| Assignee | ||
Updated•24 years ago
|
Attachment #49818 -
Flags: superreview+
Attachment #49818 -
Flags: review+
Comment 42•24 years ago
|
||
This looks like a nice little patch, with some upside. What kinda of testing
have we done on it? What are the risk, if we take it (i.e. What areas will we
break)? How easy is it to back out?
Severity: normal → major
Priority: -- → P2
| Assignee | ||
Comment 43•24 years ago
|
||
> What kinda of testing have we done on it?
I did browser buster tested as suggested by harishd. top 100 site and top 100
international site and some random sites are tested. No problem found.
>What are the risk, if we take it (i.e. What areas will we break)?
I couldn't think of any yet. If our request of reload is rejected, we just tell
parser that nothing happened. To parser that's true. Since nothing really
happen, nothing should go wrong because of this.
>How easy is it to back out?
For branch, there are 2 files involved, and the fix is not complicated. The back
out process is just the same as anything else.
| Assignee | ||
Comment 44•24 years ago
|
||
fix checked into trunk.
Comment 45•24 years ago
|
||
Shanjian/Ftang - Pls come to the PDT tomorrow @ noon to discuss the progress on
this bug.
Severity: major → critical
Priority: P2 → P1
Target Milestone: --- → mozilla0.9.5
Comment 46•24 years ago
|
||
check it in - PDT+
| Assignee | ||
Comment 47•24 years ago
|
||
fix checked in to branch.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
| Reporter | ||
Comment 48•24 years ago
|
||
Fixed verified on both 09-24 and 09-25 branch build.
Status: RESOLVED → VERIFIED
Comment 49•24 years ago
|
||
*** Bug 102365 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•