Closed
Bug 3093
Opened 26 years ago
Closed 26 years ago
NECKO: Stream blocking indefinitely
Categories
(Core :: Networking, defect, P2)
Tracking
()
VERIFIED
FIXED
M9
People
(Reporter: michael.j.lowe, Assigned: gagan)
Details
(Whiteboard: asked developer to verify)
With the following code, if the resource file does not exist on disk then the
first call to stream->Read() will block forever. It should return an error code
either in this call, or one of the earlier calls.
// Open stream to read top sites resource file
nsIURL* url;
nsresult rv = NS_NewURL(&url, "resource:/res/topsites.txt");
if (rv != NS_OK) {
return;
}
nsIInputStream* stream;
rv = NS_OpenURL(url, &stream);
if (rv != NS_OK) {
NS_RELEASE(url);
return;
}
PRUint32 len;
char buf[1024];
nsString sitesStr;
// Load file into buffer
do {
// >>>> THIS LINE IS BLOCKING FOREVER <<<<
rv = stream->Read(buf, 0, 1024, &len);
if (rv != NS_OK) break;
sitesStr.Append(buf, len);
} while (len > 0);
NS_RELEASE(url);
NS_RELEASE(stream);
Comment 2•26 years ago
|
||
setting paulmac as QA contact for all gagan's bugs (sorry for the spam)
Updated•26 years ago
|
Target Milestone: M6
Comment 3•26 years ago
|
||
Error case. Wait for netlib rewrite to fix it.
Per DP's suggestion marking these till M8. Though Necko lands with M7, we will
be able to verify it for M8.
Comment 5•26 years ago
|
||
I'm moving this to target M9, Necko will be enabled somewhere during late M8 or
early M9. We will need to get on this and it cannot be postponed past the M9
milestone.
Changing all Networking Library/Browser bugs to Networking-Core component for
Browser.
Occasionally, Bugzilla will burp and cause Verified bugs to reopen when I do
this in a bulk change. If this happens, I will fix. ;-)
Summary: Stream blocking indefinitely → NECKO: Stream blocking indefinitely
Updated•26 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Whiteboard: asked developer to verify
Comment 8•26 years ago
|
||
Michael, are you around? Can you verify that this is fixed with the new
networking library?
Reporter | ||
Comment 9•26 years ago
|
||
The symptoms of this bug appear to be fixed (ie. it no longer seems to block
loading a non-existant resource file), but I don't have the time right now to
check the specific code example given in the original bug report.
Updated•26 years ago
|
Status: RESOLVED → VERIFIED
Comment 10•26 years ago
|
||
thanks, I will mark verified and you may re-open in future if you run into it
again
Comment 11•25 years ago
|
||
Bulk move of all Networking-Core (to be deleted component) bugs to new
Networking component.
You need to log in
before you can comment on or make changes to this bug.
Description
•