Closed Bug 296494 Opened 20 years ago Closed 19 years ago

crash [@ nsFileChannel::OnStartRequest ] when I call nsIChannel.asyncOpen()

Categories

(Core :: Networking, defect)

x86
Windows 2000
defect
Not set
critical

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: surkov, Assigned: darin.moz)

Details

(Keywords: crash, testcase)

Crash Data

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; ru-RU; rv:1.7.8) Gecko/20050511 Firefox/1.0.4 (ax)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; ru-RU; rv:1.7.8) Gecko/20050511 Firefox/1.0.4 (ax)

When I call asyncOpen(null, null) then mozilla is crashed.

Example:

var loadurl="file:///c:/mymodule.xml";
var requestor=new XMLHttpRequest();
requestor.open("GET", loadurl, false);
requestor.send(null);

requestor.channel.asyncOpen(null, null);

Reproducible: Always
Does it crash with firefox 1.1alpha (deer park)
- http://www.mozilla.org/projects/deerpark/releases/alpha1.html

Did you submit any crash information? If so, what TalkbackIDs are they? (run
../components/talkback.exe to see the TBIDs)
> requestor.channel.asyncOpen(null, null);

you must not pass null as the listener. this bug seems invalid.
(why are you using asyncOpen on a channel that is already opened? (by send))

(also, what do you _expect_ when you asyncOpen a channel without giving it a
listener?)
Attached patch crash detailsSplinter Review
I post it like patch because file is too large.
you are using XMLHttpRequest incorrectly.  this bug is pretty much invalid
except that we probably still shouldn't crash ;-)

can you post a testcase?
> you must not pass null as the listener. this bug seems invalid.
I think this bug cannot be invalid because this code crashes mozilla. It's
needed exception if such behaviour is not intended.

>also, what do you _expect_ when you asyncOpen a channel without giving it a
listener?
When I pass null instead of listener then I suppose I don't need any callback.
If you think it's wrong behaviour then throw exception.

>(why are you using asyncOpen on a channel that is already opened? (by send))

Actually I try to download file, change it and then upload it. There are missed
lines in code. But crash is presented with these lines or without them.
Attached file xml file
save it on root of 'c:' disc with name 'mymodule.xml'
Attached file test case
save this file and attached xml file on local disc
Testcase crashes for me with:
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20050821
Firefox/1.6a1
Talkback ID: TB8635856G

nsFileChannel::OnStartRequest 
[c:/builds/tinderbox/Fx-Trunk/WINNT_5.2_Depend/mozilla/netwerk/protocol/file/src/nsFileChannel.cpp,
line 540]
0x778b0c24
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: crash, testcase
Summary: crash when I call nsIChannel.asyncOpen() → crash [@ nsFileChannel::OnStartRequest ] when I call nsIChannel.asyncOpen()
Keywords: helpwanted
Testcase WFM using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060621 Minefield/3.0a1 ID:2006062104 [cairo]
Yeah, testcase is wfm too, with current trunk build.
Status: NEW → RESOLVED
Closed: 19 years ago
Keywords: helpwanted
Resolution: --- → WORKSFORME
Crash Signature: [@ nsFileChannel::OnStartRequest ]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: