Closed Bug 775372 Opened 12 years ago Closed 12 years ago

Unable to click on links on some pages

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
major

Tracking

(firefox15 unaffected, firefox16 verified, firefox17 verified)

VERIFIED FIXED
Firefox 17
Tracking Status
firefox15 --- unaffected
firefox16 --- verified
firefox17 --- verified

People

(Reporter: krupa.mozbugs, Assigned: mbrubeck)

References

Details

(Keywords: regression, Whiteboard: [leave resolved])

Attachments

(2 files)

fennec build: 07/17/2012

steps to reproduce:
1. Load marketplace-dev.allizom.org
2. try to click on any of the listed apps/links

observed behavior:
Unable to click on anything. related to text-selection?

Going to about:firefox, I cannot click on "Check for updates" (so, not site-specific)
Summary: Unable to click on on links in the latest Fennec nightly → Unable to click on links in the latest Fennec nightly
I ran into this last night but was using a Fennec build from Margaret while playing with text-selection. It might be related?

When I got into this state, any tap onto hyperlinks wound up with Gecko flooding my console with:

E/GeckoConsole( 2063): [JavaScript Error: "TypeError: can't access dead object" {file: "chrome://browser/content/browser.js" line: 3381}]

I don't have reproducible steps though, and don't know if 16/15 is affected either.
Hardware: x86 → ARM
Whiteboard: [str-wanted]
I also see this bug using an Aurora build (see Bug 776371, I filed a dupe).
When this bug occurs, I usually get three entries in the log after tapping on a link:
07-23 14:58:01.125: E/GeckoConsole(22683): [JavaScript Error: "TypeError: can't access dead object" {file: "chrome://browser/content/browser.js" line: 3511}]
07-23 14:58:01.390: E/GeckoConsole(22683): [JavaScript Error: "can't access dead object" {file: "chrome://browser/content/browser.js" line: 3753}]
07-23 14:58:01.390: E/GeckoConsole(22683): [JavaScript Error: "TypeError: can't access dead object" {file: "chrome://browser/content/browser.js" line: 3511}]
(this is the 2012-02-21 Aurora build).
Product: Fennec → Firefox for Android
I was also seeing this on my local builds, I thought it was caused by an addon I wrote and was using but sounds like it's not. Restarting the browser fixes the problem.
Possibly text-selection related
tracking-fennec: --- → ?
I started seeing this sometimes while working on native text selection handles, but if it's in Aurora, then it can't be a problem introduced by native handles.

Right before this error, I would also see this:
E/GeckoConsole( 2063): [JavaScript Error: "NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [inIDOMUtils.setContentState]" {file: "chrome://browser/content/browser.js" line: 3382}]

