Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIAutoCompleteController.handleDelete]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://global/content/bindings/autocomp

RESOLVED FIXED in mozilla20

Status

()

Toolkit
Autocomplete
--
minor
RESOLVED FIXED
7 years ago
4 years ago

People

(Reporter: Lyricconch, Assigned: TheOne)

Tracking

Trunk
mozilla20
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

7 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.2) Gecko/20100115 Firefox/3.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.2) Gecko/20100115 Firefox/3.6

set autocomplete on (enable aweson bar )

Reproducible: Always

Steps to Reproduce:
1. focus to location bar , enter some text to make aweson bar appear.
2. press LEFT key until cursor at first charactor.
3. press DELETE key several times
4. Error Console reports many uncaught expections.
Actual Results:  
uncaught expections reported . but dont know more bad effect exist or not .

Expected Results:  
None

test in nightly 3.7a3 , WinXPsp3 .
All Default Setting , Default Plugin , Default Theme, Default Profile.
confirmed:
Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIAutoCompleteController.handleDelete]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://global/content/bindings/autocomplete.xml :: onKeyPress :: line 427"  data: no]

besides Weave no other extensions in usage.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: pressing DELETE key at first character in urlbar causes unchecked exception. → chrome://global/content/bindings/autocomp Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIAutoCompleteController.handleDelete]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame ::
Version: unspecified → 3.6 Branch

Updated

7 years ago
Component: Location Bar → Autocomplete
Product: Firefox → Toolkit
QA Contact: location.bar → autocomplete
Version: 3.6 Branch → Trunk

Comment 2

5 years ago
I just had like 100 nsIAutoCompleteController.handleDelete in my console, but when i looked again i had 100+ instances of bug 523677 again.

Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIAutoCompleteController.handleDelete]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://global/content/bindings/autocomplete.xml :: onKeyPress :: line 450"  data: no]

Application: Firefox 10.0 (20120129021758)
Operating System: WINNT (x86-msvc)

- BarTab Lite 1.2
- Extension List Dumper 1.15.2
- Firebug 1.9.1
- Firefogg 2.9.19 (Disabled)
- FireFTP 2.0.1
- Flashblock 1.5.15.1
- FromWhereToWhere 0.25.0 (Disabled)
- Mozilla Archive Format 2.0.4
- New Tab JumpStart 0.5a5.4.3
- NoScript 2.2.9
- Places Maintenance 1.3
- Session History Tree 1.0 (Disabled)
- Session Manager 0.7.8.1
- Showcase 0.9.5.8 (Disabled)
- Tab History Menu 2.1.1 (Disabled)

64-bit Windows 7 Enterprise on a 2.93 GHz Xeon and Nvidia Quandro FX 1800, so platform should be ALL? 1.0 of 6.0 GB RAM are free.
(Assignee)

Comment 3

5 years ago
mak: any idea why this is happening? I could try to come up with a patch if I knew where to start.
(Assignee)

Updated

5 years ago
Flags: needinfo?(mak77)
So, I put conditional breakpoints in the NS_ENSURE_TRUE conditions inside nsAutoCompleteController.cpp::HandleDelete(), so that it would breakpoint if they were false, and the debugger stopped here

536   int32_t index, searchIndex, rowIndex;
537   popup->GetSelectedIndex(&index);
538   RowIndexToSearch(index, &searchIndex, &rowIndex);
539   NS_ENSURE_TRUE(searchIndex >= 0 && rowIndex >= 0, NS_ERROR_FAILURE);

searchIndex and rowIndex are -1... the fact is that index is -1, so there is no selection, thus we should probably bail out as soon as index < 0.

What you should check is which patches may have recently touched this code to figure out if this was done on purpose, or just a miss, or an actual regression (like there was a check and was removed).

And then do some testing, maybe write a test taking a look at examples in toolkit/components/autocomplete.
Flags: needinfo?(mak77)
(Assignee)

Comment 5

4 years ago
Created attachment 690795 [details] [diff] [review]
If the popup is opened, check whether a row is selected
Attachment #690795 - Flags: review?(mak77)
(Assignee)

Comment 6

4 years ago
Created attachment 690796 [details] [diff] [review]
If the popup is opened, check whether a row is selected
Attachment #690795 - Attachment is obsolete: true
Attachment #690795 - Flags: review?(mak77)
Attachment #690796 - Flags: review?(mak77)
(Assignee)

Comment 7

4 years ago
https://tbpl.mozilla.org/?tree=Try&rev=8fee32557a0f
Comment on attachment 690796 [details] [diff] [review]
If the popup is opened, check whether a row is selected

Review of attachment 690796 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks. I was wondering about a test but this happens in a very specific situation and the only drawback is an exception, so I think it's not worth it.
Attachment #690796 - Flags: review?(mak77) → review+
Andreas: Does this patch need to be checked in?
(Assignee)

Comment 10

4 years ago
(In reply to Frank Wein [:mcsmurf] from comment #9)
> Andreas: Does this patch need to be checked in?

Ah, yes, of course.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
I suppose we should push it before it can be called fixed :)
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Assignee)

Comment 12

4 years ago
Ah, push it - push it real good! :)
https://hg.mozilla.org/integration/mozilla-inbound/rev/a3e933f00833
Assignee: nobody → mail
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/a3e933f00833
Status: REOPENED → RESOLVED
Last Resolved: 4 years ago4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
You need to log in before you can comment on or make changes to this bug.