Closed
Bug 149090
Opened 22 years ago
Closed 22 years ago
viewing an image three times corrupts web pages [leaks file descriptors on all platforms]
Categories
(Core :: Networking: Cache, defect, P1)
Tracking
()
VERIFIED
FIXED
mozilla1.0.1
People
(Reporter: waldemar, Assigned: darin.moz)
References
()
Details
(Whiteboard: [adt1 RTM][verified-trunk][verified-branch])
Attachments
(1 file)
658 bytes,
patch
|
dougt
:
review+
rpotts
:
superreview+
asa
:
approval+
|
Details | Diff | Splinter Review |
Go to the URL above. Click on the the Welcome pose 001 image to load a second web page with a larger version of that image. Right-click on that image and use the context menu to save it on the local disk. Press the browser's back button to go back to the original page. Now click on the Welcome pose 001 image to load the second web page again. That page is now corrupted -- it no longer has any image! Reload and shift-reload don't bring it back. This bug occurs on both the 1.0 branch and the trunk.
Reporter | ||
Comment 1•22 years ago
|
||
Not sure which component is responsible for this behavior. Cache? Layout?
Keywords: nsbeta1
Comment 2•22 years ago
|
||
simple testcase: click on http://www.mozillazine.org/weblogs/asa/wall.jpg then hit the back button, then the forward button, then the back button and forward again. The browser will not be able to find that URL after the second time you navigate forward. also when clicking on the save as dialog mentioned above you don't actually have to save, you can cancel out of the save dialog and still manifest the problem.
Summary: Saving an image corrupts web page → saving or viewing an image image corrupts web page
Reporter | ||
Comment 3•22 years ago
|
||
To clarify, there are several independent ways to trigger this bug. 1. View any JPEG or PNG image three times, as in comment 2. 2. Try to save a JPEG or PNG image, and then go back and forward. The bug occurs even if the save was canceled out. 3. Use the "View Image" context menu, and then go back and forward. In all cases the image in question disappears from its host page and cannot be brought back through any browser action (not even shift-reload) until the browser is quit.
Summary: saving or viewing an image image corrupts web page → viewing an image three times corrupts web pages
Assignee | ||
Comment 5•22 years ago
|
||
finally, a reproducible testcase ... thank you waldemar!!
Severity: major → critical
Priority: -- → P1
Target Milestone: --- → mozilla1.0.1
Comment 6•22 years ago
|
||
This bug is also in Mac OS Classic (9.0.4 for me) latest build 2002060408 as well as 1RC3 in Mac OS 10.1.4. Manifests whenever you go Back and Forward from ANY image alone (that is, not inline on an HTML page, a directory listing for example, as well as ways mentioned in comments #2 and #3).
Assignee | ||
Comment 7•22 years ago
|
||
this bug does not seem to be reproducible in chimera (which makes sense given that it uses the XP_UNIX backend). at any rate, it must have something to do with the carbon file i/o code.
Assignee | ||
Comment 8•22 years ago
|
||
ok, i discovered the source of the problem. basically, we are leaking a file descriptor that was opened with read/write access. as a result, future attempts to open the file for read/write access fail. the leak occurs the second time the image is loaded because it has to do with imagelib deciding to use the copy it has in its memory cache, which was created as a result of the first image load. the leak is reproducible on linux as well, however, under linux the consequences of the leak are far less severe.
Assignee | ||
Comment 9•22 years ago
|
||
turns out when we load a large enough image, the file transport suspends itself until imagelib consumes the first part of the file. however, in this case, imagelib decides not to consume the data and instead cancels the request. well, the file transport fails to unsuspend itself properly... turns out the file transport service still has a reference to the file transport in its suspended file transports list. the file transport gets canceled, but a reference to it remains forever with the file transport service until we shutdown. as a result we effectively leak the cache file until the app quits.
Assignee | ||
Comment 10•22 years ago
|
||
i verified this patch on linux and macosx.
Status: NEW → ASSIGNED
OS: MacOS X → All
Summary: viewing an image three times corrupts web pages → viewing an image three times corrupts web pages [leaks file descriptors on all platforms]
Comment 11•22 years ago
|
||
Comment on attachment 86525 [details] [diff] [review] v1 patch good catch. r=dougt
Attachment #86525 -
Flags: review+
Assignee | ||
Updated•22 years ago
|
Keywords: mozilla1.0.1
Whiteboard: [adt1 RTM]
Comment 12•22 years ago
|
||
Comment on attachment 86525 [details] [diff] [review] v1 patch sr=rpotts@netscape.com
Attachment #86525 -
Flags: superreview+
Comment 13•22 years ago
|
||
*** Bug 146357 has been marked as a duplicate of this bug. ***
Comment 14•22 years ago
|
||
Comment on attachment 86525 [details] [diff] [review] v1 patch a=asa (on behalf of drivers) for checkin to the 1.1 trunk.
Attachment #86525 -
Flags: approval+
Assignee | ||
Comment 15•22 years ago
|
||
fixed-on-trunk
Comment 16•22 years ago
|
||
tever - can you pls verify this one on the trunk? thanks!
Comment 17•22 years ago
|
||
checked with asa's test case, image is now found after hitting back/forward a few times. verified trunk - 2002060708 - mac osX
Status: RESOLVED → VERIFIED
Whiteboard: [adt1 RTM] → [adt1 RTM][verified-trunk]
Comment 18•22 years ago
|
||
*** Bug 147761 has been marked as a duplicate of this bug. ***
Comment 19•22 years ago
|
||
please checkin to the 1.0.1 branch. once there, remove the "mozilla1.0.1+" keyword and add the "fixed1.0.1" keyword.
Keywords: mozilla1.0.1 → mozilla1.0.1+
Comment 20•22 years ago
|
||
adding adt1.0.1+ for checkin to the 1.0.1 branch.
Comment 21•22 years ago
|
||
WFM under 1.1a (Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.1a) Gecko/20020610)
Assignee | ||
Updated•22 years ago
|
Keywords: mozilla1.0.1+ → fixed1.0.1
Comment 22•22 years ago
|
||
verified branch - 07/18/2002 builds - win32, linux, mac
Keywords: verifyme
Whiteboard: [adt1 RTM][verified-trunk] → [adt1 RTM][verified-trunk][verified-branch]
Updated•22 years ago
|
Keywords: verified1.0.1
Assignee | ||
Comment 24•22 years ago
|
||
*** Bug 141831 has been marked as a duplicate of this bug. ***
Comment 25•22 years ago
|
||
*** Bug 146957 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
•