Closed
Bug 313990
Opened 20 years ago
Closed 20 years ago
Firefox crashes on startup if bookmarkbackups/ is unreadable [@nsBookmarksService::ArchiveBookmarksFile]
Categories
(Firefox :: Bookmarks & History, defect, P2)
Firefox
Bookmarks & History
Tracking
()
VERIFIED
FIXED
Firefox1.5
People
(Reporter: mnordhoff, Assigned: Gavin)
Details
(Keywords: crash, fixed1.8)
Crash Data
Attachments
(2 files, 1 obsolete file)
|
45.64 KB,
text/plain
|
Details | |
|
1.30 KB,
patch
|
asaf
:
review+
mtschrep
:
approval1.8rc2+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20051026 Firefox/1.5
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20051026 Firefox/1.5
If the bookmarkbackups/ directory in your profile is unreadable (not chmod +r), Firefox will crash on startup.
If it is readable, even if it's not writable or executable, it won't crash.
Reproducible: Always
Steps to Reproduce:
1. chmod 000 bookmarkbackups/
2. Start Firefox
Actual Results:
Firefox crashes
Expected Results:
Firefox would start up normally, though it certainly wouldn't make a backup of bookmarks.html.
Standard Firefox nightly, empty profile.
It was also confirmed on a trunk CVS build by Mook in #firefox.
Here's what he had to say about what causes it:
<Mook> http://lxr.mozilla.org/mozilla/source/browser/components/bookmarks/src/nsBookmarksService.cpp#4395 backupFileNames.mImpl is null
<Mook> strange, hasMoreElements is 0...
<Mook> hmm, existingBackups->mRawPtr is null
<Mook> Peng: file it as http://lxr.mozilla.org/mozilla/source/browser/components/bookmarks/src/nsBookmarksService.cpp#4377 existingBackups needs a null check.
<Mook> Of course, you probably know better than I do :)
<Mook> well, existingBackups is null, so http://lxr.mozilla.org/mozilla/source/browser/components/bookmarks/src/nsBookmarksService.cpp#4383 crashes due to dereferencing a null nsCOMPtr.
That's mostly over my head, of course. :P
| Reporter | ||
Comment 1•20 years ago
|
||
Since I am unable to send in Talkback reports, here you go, though Mook's information should be useful enough.
| Reporter | ||
Comment 2•20 years ago
|
||
It'll also crash if bookmarkbackups is a symlink to /dev/null. I don't know if this is caused by the same problem, but it should be able to survive bookmarkbackups being something unexpected...
Comment 3•20 years ago
|
||
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051027 Firefox/1.5
I see this too. You should put OS too All. The memory is growing near 2mb each seconds. This is a very critical bug .. we should come with a patch that shut down this page when unreadable instead of trying to open it to finaly crash with a high memory usage.
Flags: blocking1.8rc1?
Updated•20 years ago
|
Flags: blocking1.9a1?
Updated•20 years ago
|
Flags: blocking1.9a1?
Flags: blocking1.8rc1?
Comment 4•20 years ago
|
||
sorry there was a confusion with the bug before this one, it somehiow managed to post here instead of bug 313983
| Assignee | ||
Updated•20 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
Hardware: PC → All
Target Milestone: --- → Firefox1.6-
Version: unspecified → Trunk
Comment on attachment 200967 [details]
Useless.
this is not the talkback report. it's just the data that was sent to the server. please run talkback and copy the incident id.
Attachment #200967 -
Attachment description: Talkback report → Useless.
| Reporter | ||
Comment 6•20 years ago
|
||
As I said, I couldn't connect to the server to send the reports and get Talkback IDs. And now the reports have vanished from the queue. I've crashed it again, and got TB11171279E, I think, though I can't get to the website and make sure.
| Assignee | ||
Comment 7•20 years ago
|
||
Check rv, don't warn. Fixes the crash.
| Assignee | ||
Updated•20 years ago
|
Priority: -- → P2
| Assignee | ||
Updated•20 years ago
|
Whiteboard: [patch-r?]
Comment 8•20 years ago
|
||
Comment on attachment 201215 [details] [diff] [review]
patch
>Index: browser/components/bookmarks/src/nsBookmarksService.cpp
>===================================================================
> if (forceArchive == PR_FALSE) {
>+
get rid of the extra new line.
> nsCOMPtr<nsISimpleEnumerator> existingBackups;
>- bookmarksBackupDir->GetDirectoryEntries(getter_AddRefs(existingBackups));
>+ rv = bookmarksBackupDir->GetDirectoryEntries(getter_AddRefs(existingBackups));
>+ if (NS_FAILED(rv)) return rv;
We should warn here, so use NS_ENSURE_SUCCESS.
Attachment #201215 -
Flags: review?(bugs.mano) → review-
| Assignee | ||
Comment 9•20 years ago
|
||
Attachment #201215 -
Attachment is obsolete: true
Attachment #201355 -
Flags: review?(bugs.mano)
Comment 10•20 years ago
|
||
Comment on attachment 201355 [details] [diff] [review]
patch v2
r=mano
Attachment #201355 -
Flags: review?(bugs.mano) → review+
| Assignee | ||
Comment 11•20 years ago
|
||
Trunk:
mozilla/browser/components/bookmarks/src/nsBookmarksService.cpp;
new revision: 1.71;
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Whiteboard: [patch-r?]
| Reporter | ||
Comment 12•20 years ago
|
||
I can confirm it's fixed in Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20051101 Firefox/1.6a1 ID:2005110104, but is there any chance of the patch going into 1.5? I want to feel more secure about making Firefox unable to write to bookmarkbackups (though if that bug about configuring it was fixed......), but I don't want to use the trunk (it currently has some other annoying bugs).
Status: RESOLVED → VERIFIED
| Assignee | ||
Updated•20 years ago
|
Flags: blocking-aviary2?
Comment 13•20 years ago
|
||
Comment on attachment 201355 [details] [diff] [review]
patch v2
Asking for approval on behalf of Gavin. This is a very safe reproducable startup crash fix.
Attachment #201355 -
Flags: approval1.8rc2?
| Assignee | ||
Updated•20 years ago
|
Summary: Firefox crashes on startup if bookmarkbackups/ is unreadable → Firefox crashes on startup if bookmarkbackups/ is unreadable [@nsBookmarksService::ArchiveBookmarksFile]
Updated•20 years ago
|
Attachment #201355 -
Flags: approval1.8rc2? → approval1.8rc2+
Comment 14•20 years ago
|
||
landed this for gavin to make sure this makes today's builds.
Checking in nsBookmarksService.cpp;
/cvsroot/mozilla/browser/components/bookmarks/src/nsBookmarksService.cpp,v <-- nsBookmarksService.cpp
new revision: 1.67.2.3; previous revision: 1.67.2.2
done
| Reporter | ||
Comment 15•20 years ago
|
||
Yup, no crash in today's mozilla1.8 build. Thanks very much, both of you. :)
Updated•15 years ago
|
Crash Signature: [@nsBookmarksService::ArchiveBookmarksFile]
You need to log in
before you can comment on or make changes to this bug.
Description
•