Closed
Bug 236659
Opened 20 years ago
Closed 20 years ago
Crash in nsAutoCompleteController when using URL bar autocomplete too soon after startup
Categories
(Firefox :: Address Bar, defect)
Tracking
()
VERIFIED
FIXED
People
(Reporter: lorenzo, Assigned: lorenzo)
Details
(Keywords: crash)
Attachments
(4 files, 2 obsolete files)
If you try to use URL bar autocomplete too soon after firefox starts, it crashes. Reproducible: always (if you're fast enough). 1. Start Firefox 2. As soon as the browser appears, very quickly type a letter (e.g. y), then press down arrow, then press enter. Note: you have to be very quick to see this. Actual results: 1. The status bar shows "Resolving host y" 2. Firefox crashes Expected results: No crash I'm setting severity to normal since it's hard to trigger and there's no data loss (the browser has just started up).
Assignee | ||
Comment 1•20 years ago
|
||
Stack trace from debug build
Updated•20 years ago
|
Severity: normal → critical
Assignee | ||
Comment 2•20 years ago
|
||
The crash is due to dereferencing a NULL mInput in ClosePopup(), but I *think* the root cause is that StartSearchTimer() is called a second time before Notify() is called for the the first search. The following text files contain a log of all nsAutoCompleteController::<xxx> functions that are called when it crashes (if the keys are pressed too soon after startup) and when it doesn't (if the same keys are pressed a bit later).
Severity: critical → normal
Assignee | ||
Comment 3•20 years ago
|
||
bugzilla@spray.se: sorry for that midair collision. :) I don't think this is critical since (a) it's so hard to trigger and (b) there's no real dataloss since the browser has just started up. This is more of a polish issue.
Assignee | ||
Comment 4•20 years ago
|
||
Since it's a timing issue, here is a list of all nsAutoCompleteController member functions called when the crash occurs. This was obtained on a debug build via printfs in the code and "firefox -console"
Assignee | ||
Comment 5•20 years ago
|
||
Same as above, but with the keys pressed a litte slower and no crash.
Assignee | ||
Comment 6•20 years ago
|
||
This fixes the problem for me. It seems to work fine, but I don't know if it's the correct approach.
Assignee | ||
Comment 7•20 years ago
|
||
Comment on attachment 143111 [details] [diff] [review] Wallpaper patch Requesting review so that someone else can look at it.
Attachment #143111 -
Flags: review?(bryner)
Comment 8•20 years ago
|
||
I haven't debugged this, but... it seems like the root of the problem is that we should not allow a second timer to be created if we're still waiting on our current timer to fire. We attempt to cancel the timer but we end up cancelling only the second one since we no longer have a reference to the first one. In other words, how about just making StartSearchTimer return immediately if mTimer is not null?
Assignee | ||
Comment 9•20 years ago
|
||
bryner, this patch does what you suggested. It fixes the crash for me.
Attachment #143111 -
Attachment is obsolete: true
Assignee | ||
Comment 10•20 years ago
|
||
Same as above, except without typos. :)
Attachment #143201 -
Attachment is obsolete: true
Assignee | ||
Updated•20 years ago
|
Attachment #143202 -
Flags: review?(bryner)
Updated•20 years ago
|
Attachment #143111 -
Flags: review?(bryner) → review-
Comment 11•20 years ago
|
||
Comment on attachment 143202 [details] [diff] [review] Same patch without typos Looks good, my only comment is to make the |if| style match what is used elsewhere in the file: if (!mTimer) { I'll go ahead and fix that and check it in. Thanks for the patch.
Attachment #143202 -
Flags: review?(bryner) → review+
Comment 12•20 years ago
|
||
Ended up making another change to put the GetTimeout stuff inside the |if|, and tweaked the comment a bit. Checked in.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 13•20 years ago
|
||
bryner, thanks for the quick turnaround!
Assignee | ||
Updated•20 years ago
|
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Updated•20 years ago
|
Assignee: bugs → lorenzo
Status: REOPENED → NEW
Assignee | ||
Updated•20 years ago
|
Status: NEW → RESOLVED
Closed: 20 years ago → 20 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 14•20 years ago
|
||
Reassigning for credit. Please excuse the spam.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•