Closed Bug 404135 Opened 17 years ago Closed 16 years ago

'Restore Default Set' in 'customize toolbar' window breaks the location bar (autocomplete, submitting) and the search bar (autocomplete)

Categories

(Toolkit :: Autocomplete, defect, P2)

defect

Tracking

()

VERIFIED FIXED
mozilla1.9

People

(Reporter: ht990332, Assigned: Mardak)

References

Details

(Keywords: regression, Whiteboard: [has fix in bug 418243])

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9b2pre) Gecko/2007111706 Firefox/3.0b2pre
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9b2pre) Gecko/2007111706 Firefox/3.0b2pre

Removing search bar and then resetting customized toolbar breaks autocomplete in location and search bars.



There's a error in error console:

Error: uncaught exception: [Exception... "Component does not have requested
interface arg 0 [nsIAutoCompleteController.input]"  nsresult: "0x80004002
(NS_NOINTERFACE)"  location: "JS frame ::
chrome://global/content/bindings/autocomplete.xml :: attachController :: line
267"  data: no]


Reproducible: Always

Steps to Reproduce:
1. Open 'customize toolbar' window
2. Remove search bar then close the customize toolbar window.
3. Reopen 'customize toolber' window and click 'Restore Default Set' 
4. Close 'customize toolbar' window
Actual Results:  
The dropdown history in location bar and search bar is now broken.

There's a error in error console:
Error: uncaught exception: [Exception... "Component does not have requested
interface arg 0 [nsIAutoCompleteController.input]"  nsresult: "0x80004002
(NS_NOINTERFACE)"  location: "JS frame ::
chrome://global/content/bindings/autocomplete.xml :: attachController :: line
267"  data: no]
Keywords: regression
Version: unspecified → Trunk
It seems there's no need to customize anything first. Simply clicking 'Restore Default Set' breaks the autocomplete history in location bar and search bar
Summary: removing search bar and then resetting customized toolbar breaks autocomplete in location and search bars. → clicking 'Restore Clicking 'Restore Default Set' in 'customize toolbar' window breaks the autocomplete history dropdown menu in location bar and search bar.
Summary: clicking 'Restore Clicking 'Restore Default Set' in 'customize toolbar' window breaks the autocomplete history dropdown menu in location bar and search bar. → Clicking 'Restore Default Set' in 'customize toolbar' window breaks the autocomplete history dropdown menu in location bar and search bar.
Flags: blocking-firefox3?
It seems if I remove something then directly click 'Restore Default Set', it gets broken. I'm not sure what's causing it. Could it be a regression from the patch that forced the toolbar resizer?
Summary: Clicking 'Restore Default Set' in 'customize toolbar' window breaks the autocomplete history dropdown menu in location bar and search bar. → Removing something then directly clicking 'Restore Default Set' in 'customize toolbar' window breaks the autocomplete history dropdown menu in location bar and search bar.
Might be worth retesting now that bug 403854 is fixed.
Bug 400872 was fixed recently too, could also be related.
I'm rebuilding now from updated cvs which icludes fixes for mentioned bugs. I'll post the results once the build is done.
Sorry, bug is still there. But there is a change after the two above fixes. Now the procedure in Comment #2 has to be repeated twice for the bug to appear.

1. I opened firefox. 
2. I opened the customize toolbar window. 
3. I dragged the search bar to the 'customize toolbar' window and then directly click 'Restore Default Set'. 
3. I closed the 'customize toolbar' window. 
4. Then I repeated the steps and the breakage happened.

Before Bug 400872 was fixed, I only had to do the steps once. Now I have to do them twice for the breakage to happen.
Clearing nom; please confirm before renominating.
Flags: blocking-firefox3?
Keywords: qawanted
Can someone please try this?
1. Completely close Firefox.
2. Reopen Firefox.
3. Open 'Customize Toolbar' window and click a few times on 'Restore Default Set'.
3. Close 'Customize Toolbar' window.
4. Manually input www.google.com in the location bar.
5. Press enter. (Do NOT click the 'Go button').
6. Nothing happens.

Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
Hardware: PC → All
Summary: Removing something then directly clicking 'Restore Default Set' in 'customize toolbar' window breaks the autocomplete history dropdown menu in location bar and search bar. → 'Restore Default Set' in 'customize toolbar' window breaks the location bar (autocomplete, submitting) and the search bar (autocomplete)
I see Dao's updated the Title & OS's affected by this bug (I'm on XP and it affects me too). I was going to file this as a separate bug based on the Enter key thing, but then I saw Comment#8 here. I'd noticed that after the toolbar has been changed in ANY way (whether it's pulling the Resizer or adding an item in 'Customize'), doing a 'Restore Default Set'(even once) afterwards breaks things: 

That is..
- the dropdowns arrows in the Location Bar & Search Bar don't work
- autocomplete doesn't work
- Google Suggest in the Search Box doesn't work (*note as of 20071130 build it's completely broken on its own)
- the Enter button in both the Location Bar and Search Bar no longer works.
- errors appear in the Error Console window

After performing a "RDS", the first time the Location Bar is focused, this error currently appears in my Error Console:
----
Error: uncaught exception: [Exception... "Component does not have requested interface arg 0 [nsIAutoCompleteController.input]"  nsresult: "0x80004002 (NS_NOINTERFACE)"  location: "JS frame :: chrome://global/content/bindings/autocomplete.xml :: attachController :: line 267"  data: no]
----

The same error repeats for each mouse click or re-focus via kb shortcut.

As soon as I start typing in the Location Bar or Search Bar, the following error repeats with each keystroke (same error as above, different line#):
----
Error: uncaught exception: [Exception... "Component does not have requested interface arg 0 [nsIAutoCompleteController.input]"  nsresult: "0x80004002 (NS_NOINTERFACE)"  location: "JS frame :: chrome://global/content/bindings/autocomplete.xml :: onxblinput :: line 452"  data: no]
----
*note: as of 20071130 build, that's now line 453.


I spent a lot of time yesterday looking for the regression window on this Bug. (All versions Win32 zip builds from ftp). This is probably much more info than is needed but as I took the time to write it all down, here's the relevant parts in summary:

** 20050801->20050805 Firefox 1.0+ Gecko rv:1.8b4 -- ok.

** 20050806 Firefox 1.0+ Gecko rv:1.8b4 -- after 'Restore Default Set', crashes & closes browser when any URL is submitted via any method.
** 20050807 Firefox 1.0+ Gecko rv:1.8b4 -- works perfectly

** 20051230 Firefox 1.6a1 Gecko rv:1.9a1 -- works perfectly;
... no new Win32 builds found on ftp for next few days... then on 1st available:
** 20060103 Firefox 1.6a1 Gecko rv.1.9a1 --after 'RDS', Autocomplete breaks; Location Bar dropdown breaks; Location Bar Enter works; Search Bar Enter breaks(reloads current page); throws the following 2 errors:

-- Error: uncaught exception: [Exception... "Component does not have requested interface arg 0 [nsIAutoCompleteController.input]"  nsresult: "0x80004002 (NS_NOINTERFACE)"  location: "JS frame :: chrome://global/content/bindings/autocomplete.xml :: attachController :: line 266"  data: no]

-- Error: uncaught exception: [Exception... "Component does not have requested interface arg 0 [nsIAutoCompleteController.input]"  nsresult: "0x80004002 (NS_NOINTERFACE)"  location: "JS frame :: chrome://global/content/bindings/autocomplete.xml :: onxblinput :: line 441"  data: no]

.... the same error description continues to occur but changes Line #s a few times over the next few months as the code around it changes.
For example, on 2006-05-01, it's the same errors, but on lines 272 & 468, and:
** 20060501 -- Autocomplete breaks; Location Bar dropdown breaks; Search Box suggest breaks; Location Bar Enter works; Search Bar Enter breaks(reloads current page)
** 20070901 -- same as above, now Lines 267 & 452.
.... on 2007-10-08, the above 2 'usual' errors do not appear, but instead, 3 different errors appear for the first time:

-- Error: uncaught exception: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIAnnotationService.addObserver]"  nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"  location: "JS frame :: chrome://browser/content/places/toolbar.xml :: _init :: line 78"  data: no]

-- Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLInputElement.setSelectionRange]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://global/content/bindings/textbox.xml :: onxblmousedown :: line 184"  data: no]

Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLInputElement.selectionStart]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://global/content/bindings/textbox.xml :: onxblclick :: line 192"  data: no]

