Quantumbar intermittently stops working (TypeError: result is undefined UrlbarInput.jsm:437:9)
Categories
(Firefox :: Address Bar, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr60 | --- | unaffected |
firefox67 | --- | unaffected |
firefox68 | --- | verified |
firefox69 | --- | verified |
People
(Reporter: bgstandaert, Assigned: dao)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
jcristau
:
approval-mozilla-beta+
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Firefox/68.0
Actual results:
Since upgrading to v68 beta with Quantumbar enabled, the address bar will intermittently stop working (maybe 1 out of 20 times?). What happens is as follows:
- I'll type something in the address bar, and press tab to move down to a result.
- Pressing enter will do nothing - the result will still be highlighted and will not load.
- Every time I press enter, the following error will appear in the browser console:
TypeError: result is undefined UrlbarInput.jsm:437:9 - If I close the address bar and re-open it, it will start working again.
I can't make this happen reliably, and there doesn't seem to be anything else that's obviously different between when it works and when it doesn't; if there's something you want me to test to narrow this down further, let me know and I'd be happy to try it.
Reporter | ||
Updated•6 years ago
|
Comment hidden (obsolete) |
Assignee | ||
Updated•6 years ago
|
Comment hidden (obsolete) |
Updated•6 years ago
|
Comment 3•6 years ago
|
||
index
must be this._queryContext.results.length because otherwise getResult would throw: https://searchfox.org/mozilla-central/rev/4606c7974a68cab416c038acaedcae49eed93822/browser/components/urlbar/UrlbarView.jsm#123
Which is a separate problem: that index check should be checking >= length, not > length...
(I also checked whether we delete
any items from the results array, which would be strange, and we don't.)
So the question is, why is resultIndex in pickResult too large?
Comment 4•6 years ago
|
||
Or index
in getResult might not be an integer, like undefined, but I don't see how that's possible. And there would be an error like 'ReferenceError: reference to undefined property "undefined"' if that were the case.
Comment 5•6 years ago
|
||
verification-steps |
I can reproduce it: Type something in the urlbar and wait for the query to stop (i.e., for all results appear). Then type another character and very quickly hit tab. You need to change the selection before the results are updated to reflect the new query. The newly selected result needs to be from the previous query. (Seems easiest to do by going from a query that returns history results to one that returns search suggestions.) Then hit enter.
It looks like we don't handle this case at all, where a stale result from the previous query is picked?
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 6•6 years ago
|
||
(In reply to Drew Willcoxon :adw from comment #5)
It looks like we don't handle this case at all, where a stale result from the previous query is picked?
We need to pass around UrlbarResults instead of indices to address this. I'm going to post a patch to fix this specific bug, then probably file a followup to further cleanup (potentially getting rid of the resultIndex attribute entirely).
Updated•6 years ago
|
Assignee | ||
Comment 7•6 years ago
|
||
Assignee | ||
Comment 8•6 years ago
|
||
Comment 10•5 years ago
|
||
bugherder |
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 11•5 years ago
|
||
Comment on attachment 9067790 [details]
Bug 1554038 - Make UrlbarInput::pickResult and UrlbarController::recordSelectedResult take a UrlbarResult instead of an index and remove UrlbarView::getResult.
Beta/Release Uplift Approval Request
- User impact if declined: see comment 0
- Is this code covered by automated tests?: No
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: see comment 5
- List of other uplifts needed: None
- Risk to taking this patch: Medium
- Why is the change risky/not risky? (and alternatives if risky): pretty straightforward refactoring
- String changes made/needed:
Assignee | ||
Comment 12•5 years ago
|
||
(In reply to Dão Gottwald [::dao] from comment #6)
(In reply to Drew Willcoxon :adw from comment #5)
It looks like we don't handle this case at all, where a stale result from the previous query is picked?
We need to pass around UrlbarResults instead of indices to address this. I'm going to post a patch to fix this specific bug, then probably file a followup to further cleanup (potentially getting rid of the resultIndex attribute entirely).
For those following along, I ended up removing resultIndex here.
Updated•5 years ago
|
Comment 13•5 years ago
|
||
Hello,
Reproduced the issue using steps from comment 5 with Firefox 69.0a1 (20190524214959) on Windows 10 x64, macOS 10.14 and Ubuntu 18.04.
The issue is verified using Firefox 69.0a1 (20190531035909) on Windows 10x64, Ubuntu 18.04 and macOS 10.14.
Comment 14•5 years ago
|
||
Comment on attachment 9067790 [details]
Bug 1554038 - Make UrlbarInput::pickResult and UrlbarController::recordSelectedResult take a UrlbarResult instead of an index and remove UrlbarView::getResult.
quantumbar fix for 68.0b7
Comment 15•5 years ago
|
||
bugherder uplift |
Comment 16•5 years ago
|
||
Hello,
The issue is verified using Firefox 68.0b7 (20190603181408) on Windows 10x64, macOS 10.14, Ubuntu 18.04.
Updated•5 years ago
|
Updated•3 years ago
|
Description
•