So I think something is going wrong in BrowserEventHandler, but maybe the new text selection work did something to bring out this problem more frequently.
Blocks: 774938
I suspect the problem is the way we're hanging onto _highlightElement. If the document changes while there's an active tap highlight, we may end up hanging onto a dead object, leading to the errors we're seeing here. Perhaps we should be storing a weak reference to the element instead. Getting some STR would help us know if a fix works.
I think I found a way to reproduce this on a Galaxy S2 with an Aurora nightly (might also work with a mozilla-central nightly):
0. Make sure Aurora is not running in the background
1. Launch Aurora
2. Load the website "www.heise.de"
3. Scroll down until you see the heading called "News"
4. Now try to tap on any text link (for example to a news article, it's an IT news website) on that page. It doesn't seem to matter if the text link is above or below the "News" heading.

Results:
Nothing happen
The line throwing the exception is in _cancelTapHighlight:
https://hg.mozilla.org/mozilla-central/file/8b96a33ecbd2/mobile/android/chrome/content/browser.js#l3479

Maybe this is related to bug 769857.
Assignee: nobody → mbrubeck
Blocks: 769857
I can easily run into this on the URL: http://www.autosports.com, zooming in a tad and attempting to tap the small article links; (Nightly 07/27). mozilla-beta 15 still unaffected.

Adjusting summary since mozilla-aurora is affected.
Summary: Unable to click on links in the latest Fennec nightly → Unable to click on links on some pages
I've had this happen to me a few times randomly, and I can also reproduce it using the steps from comment 8.

(In reply to Aaron Train [:aaronmt] from comment #10)
> I can easily run into this on the URL: http://www.autosports.com, zooming in
> a tad and attempting to tap the small article links; (Nightly 07/27).
> mozilla-beta 15 still unaffected.

I think this is a separate issue; it doesn't log the same errors, and unlike the original issue, this one seems to go away as soon as I leave the autosport.com page.  Can you file a new bug for this one, please?
Status: NEW → ASSIGNED
(In reply to Matt Brubeck (:mbrubeck) from comment #11)
> I think this is a separate issue; it doesn't log the same errors, and unlike
> the original issue, this one seems to go away as soon as I leave the
> autosport.com page.  Can you file a new bug for this one, please?

When I tap the links on autosports, I get the same errors in comment #3, thenceforth I'm unable to tap links on any other pages.
Attached patch patchSplinter Review
This fixes at least part of this bug (the exceptions from the tap highlight functions, which I think were a regression from bug 769857).  I was able to reproduce those by pressing on a link from an old page while a new one was loading, so that the tap highlight was active as the page disappeared.

With this patch I still can't click on links on http://autosport.com/ -- but only that page is affected.  I can click again after navigating away from it.  I'll split that into a separate bug.
Attachment #646745 - Flags: review?(margaret.leibovic)
Blocks: 778333
Filed bug 778333 for the remaining issue with autosport.com.
Attachment #646745 - Flags: review?(margaret.leibovic) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/4b197ffb4dcc

I'd like to wait until this is verified in Nightly before requesting Aurora approval.
https://hg.mozilla.org/mozilla-central/rev/4b197ffb4dcc
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 17
Aaron, you marked my bug as a duplicate of this one but I am on a build now that includes the fix for this (775372) bug and I still have the issue. So either my bug is different or https://hg.mozilla.org/mozilla-central/rev/4b197ffb4dcc is not a fix for it.
Sorry, re-opened.
Comment on attachment 646745 [details] [diff] [review]
patch

[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 769857

User impact if declined: Sometimes clicking links stops working until the browser is restarted.

Testing completed (on m-c, etc.): On m-c since 7/28.

Risk to taking this patch (and alternatives if risky): Android-only.  This is quite low-risk since it just adds some null checks.  The main risk is that it did not completely fix this bug, since there seem to be a few different code paths that lead to errors, and I couldn't reproduce all of them reliably.  A possible alternative would be to back out bug 769857 on Aurora (though I'm also not certain that is the only change responsible for this regression).

String or UUID changes made by this patch: None.
Attachment #646745 - Flags: approval-mozilla-aurora?
Depends on: 778579
Comment on attachment 646745 [details] [diff] [review]
patch

Since there are other regressions not fixed by this bug, I think a backout is a better solution for Aurora.
Attachment #646745 - Flags: approval-mozilla-aurora?
No longer depends on: 778579
[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 769857

User impact if declined: Unable to click links on certain pages or circumstances.

Testing completed (on m-c, etc.): This is a backout of a patch that landed in Firefox 16; it just restores the code that we shipped in Firefox 14 and 15.

Risk to taking this patch (and alternatives if risky): Android-only, low-risk backout.  This will reopen bug 769857 which was a low-priority polish bug.

String or UUID changes made by this patch: None.
Attachment #647590 - Flags: approval-mozilla-aurora?
For Fx17 I backed out the patch from this bug, along with bug 769857 which caused the bug in the first place (so Fx17 is fixed by the backout, and this bug should remain resolved):
https://hg.mozilla.org/integration/mozilla-inbound/rev/4ef483246388

This bug still exists on Fx16 until the backout is approved for Aurora.
Whiteboard: [str-wanted] → [leave resolved]
Comment on attachment 647590 [details] [diff] [review]
back out bug 769857 on Aurora

Thanks mbrubeck, let's get this backed out so we're set across all branches for this issue.
Attachment #647590 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Blocks: 779339
Status: RESOLVED → VERIFIED
tracking-fennec: ? → ---
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: