Closed
Bug 118735
Opened 23 years ago
Closed 23 years ago
mozilla crashes on startup if "bad" entry in Personal Toolbar
Categories
(SeaMonkey :: Bookmarks & History, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: daa, Assigned: mozilla)
Details
(Keywords: smoketest)
Attachments
(2 files)
mozilla crashes on startup - if "Personal Toolbar Folder" has enough entries to
be wider that window size
| Reporter | ||
Comment 1•23 years ago
|
||
| Reporter | ||
Updated•23 years ago
|
Attachment #63958 -
Attachment description: sample minimal bookmarks.hmtl → sample minimal bookmarks.html
| Reporter | ||
Comment 2•23 years ago
|
||
change summary
crash is if either the tinderbox or bugzilla entry in attached bookmark.html is
there
Summary: mozilla crashes on startup if too many entries in Personal Toolbar → mozilla crashes on startup if "bad" entry in Personal Toolbar
What build ID? Yesterday morning's?
| Reporter | ||
Comment 4•23 years ago
|
||
20020108xx tip local build
crashed win32 too
both crashed on clean start( autoimport NS4 profile)
OS: Linux → All
Comment 6•23 years ago
|
||
confirmed on linux current tip optimized build
Comment 7•23 years ago
|
||
Hyatt was talking about this exact problem yesterday, he was either fixing this,
or breaking it. Reassigning ;)
Assignee: ben → hyatt
Comment 8•23 years ago
|
||
adding stacktrace from todays CVS Linux
If that's the stack, then it has nothing to do with the window size.
| Assignee | ||
Comment 10•23 years ago
|
||
The stack indicates its due to a change in RDF's in-memory datasource which went
in on Sunday. Patch below:
Index: mozilla/rdf/base/src/nsInMemoryDataSource.cpp
===================================================================
RCS file: /cvsroot/mozilla/rdf/base/src/nsInMemoryDataSource.cpp,v
retrieving revision 1.62
diff -u -2 -r1.62 nsInMemoryDataSource.cpp
--- mozilla/rdf/base/src/nsInMemoryDataSource.cpp 7 Jan 2002 11:18:53 -0000
1.62
+++ mozilla/rdf/base/src/nsInMemoryDataSource.cpp 8 Jan 2002 21:32:55 -0000
@@ -700,6 +700,4 @@
if (mAssertion && mAssertion->mHashEntry) {
// its our magical HASH_ENTRY forward hash for assertions
- mAssertion = nsnull;
-
nsresult rv = NS_NewISupportsArray(getter_AddRefs(mHashArcs));
if (NS_SUCCEEDED(rv)) {
@@ -709,4 +707,5 @@
ArcEnumerator, mHashArcs.get());
}
+ mAssertion = nsnull;
}
}
| Assignee | ||
Comment 11•23 years ago
|
||
However, even with the patch applied, Mozilla then appears to spin forever inside
of the XUL template builder. Waterson, do you have a few minutes to look at this
with me?
| Assignee | ||
Comment 12•23 years ago
|
||
If I had to take a guess, I'd say from the sample bookmarks file attached to this
bug that the Personal Toolbar folder doesn't have an "ID" assigned to it in the
file, so that the bookmark's service is trying to change its URL, and we're
getting into an infinite loop somewhere between bookmarks, RDF and the XUL
template builder.
| Assignee | ||
Comment 14•23 years ago
|
||
Hmmm... at second glance, this is now a bug in XBL... reassigning back to Hyatt.
;) <hehe>
Just kidding!
| Reporter | ||
Comment 15•23 years ago
|
||
the bookmarks file is a imported NS4.7 bookmarks file from starting mozilla with
no profiles available
mozillais now hanging up in the import - after the importing alert closes
^C ing mozilla leaves a bookmarks.html with no ID=S
probably need new bug
| Assignee | ||
Comment 16•23 years ago
|
||
DOH! Here we go. Reviews, please!
Index: mozilla/rdf/base/src/nsInMemoryDataSource.cpp
===================================================================
RCS file: /cvsroot/mozilla/rdf/base/src/nsInMemoryDataSource.cpp,v
retrieving revision 1.62
diff -u -2 -r1.62 nsInMemoryDataSource.cpp
--- mozilla/rdf/base/src/nsInMemoryDataSource.cpp 7 Jan 2002 11:18:53 -0000
1.62
+++ mozilla/rdf/base/src/nsInMemoryDataSource.cpp 8 Jan 2002 22:49:34 -0000
@@ -700,6 +700,4 @@
if (mAssertion && mAssertion->mHashEntry) {
// its our magical HASH_ENTRY forward hash for assertions
- mAssertion = nsnull;
-
nsresult rv = NS_NewISupportsArray(getter_AddRefs(mHashArcs));
if (NS_SUCCEEDED(rv)) {
@@ -709,4 +707,5 @@
ArcEnumerator, mHashArcs.get());
}
+ mAssertion = nsnull;
}
}
@@ -758,4 +757,5 @@
if (itemCount > 0) {
nsCOMPtr<nsIRDFResource> res = do_QueryInterface(mHashArcs->
ElementAt(itemCount-1));
+ mHashArcs->RemoveElementAt(itemCount-1);
mCurrent = res;
NS_IF_ADDREF(mCurrent);
Status: NEW → ASSIGNED
Comment 17•23 years ago
|
||
This first chunk looks fine. The second chunk leaks (always did, my bad for not
catching it). nsISupportsArray::ElementAt() addref's.
Why don't you do this instead:
if (itemCount > 0)
PRInt32 last = itemCount - 1;
mCurrent = NS_STATIC_CAST(nsIRDFResource *,
mHashArcs->ElementAt(last));
mHashArcs->RemoveElementAt(last);
*aResult = PR_TRUE;
return NS_OK;
}
Also saves an unneeded QI, since you _know_ the only things being put in this
array are nsIRDFResource objeccts.
Keywords: crash
| Assignee | ||
Comment 18•23 years ago
|
||
OK.
Index: mozilla/rdf/base/src/nsInMemoryDataSource.cpp
===================================================================
RCS file: /cvsroot/mozilla/rdf/base/src/nsInMemoryDataSource.cpp,v
retrieving revision 1.62
diff -u -2 -r1.62 nsInMemoryDataSource.cpp
--- mozilla/rdf/base/src/nsInMemoryDataSource.cpp 7 Jan 2002 11:18:53 -0000
1.62
+++ mozilla/rdf/base/src/nsInMemoryDataSource.cpp 8 Jan 2002 23:12:23 -0000
@@ -700,6 +700,4 @@
if (mAssertion && mAssertion->mHashEntry) {
// its our magical HASH_ENTRY forward hash for assertions
- mAssertion = nsnull;
-
nsresult rv = NS_NewISupportsArray(getter_AddRefs(mHashArcs));
if (NS_SUCCEEDED(rv)) {
@@ -709,4 +707,5 @@
ArcEnumerator, mHashArcs.get());
}
+ mAssertion = nsnull;
}
}
@@ -757,7 +756,8 @@
if (NS_FAILED(rv = mHashArcs->Count(&itemCount))) return(rv);
if (itemCount > 0) {
- nsCOMPtr<nsIRDFResource> res = do_QueryInterface(mHashArcs->
ElementAt(itemCount-1));
- mCurrent = res;
- NS_IF_ADDREF(mCurrent);
+ --itemCount;
+ mCurrent = NS_STATIC_CAST(nsIRDFResource *,
+ mHashArcs->ElementAt(itemCount));
+ mHashArcs->RemoveElementAt(itemCount);
*aResult = PR_TRUE;
return NS_OK;
Comment 19•23 years ago
|
||
sr=waterson
| Assignee | ||
Comment 20•23 years ago
|
||
Fixed. Thanks for the reviews, Chris and Darin.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Updated•20 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•