Closed Bug 715836 Opened 10 years ago Closed 10 years ago

android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.

Categories

(Firefox for Android Graveyard :: General, defect, P2)

12 Branch
Other
Linux
defect

Tracking

(firefox11 fixed, firefox12 fixed, fennec11+)

RESOLVED FIXED
Firefox 12
Tracking Status
firefox11 --- fixed
firefox12 --- fixed
fennec 11+ ---

People

(Reporter: nhirata, Assigned: kats)

References

()

Details

(Keywords: regression)

Attachments

(3 files)

Attached file logcat
1. go to http://www.wechoosethemoon.org
2. look at logcat

Expected: no errors
Actual: 
01-06 08:39:10.625: W/System.err(381): android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
01-06 08:39:10.636: W/System.err(381): 	at android.view.ViewRoot.checkThread(ViewRoot.java:2932)

Note:
1. It's not crashing, just an error
2. nexus s, 2.3.1; flash 11, 20120105
3. bug 703256 fixed the crash
Regression introduced in 58a278555680 (bug 710096). It shouldn't be hard to fix. I'm going to take some time to re-review the threading model of all the pan/zoom code though, there are definitely more bugs lurking there.
Assignee: nobody → bugmail.mozilla
Keywords: regression
Priority: -- → P2
tracking-fennec: --- → 11+
Just in case somebody calls these in the future from the wrong thread.
Attachment #588177 - Flags: review?(pwalton)
Comment on attachment 588177 [details] [diff] [review]
(1/2) Remove unused functions that call repositionPluginViews

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

Nice cleanup catch.
Attachment #588177 - Flags: review?(pwalton) → review+
Comment on attachment 588178 [details] [diff] [review]
(2/2) Make sure repositionPluginViews is called on the UI thread

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

r=me
Attachment #588178 - Flags: review?(pwalton) → review+
You can set the status-firefoxN and Target Milestone fields when landing on inbound; it saves some work for the inbound mergers.
Target Milestone: --- → Firefox 12
Comment on attachment 588177 [details] [diff] [review]
(1/2) Remove unused functions that call repositionPluginViews

[Approval Request Comment (for both patches)]
Regression caused by (bug #): bug 710096
User impact if declined: possible races and errors as UI things are accessed from a non-UI thread
Testing completed (on m-c, etc.): on m-c
Risk to taking this patch (and alternatives if risky): pretty low-risk; one patches removes dead code (errors will be caught by compiler) and the other patch moves a chunk of code to another thread
Attachment #588177 - Flags: approval-mozilla-aurora?
Attachment #588178 - Flags: approval-mozilla-aurora?
Comment on attachment 588177 [details] [diff] [review]
(1/2) Remove unused functions that call repositionPluginViews

[Triage Comment]
Mobile only - approved for Aurora.
Attachment #588177 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Attachment #588178 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.