Closed Bug 71397 Opened 24 years ago Closed 23 years ago

Trunk crash [@ nsFileIO::Open]

Categories

(Core :: Networking: File, defect, P1)

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED
mozilla0.9.2

People

(Reporter: jcarpenter0524, Assigned: dougt)

References

Details

(Keywords: crash, topcrash)

Crash Data

This is a topcrasher for mozilla 0.8 (M08).

Here is a stack trace:

Incident ID 27045492 
nsFileIO::Open [d:\builds\0.8\mozilla\netwerk\base\src\nsFileStreams.cpp, line 
147] 
nsFileTransport::Process 
[d:\builds\0.8\mozilla\netwerk\base\src\nsFileTransport.cpp, line 547] 


User comment and url that might help repro this crash:

URL:(26869243) JabberZilla: NECKO.DLL
Comment: (26989236) Trying to load a file from disk (SMB share)
adding crash and topcrash keywords
Keywords: crash, topcrash
okay.  where is the talkback server?  How do I get info on 27045492 ?  
based on the data in the talkback report, this is dereferencing of null.  Here
is a patch that should fix this problem:

cvs server: Diffing .
Index: nsFileStreams.cpp
===================================================================
RCS file: /cvsroot/mozilla/netwerk/base/src/nsFileStreams.cpp,v
retrieving revision 1.12
diff -u -r1.12 nsFileStreams.cpp
--- nsFileStreams.cpp	2001/03/05 03:43:33	1.12
+++ nsFileStreams.cpp	2001/03/09 20:46:35
@@ -104,6 +104,9 @@
 NS_IMETHODIMP
 nsFileIO::Init(nsIFile* file, PRInt32 ioFlags, PRInt32 perm)
 {
+   if (file == nsnull)
+        return NS_ERROR_NULL_POINTER;
+
     mFile = file;
     mIOFlags = ioFlags;
     mPerm = perm;
@@ -125,6 +128,9 @@
 NS_IMETHODIMP
 nsFileIO::Open(char **contentType, PRInt32 *contentLength)
 {
+    if (mFile == nsnull)
+        return NS_ERROR_NULL_POINTER;
+
     // don't actually open the file here -- we'll do it on demand in the
     // GetInputStream/GetOutputStream methods
     nsresult rv = NS_OK;
@@ -188,6 +194,9 @@
 NS_IMETHODIMP
 nsFileIO::GetInputStream(nsIInputStream * *aInputStream)
 {
+    if (mFile == nsnull)
+        return NS_ERROR_NULL_POINTER;
+
     nsresult rv;
     PRBool isDir;
     rv = mFile->IsDirectory(&isDir);
@@ -224,6 +233,9 @@
 NS_IMETHODIMP
 nsFileIO::GetOutputStream(nsIOutputStream * *aOutputStream)
 {
+    if (mFile == nsnull)
+        return NS_ERROR_NULL_POINTER;
+
     nsresult rv;
     PRBool isDir;
     rv = mFile->IsDirectory(&isDir);
@@ -257,6 +269,9 @@
 NS_IMETHODIMP
 nsFileIO::GetName(char* *aName)
 {
+    if (mFile == nsnull)
+        return NS_ERROR_NULL_POINTER;
+
     return mFile->GetPath(aName);
 }
Status: NEW → ASSIGNED
Keywords: patch
Should you add an assert, too? Why is this happening? Is it just mis-use of the 
API? If that's the case, this is fine as-is (maybe NS_ERROR_NOT_INITIALIZED 
might be a better error code). If we don't know why this is happening (i.e., the 
API is being used right), then add some assertions, too so we can try to track 
down why it's happening.

do that, and r= (or sr=) waterson.
Target Milestone: --- → mozilla0.8.1
lets get this in when leaf opens the tree for 0.8.1 cleanup
Whiteboard: have patch reviewed and ready for 0.8.1
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
There seems to be some regression. Here is the new stack trace.


Incident ID 30862086
nsFileIO::Open [d:\builds\seamonkey\mozilla\netwerk\base\src\nsFileStreams.cpp,
line 156]
nsFileTransport::Process
[d:\builds\seamonkey\mozilla\netwerk\base\src\nsFileTransport.cpp, line 643]
nsFileTransport::Run
[d:\builds\seamonkey\mozilla\netwerk\base\src\nsFileTransport.cpp, line 609]
nsThreadPoolRunnable::Run
[d:\builds\seamonkey\mozilla\xpcom\threads\nsThread.cpp, line 844] 



MORE TALKBACK INFORMATION.

This crash happens in the recent Trunk builds.

 nsFileIO::Open	[d:\builds\seamonkey\mozilla\netwerk\base\src\nsFileStreams.cpp  line 156]
	 nsFileTransport::Process
[d:\builds\seamonkey\mozilla\netwerk\base\src\nsFileTransport.cpp  line 643]
    nsFileIO::Open 178bd6b8
	http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/netwerk/base/src/nsFileStreams.cpp line 156
	Build: 2001052409 CrashDate: 2001-05-24 UptimeMinutes: 229  Total: 577 
	OS: Windows NT  5.0 build 2195
	 Detailed : http://climate/reports/incidenttemplate.cfm?bbid=30887033
	 StackTrace: http://climate/reports/stackcommentemail.cfm?dynamicBBID=30887033
     (30887033)	URL: www.novell.com

Build: 2001052309 CrashDate: 2001-05-24 UptimeMinutes: 200  Total: 200 
OS: Windows NT  5.0 build 2195
 Detailed : http://climate/reports/incidenttemplate.cfm?bbid=30862086
 StackTrace: http://climate/reports/stackcommentemail.cfm?dynamicBBID=30862086

Build: 2001052313 CrashDate: 2001-05-23 UptimeMinutes: 11  Total: 40 
OS: Windows 98  4.10 build 67766446
Detailed : http://climate/reports/incidenttemplate.cfm?bbid=30842881
StackTrace: http://climate/reports/stackcommentemail.cfm?dynamicBBID=30842881
(30842881)
URL: prefs
(30842881)
Comments: in prefs

Build: 2001052313 CrashDate: 2001-05-23 UptimeMinutes: 297  Total: 297 
OS: Windows NT  5.0 build 2195
Detailed : http://climate/reports/incidenttemplate.cfm?bbid=30841339
StackTrace: http://climate/reports/stackcommentemail.cfm?dynamicBBID=30841339

Build: 2001052313 CrashDate: 2001-05-23 UptimeMinutes: 6  Total: 7 
OS: Windows NT  5.0 build 2195
Detailed : http://climate/reports/incidenttemplate.cfm?bbid=30836406
 StackTrace: http://climate/reports/stackcommentemail.cfm?dynamicBBID=30836406

Build: 2001052313 CrashDate: 2001-05-23 UptimeMinutes: 0  Total: 0 
OS: Windows NT  5.0 build 2195
Detailed : http://climate/reports/incidenttemplate.cfm?bbid=30835945
StackTrace: http://climate/reports/stackcommentemail.cfm?dynamicBBID=30835945

Build: 2001052306 CrashDate: 2001-05-23 UptimeMinutes: 162  Total: 162 
OS: Windows NT  5.0 build 2195
Detailed : http://climate/reports/incidenttemplate.cfm?bbid=30823362
StackTrace: http://climate/reports/stackcommentemail.cfm?dynamicBBID=30823362
(30823362)
URL: closing attachment
(30823362)
Comments: I opened an attachment via the file menu. The attachment displayed. I
closed the window and the whole program caved


I am reopening this bug if you think it is a different bug then i will create a
new bug.
Severity: normal → critical
Status: RESOLVED → REOPENED
Keywords: patch
Resolution: FIXED → ---
Summary: M08 crash [@ nsFileIO::Open] → Trunk crash [@ nsFileIO::Open]
Whiteboard: have patch reviewed and ready for 0.8.1
Target Milestone: mozilla0.8.1 → ---
*** Bug 80013 has been marked as a duplicate of this bug. ***
Target Milestone: --- → mozilla0.9.2
This crash was invisible to the Talkback reporting due to a bug in the
script...but not that it is fixed, we are seeing this near the top of the Trunk
topcrash list!  Most of the comments mention a startup crash and the last build
to crash was 2001060322. Here is the latest info from today's report:

nsFileIO::Open   92
			 71397 	 REOP 	  	 dougt@netscape.com mozilla0.9.2 
     First BBID :30964664
     Last BBID  :31329165
     Min Runtime :6
     Max Runtime :273265
     First Appearance Date : 2001-05-27
     Last Appearance Date : 2001-06-04
     First BuildID : 2001052622
     Last BuildID : 2001060322

Stack Trace: 

	 nsFileIO::Open
[d:\builds\seamonkey\mozilla\netwerk\base\src\nsFileStreams.cpp  line 156]
	 nsFileTransport::Process
[d:\builds\seamonkey\mozilla\netwerk\base\src\nsFileTransport.cpp  line 643]
 
 	Source File :
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/netwerk/base/src/nsFileStreams.cpp
line : 156
     (31309311)	URL: www.msn.com
(31302123)
URL: www.netscape.com
(31302123)
Comments: crash on startup
     (31300826)	URL: home.netscape.com
     (31300826)	Comments: starting up the application.
     (31279512)	URL: www.netscape.com
(31279512)
Comments: crash on startup
     (31270261)	URL: www.netscape.com
(31270261)
Comments: crash on startup
     (31252125)	Comments: POP mail via PPTP connection -- Mozilla crashed during
authentication or just after that.
     (31246110)	URL: www.encarta.com
(31245646)
URL: www.netscape.com
(31245646)
Comments: Crashing at startup
     (31243287)	URL: www.netscape.com
(31243287)
Comments: startup-->crash
     (31242737)	URL: www.netscape.com
(31242095)
URL: www.grc.com
(31242095)
Comments: un-minimizing browser window; had several other windows open
     (31224580)	URL: http://www.cbs.com
(31224580)
Comments: Attempting to watch Tina's final words on the site (a Javascript based
popup window
     (31224263)	URL: http://www.tichk.org/
(31214579)
URL: http://linuxtoday.com
(31213387)
URL: www.netscape.com
(31213387)
Comments: The 1st launch of the browser always does this to me.
     (31203992)	Comments: Crash at application launch
     (31196569)	URL: either somehwere on sap.com or 3com.com
     (31196569)	Comments: opening local URL
     (31196288)	URL: http://dcbforum.sun.com/forum.jsp?forum=46
(31196288)
Comments: I just displayed the "J2EE in Practice" forum
     (31194463)	URL: www.linuxtoday.com
(31194463)
Comments: Browser crashed while loading the above web page.
     (31189587)	URL: http://www.theregister.co.uk/content/3/19376.html
(31189587)
Comments: Following a link to the above URL.. page seemed to display OK
     (31187546)	Comments: Typing in a URL
     (31185548)	Comments: Just browsing news pages
     (31184110)	URL: http://www.mozilla.org
(31184110)
Comments: The browser suddenly failed. Was just waiting on
     (31174494)	URL: http://linuxtoday.com
(31174494)
Comments: Crash while loading page.
     (31169554)	Comments: Left mail/news on
     (31166611)	Comments: No URL
     (31166052)	URL: http://linuxtoday.com
(31166052)
Comments: Had several windows open. Then chose to go to linuxtoday.com. Then it
crashed. 
     (31150973)	Comments: Occured during startup of application
     (31146018)	Comments: I typed www into the address bar and it immediately crashed. 
Going to attempt to reproduce.
     (31140641)	URL: http://www.rolandgarros.com/fr/scores
(31127370)
Comments: trying to access page on corp intranet while not connected through SERA
     (31125518)	URL: www.hkfn.com
(31125518)
Comments: crash during load the said url.
     (31125049)	URL: http://linuxtoday.com
(31125049)
Comments: Went to linuxtoday.com and it died.
     (31101576)	Comments: I belive I just hit the back button.
     (31098356)	URL: bugzilla.mozilla.org
     (31098356)	Comments: Mozilla crashed after bugzilla was query loaded in the search sidebar.
     (31097345)	URL: http://www.mozilla.org
(31097345)
Comments: Just started communicator and it crashed as I tried entering a new URL
into the Address bar.  This is a Dell Duall PIII 800 running Windows 2000
     (31087576)	URL: http://www.rolandgarros.com/fr
(31087576)
Comments: acceding to this site
     (31062619)	URL: www.yahoo.com
(31062619)
Comments: Typed in www.yahoo.com and pressed enter in the location bar.


There were a few crashes with WinNT, Win98 and Linux, but most of them were on
Windows 2K.



This will be the next thing I look.
Status: REOPENED → ASSIGNED
Priority: -- → P1
*** Bug 84104 has been marked as a duplicate of this bug. ***
Depends on: 84489
I checked in a fix to 84489, which mostlikely was the root cause of this bug.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago23 years ago
Resolution: --- → FIXED
Bliss!
not showing up in the latest trunk top crash report

verified
Status: RESOLVED → VERIFIED
Crash Signature: [@ nsFileIO::Open]
You need to log in before you can comment on or make changes to this bug.