Closed Bug 1117575 Opened 9 years ago Closed 9 years ago

Crash @ nsAutoCompleteController::CompleteDefaultIndex

Categories

(Toolkit :: Autocomplete, defect)

defect
Not set
critical

Tracking

()

RESOLVED DUPLICATE of bug 433788

People

(Reporter: wsmwk, Unassigned, Mentored)

Details

(Keywords: crash, Whiteboard: [good first bug][lang=cpp])

Crash Data

+++ This bug was initially created as a clone of Bug #674353 +++

no steps

bp-3d0ace97-31a8-4f34-b139-764fd2141124
 0 	xul.dll	nsAutoCompleteController::CompleteDefaultIndex(int)	toolkit/components/autocomplete/nsAutoCompleteController.cpp
1 	xul.dll	nsAutoCompleteController::ProcessResult(int, nsIAutoCompleteResult*)	toolkit/components/autocomplete/nsAutoCompleteController.cpp
2 	xul.dll	nsAutoCompleteController::OnSearchResult(nsIAutoCompleteSearch*, nsIAutoCompleteResult*)	toolkit/components/autocomplete/nsAutoCompleteController.cpp
3 	xul.dll	nsFormFillController::PerformInputListAutoComplete(nsIAutoCompleteResult*)	toolkit/components/satchel/nsFormFillController.cpp
4 	xul.dll	nsFormFillController::OnSearchCompletion(nsIAutoCompleteResult*)	toolkit/components/satchel/nsFormFillController.cpp
5 	xul.dll	NS_InvokeByIndex	xpcom/reflect/xptcall/md/win32/xptcinvoke.cpp
Summary: Crash when pressing enter in location bar with Enter Selects addon enabled → Crash @ nsAutoCompleteController::CompleteDefaultIndex
looks like another input-gets-detached race condition

Rather than null checking mInput as in Bug 674353, we should

NS_ENSURE_STATE(mInput);
nsCOMPtr<nsIAutoCompleteInput> input = mInput;
and then use this pointer.
Mentor: mak77
Hardware: x86 → All
Whiteboard: [good first bug][lang=cpp]
(In reply to Marco Bonardo [::mak] (needinfo? me) from comment #1)
> looks like another input-gets-detached race condition
> 
> Rather than null checking mInput as in Bug 674353, we should
> 
> NS_ENSURE_STATE(mInput);
> nsCOMPtr<nsIAutoCompleteInput> input = mInput;
> and then use this pointer.

Hi! I would like to work on this bug. 

Am I supposed to edit the line (Ref: [1]) and all other occurrences in the file?

[1] https://dxr.mozilla.org/mozilla-central/source/toolkit/components/autocomplete/nsAutoCompleteController.cpp#203
Hi,
I'm sorry but after looking again at the current source code, looks like this crash has already been fixed in bug 433788.
Indeed I don't see any reports of it after Firefox 33.1.1.

So, looks like there's nothing else left to do here...
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.