Closed Bug 798858 Opened 13 years ago Closed 13 years ago

android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. at android.view.ViewRootImpl.checkThread(ViewRootImpl.java) at org.mozilla.gecko.AboutHomeSection.show

Categories

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

18 Branch
ARM
Android
defect

Tracking

(firefox17 unaffected, firefox18+ fixed)

RESOLVED FIXED
Firefox 18
Tracking Status
firefox17 --- unaffected
firefox18 + fixed

People

(Reporter: scoobidiver, Unassigned)

References

Details

(Keywords: crash, regression, topcrash, Whiteboard: [native-crash][startupcrash])

Crash Data

This startup crash is #1 top crasher in today's build. The regression range is: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=2da1f2bde40e&tochange=9f677c2bb33d It might be a regression from bug 797075. android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:4607) at android.view.ViewRootImpl.invalidateChildInParent(ViewRootImpl.java:867) at android.view.ViewGroup.invalidateChild(ViewGroup.java:4066) at android.view.View.invalidate(View.java:10250) at android.view.View.setFlags(View.java:8366) at android.view.View.setVisibility(View.java:5512) at org.mozilla.gecko.AboutHomeSection.show(AboutHomeSection.java:87) at org.mozilla.gecko.AboutHomeContent.onQueryTabsComplete(AboutHomeContent.java:625) at org.mozilla.gecko.TabsAccessor$2.onPostExecute(TabsAccessor.java:159) at org.mozilla.gecko.TabsAccessor$2.onPostExecute(TabsAccessor.java:118) at org.mozilla.gecko.util.GeckoAsyncTask$BackgroundTaskRunnable$1.run(GeckoAsyncTask.java:35) at android.os.Handler.handleCallback(Handler.java:615) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:137) at org.mozilla.gecko.util.GeckoBackgroundThread.run(GeckoBackgroundThread.java:31) More reports at: https://crash-stats.mozilla.com/report/list?signature=android.view.ViewRoot%24CalledFromWrongThreadException%3A+Only+the+original+thread+that+created+a+view+hierarchy+can+touch+its+views.+at+android.view.ViewRoot.checkThread%28ViewRoot.java%29 https://crash-stats.mozilla.com/report/list?signature=android.view.ViewRootImpl%24CalledFromWrongThreadException%3A+Only+the+original+thread+that+created+a+view+hierarchy+can+touch+its+views.+at+android.view.ViewRootImpl.checkThread%28ViewRootImpl.java%29
(In reply to Scoobidiver from comment #0) > It might be a regression from bug 797075. > Bug 797075 was backed out. This looks like a regression from bug 798135.
Blocks: 798135
Crash Signature: [@ android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. at android.view.ViewRootImpl.checkThread(ViewRootImpl.java)] [@ → [@ android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. at android.view.ViewRootImpl.checkThread(ViewRootImpl.java) ] [@
I've just backed bug 798135 out, so hopefully the Nightly generated in a bit (presuming the m-c backout is green enough in time for it to be auto-picked) will show this as no longer occurring.
My nightly from https://hg.mozilla.org/mozilla-central/rev/9738e5a0190a still crashes, which, II read right, is two revisions younger than the backout. That's on an ASUS transformer.
(In reply to Axel Hecht [:Pike] from comment #3) > My nightly from https://hg.mozilla.org/mozilla-central/rev/9738e5a0190a > still crashes, which, II read right, is two revisions younger than the > backout. Are you sure it's this crash signature? I don't see it in today's nightly: https://crash-stats.mozilla.com/query/query?product=FennecAndroid&version=FennecAndroid%3A18.0a1&build_id=20121008031745&do_query=1
I too am still seeing crashes, though they're not being caught by about:crashes
Axel or Paul, could we get a logcat of your crashes please?
Apologies nhirata but I uninstalled/reinstalled and am now stuck seeing bug 799141 causing the crashes.
Sriram, these crashes look like a regression from bug 798135. The stack traces all point to TabsAccessor.onPostExecute() running on GeckoBackgroundThread instead of the UI thread: android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. at android.view.ViewRoot.checkThread(ViewRoot.java:3429) ... at android.view.View.setVisibility(View.java:3802) at org.mozilla.gecko.AboutHomeSection.show(AboutHomeSection.java:87) at org.mozilla.gecko.AboutHomeContent.onQueryTabsComplete(AboutHomeContent.java:625) at org.mozilla.gecko.TabsAccessor$2.onPostExecute(TabsAccessor.java:159) at org.mozilla.gecko.TabsAccessor$2.onPostExecute(TabsAccessor.java:118) at org.mozilla.gecko.util.GeckoAsyncTask$BackgroundTaskRunnable$1.run(GeckoAsyncTask.java:35) at android.os.Handler.handleCallback(Handler.java:587) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:132) at org.mozilla.gecko.util.GeckoBackgroundThread.run(GeckoBackgroundThread.java:31) Since your GeckoAsyncTask change "captures" the current thread's Handler, I suspect some chain of calls where AboutHomeSection is invoked from TabsAccessor is invoked from BrowserApp on the GeckoBackgroundThread. You may want to add `GeckoApp.assertOnUiThread()` calls before some of the `new GeckoAsyncTask()` calls to ensure the GeckoAsyncTask constructors are being called on the UI thread (when you believe they are).
Priority: -- → P1
(In reply to Axel Hecht [:Pike] from comment #3) > My nightly from https://hg.mozilla.org/mozilla-central/rev/9738e5a0190a > still crashes, which, II read right, is two revisions younger than the > backout. That's on an ASUS transformer. Alex, do you have STR for your ASUS Transformer crash?
I'm just surfing a few sites, and then let it sit, it seems to crash on being idle for a few seconds.
sriram, did backing out bug 798135 fix this crash?
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
Resolution: WORKSFORME → FIXED
Target Milestone: --- → Firefox 18
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.