.... 20071019 - same 3 errors as above, but also the 267/452 errors:
** Location Bar autocomplete/dropdown work, Search Suggest works; pressing Enter in LB activates the Busy-Indicator but does not submit the URL/text; Enter in Search Bar loads the correct Search Engine but does not submit a value.
.... The next day 20071020, it was back to just the 267/452 errors.

However on 20071102, the browser would crash & close immediately.

And then from 20071103 -> 20071129 - it's thrown the same old 267/452 error and previous symptoms-behaviour. On build 20071130 it changed to 267/453.

So there's a few interesting dates in there.. what happened at each of those times to make such a difference? Anyhow, hope this helps!
Component: Location Bar and Autocomplete → XBL
Product: Firefox → Core
QA Contact: location.bar → xbl
Severity: normal → major
Flags: blocking1.9?
Why was the component changed to XBL? Is this a regression from some change in XBL implementation?
Based on comment 9 there could be various causes. XBL was just a guess (what's "onxblinput" anyway?). For the first regression it could be bug 306067, but in any case I don't know what's going on here.
(In reply to comment #11)
> (what's "onxblinput" anyway?). 
XBL event handlers are compiled using onxbl prefix:
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/content/xbl/src/nsXBLPrototypeHandler.cpp&rev=1.126&mark=408-414#407
moving to Toolkit/Autocomplete and blaming bug 306067 for now
Blocks: 306067
Component: XBL → Autocomplete
Product: Core → Toolkit
QA Contact: xbl → autocomplete
Thanks to Gavin's suggestion in discussion over on Bug 405235 "search bar autocomplete popup (history, suggestions) doesn't work", I made an interesting discovery that seems to indicate a dependency/relevancy here. See https://bugzilla.mozilla.org/show_bug.cgi?id=405235#c39
Blocking for now, are the symptoms the same after bug 405235?
Flags: blocking1.9? → blocking1.9+
Priority: -- → P2
Target Milestone: --- → mozilla1.9 M11
(In reply to comment #15)
> Blocking for now, are the symptoms the same after bug 405235?
> 

Unfortunately yes, the bug is still there with same symptoms.
 Just close and reopen firefox. open the customize toolbar. Then click 'restore default set' 3 times and then the breakage happens.
For me, simply clicking 'RDS' 3 times does not break it, but on recent builds (tested using a brand new profile), this is all that is needed to reproduce the breakage:
1. Right-click on a toolbar and choose 'Customize'.
2. Click 'Restore Default Set', then 'Done'
3. Repeat Steps #1-2.
4. Click in the Location Bar.

And as I'd posted in Bug 405235, it remains broken (and producing errors in the Error Console) until an autocomplete dropbox on any webpage is drawn. So once broken, making use of the new profile's 'firstrun' webpage that is already open,
1. type something into the "search mozilla" text box and Submit
2. verify Location Bar and Search Box Google Suggest are broken
3. double-click the search term that's now present on the Results page's search box. The autocomplete dropdown appears
4. test out the Location Bar and Search Bar - they are now 'healed'.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b3pre) Gecko/2007121700 Minefield/3.0b3pre

I can't reproduce this bug. I both tried clicking the arrow and typing "www" in the location bar but it works normally.
^ Unfortunately, no change here on 121705 win32 zip build (WinXP-Pro) - still triggers every time once the RDS->Done routine has been performed *twice*. Still throws the Line 267 error on focus and Line 453 error on kb input.
I see indeed two errors appear repeatedly after choosing "Restore Default Set" but I can't make the location bar autocomplete fail.

Error: a._setNewlineHandling is not a function
Source File: chrome://global/content/bindings/textbox.xml
Line: 143

Error: a.initialize is not a function
Source File: chrome://browser/content/search/search.xml
Line: 525
Any progress in finding the cause of the problem?
I reproduced this bug few times with different actions and the last try caused a crash:
http://crash-stats.mozilla.com/report/index/785ce65c-dd81-11dc-94ba-001a4bd46e84

version:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b4pre) Gecko/2008021704 Minefield/3.0b4pre




And another one:
http://crash-stats.mozilla.com/report/index/74abec28-dd85-11dc-a8d8-001a4bd43ed6

The first crash happened when i used the default set option and after i wanted to close the browser,
the second immediately after i clicked restore default set.
For what it's worth, I can't reproduce this with RDS, but I can reproduce the same nsIAutoCompleteController.input error quite reliably by removing from the DOM any autocomplete textbox with an open results popup. (I think I can trigger it without a results popup being open, but much less reliably.) Seems like that could be closer to the root problem. Created bug 418243 with a test case (and JS workaround).
The Litmus test is useless - it doesn't trigger the Bug conditions.
However the Bug is still reproducible and I've found a really simple test-case:

Steps to Reproduce
1. Click in the Search Bar to give it focus.
2. Right-click on toolbar to open the 'Customize' window
3. Click 'Restore Default Set', then 'Done'
4. Click back into the Search Bar and start typing a word.

Results:
- Search Bar: Google Suggest/Search History does not work
- 'Awesome Bar'(Location Bar): autocomplete suggestions do not appear and submitting url or keyword via Enter key do not work.

Errors thrown are:
--
Error: uncaught exception: [Exception... "Component does not have requested interface arg 0 [nsIAutoCompleteController.input]"  nsresult: "0x80004002 (NS_NOINTERFACE)"  location: "JS frame :: chrome://global/content/bindings/autocomplete.xml :: attachController :: line 271"  data: no]
--
Error: uncaught exception: [Exception... "Component does not have requested interface arg 0 [nsIAutoCompleteController.input]"  nsresult: "0x80004002 (NS_NOINTERFACE)"  location: "JS frame :: chrome://global/content/bindings/autocomplete.xml :: onxblinput :: line 477"  data: no]
--

To restore proper functionality, double-click on any in-page form element that uses autocomplete (ex: a search box)
Flags: tracking1.9+ → wanted-next+
(In reply to comment #28)
> 
> Steps to Reproduce
> 1. Click in the Search Bar to give it focus.
> 2. Right-click on toolbar to open the 'Customize' window
> 3. Click 'Restore Default Set', then 'Done'
> 4. Click back into the Search Bar and start typing a word.
> 

the same if the location bar is focused
Assignee: nobody → edilee
Keywords: qawanted
Whiteboard: [has fix in bug 418243]
Should be fixed by bug 418243.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: mozilla1.9beta3 → mozilla1.9
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.