Closed
Bug 769894
Opened 12 years ago
Closed 12 years ago
java.lang.IllegalStateException: Hardware acceleration can only be used with a single UI thread. Original thread: Thread[main,5,main] mainly on ICS and above
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(firefox14 affected, firefox15+ affected, firefox16+ fixed, firefox17 fixed, firefox18 fixed, fennec+)
People
(Reporter: scoobidiver, Assigned: cpeterson)
References
Details
(Keywords: crash, topcrash, Whiteboard: [native-crash][startupcrash])
Crash Data
Attachments
(3 files)
2.14 KB,
patch
|
mfinkle
:
review+
akeybl
:
approval-mozilla-aurora+
akeybl
:
approval-mozilla-beta+
lsblakk
:
approval-mozilla-release+
|
Details | Diff | Splinter Review |
2.48 KB,
patch
|
mfinkle
:
review+
akeybl
:
approval-mozilla-aurora+
akeybl
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
1.53 KB,
patch
|
mfinkle
:
review+
akeybl
:
approval-mozilla-aurora+
akeybl
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
It's #102 top crasher in 14.0 and occurs on Galaxy Nexus at startup. Here is a crash report: bp-477a2184-fa24-4504-8862-e650a2120627. java.lang.IllegalStateException: Hardware acceleration can only be used with a single UI thread. Original thread: Thread[main,5,main] Current thread: Thread[GeckoBackgroundThread,5,main] at android.view.HardwareRenderer$GlRenderer.checkCurrent(HardwareRenderer.java:1246) at android.view.HardwareRenderer$Gl20Renderer.safelyRun(HardwareRenderer.java:1444) at android.view.HardwareRenderer$Gl20Renderer.destroyHardwareResources(HardwareRenderer.java:1468) at android.view.ViewRootImpl.destroyHardwareRenderer(ViewRootImpl.java:4005) at android.view.ViewRootImpl.die(ViewRootImpl.java:3939) at android.view.WindowManagerImpl.removeViewLocked(WindowManagerImpl.java:402) at android.view.WindowManagerImpl.removeView(WindowManagerImpl.java:350) at android.view.WindowManagerImpl$CompatModeWrapper.removeView(WindowManagerImpl.java:160) at android.app.Dialog.dismissDialog(Dialog.java:319) at android.app.Dialog$1.run(Dialog.java:119) 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.GeckoBackgroundThread.run(GeckoBackgroundThread.java:31) More reports at: https://crash-stats.mozilla.com/report/list?signature=java.lang.IllegalStateException%3A+Hardware+acceleration+can+only+be+used+with+a+single+UI+thread.+Original+thread%3A+Thread[main%2C5%2Cmain]
Reporter | ||
Comment 1•12 years ago
|
||
It has appeared after Google I/O 2012.
Summary: java.lang.IllegalStateException: Hardware acceleration can only be used with a single UI thread. Original thread: Thread[main,5,main] on Galaxy Nexus → java.lang.IllegalStateException: Hardware acceleration can only be used with a single UI thread. Original thread: Thread[main,5,main] on Galaxy Nexus with Jelly Bean
Updated•12 years ago
|
Crash Signature: [@ java.lang.IllegalStateException: Hardware acceleration can only be used with a single UI thread. Original thread: Thread[main,5,main]] → [@ java.lang.IllegalStateException: Hardware acceleration can only be used with a single UI thread. Original thread: Thread[main,5 main]]
[@ java.lang.IllegalStateException: Hardware acceleration can only be used with a single UI thread. Original thread:…
Updated•12 years ago
|
Crash Signature: [@ java.lang.IllegalStateException: Hardware acceleration can only be used with a single UI thread. Original thread: Thread[main,5 main]]
[@ java.lang.IllegalStateException: Hardware acceleration can only be used with a single UI thread. Original thread:… → [@ java.lang.IllegalStateException: Hardware acceleration can only be used with a single UI thread. Original thread: Thread[main,5,main]]
Reporter | ||
Comment 2•12 years ago
|
||
Naoki, see bug 703102.
Comment 3•12 years ago
|
||
This seems to be almost exclusively Galaxy Nexus. Of 101 crash reports on 14.* release yesterday, this is the device split: Samsung Galaxy Nexus 97 Motorola Xoom 1 Motorola MZ601 1 Asus Nexus 7 1 Amazon Kindle Fire 1
Reporter | ||
Comment 4•12 years ago
|
||
It's currently #1 top crasher in 14.0.2.
tracking-fennec: --- → ?
Keywords: topcrash
Summary: java.lang.IllegalStateException: Hardware acceleration can only be used with a single UI thread. Original thread: Thread[main,5,main] on Galaxy Nexus with Jelly Bean → java.lang.IllegalStateException: Hardware acceleration can only be used with a single UI thread. Original thread: Thread[main,5,main] on Galaxy Nexus mainly on JB
Reporter | ||
Comment 5•12 years ago
|
||
(In reply to Scoobidiver from comment #4) > It's currently #1 top crasher in 14.0.2. 14.0.2 is restricted to JB, so it's only #1 on JB.
Marking QAwanted for repro steps; most likely just have to turn on hardware acceleration? No URL listed. Also ADU is low... 226 crashes 5,072 ADI = 4.46 23 crashes 257 ADI = 8.95%
Keywords: qawanted
Reporter | ||
Updated•12 years ago
|
Summary: java.lang.IllegalStateException: Hardware acceleration can only be used with a single UI thread. Original thread: Thread[main,5,main] on Galaxy Nexus mainly on JB → java.lang.IllegalStateException: Hardware acceleration can only be used with a single UI thread. Original thread: Thread[main,5,main] mainly on ICS and above
Assignee | ||
Comment 7•12 years ago
|
||
The problem is that, somehow, a Dialog message was posted to our GeckoBackgroundThread's Handler. This suggests we might be spawning an AsyncTask from GeckoBackgroundThread (which is bad) or we might be confusing GeckoAppShell's getHandler/getGeckoHandler/getMainHandler when posting a UI event. Sriram, do any of those problems sound familiar?
status-firefox14:
--- → affected
Comment 8•12 years ago
|
||
The only place where the dialog dismissal can happen on background thread is PromptService. I'll post a patch soonish.
Reporter | ||
Comment 9•12 years ago
|
||
It's #1 top crasher in the first day of 15.0 with many dupes.
status-firefox15:
--- → affected
Assignee | ||
Comment 10•12 years ago
|
||
Sriram, we should try uplift your PromptService patch to Beta 16 (or even Firefox 15).
Updated•12 years ago
|
tracking-firefox15:
--- → +
Updated•12 years ago
|
status-firefox16:
--- → affected
tracking-firefox16:
--- → +
Assignee | ||
Comment 11•12 years ago
|
||
Here is the correct "More reports" link. Bugzilla did not include the trailing ']' character when it auto-linked the original URL, so I have URL-encoded it here: https://crash-stats.mozilla.com/report/list?query_search=signature&query_type=contains&reason_type=contains&range_value=3&range_unit=weeks&hang_type=any&process_type=any&signature=java.lang.IllegalStateException%3A%20Hardware%20acceleration%20can%20only%20be%20used%20with%20a%20single%20UI%20thread.%20Original%20thread%3A%20Thread[main%2C5%2Cmain%5D
Updated•12 years ago
|
Assignee: nobody → sriram
Comment 12•12 years ago
|
||
(In reply to Chris Peterson (:cpeterson) from comment #10) > Sriram, we should try uplift your PromptService patch to Beta 16 (or even > Firefox 15). We might be able to take a fix for this as a ride-along in a 15.0 chemspill -- do you have a patch ready? Can we get a build to test?
Assignee | ||
Comment 14•12 years ago
|
||
Sriram and I discussed this bug before we went on PTO. I am testing a possible fix now.
Assignee: sriram → cpeterson
Status: NEW → ASSIGNED
Assignee | ||
Comment 15•12 years ago
|
||
Part 1: Create PromptService's AlertDialog on the UI thread. PromptService.handleMessage() is called on the Gecko thread. It posts a runnable to call PromptService.processMessage() on the GeckoBackgroundThread, but this causes PromptService.show() to create the AlertDialog on the GeckoBackgroundThread. The AlertDialog must be created on the UI thread, so I changed show()() to post the AlertDialog creation to UI thread. A simpler solution would be for PromptService.handleMessage() to post processMessage() to the UI thread directly, skipping GeckoBackgroundThread. But that would move some possibly expensive operations (JSON parsing and layout inflation) to the UI thread.
Attachment #658259 -
Flags: review?(mark.finkle)
Assignee | ||
Comment 16•12 years ago
|
||
Part 2: Assert that PromptService's AlertDialog is called back on the UI thread. I plan to uplift patch 1 to Aurora, Beta, and/or Release, so I separated this non-essential debugging code into a separate patch 2. I won't uplift patch 2.
Attachment #658265 -
Flags: review?(mark.finkle)
Assignee | ||
Comment 17•12 years ago
|
||
Part 3: Skip some unnecessary conditional code when creating PromptService's AlertDialog. This patch is a trivial micro-optimization.
Attachment #658267 -
Flags: review?(mark.finkle)
Comment 18•12 years ago
|
||
Comment on attachment 658259 [details] [diff] [review] part-1-create-dialog-on-UI-thread.patch >diff --git a/mobile/android/base/PromptService.java b/mobile/android/base/PromptService.java >+ final OnCancelListener this_ = this; nit: Can you rename this_ to self ?
Attachment #658259 -
Flags: review?(mark.finkle) → review+
Updated•12 years ago
|
Attachment #658265 -
Flags: review?(mark.finkle) → review+
Updated•12 years ago
|
Attachment #658267 -
Flags: review?(mark.finkle) → review+
Comment 19•12 years ago
|
||
You can also use PromptService.this from inside the runnable to reference the outer class directly.
Comment 20•12 years ago
|
||
(In reply to Kartikaya Gupta (:kats) from comment #19) > You can also use PromptService.this from inside the runnable to reference > the outer class directly. Damn, I was looking for that style but failed to find confirmation about it. Yes! Use this style please!
Comment 21•12 years ago
|
||
Comment on attachment 658259 [details] [diff] [review] part-1-create-dialog-on-UI-thread.patch Since we're considering this for FF15.0.1 inclusion, a=akeybl for landing on Aurora/Beta.
Attachment #658259 -
Flags: approval-mozilla-beta+
Attachment #658259 -
Flags: approval-mozilla-aurora+
Updated•12 years ago
|
Attachment #658265 -
Flags: approval-mozilla-beta+
Attachment #658265 -
Flags: approval-mozilla-aurora+
Updated•12 years ago
|
Attachment #658267 -
Flags: approval-mozilla-beta+
Attachment #658267 -
Flags: approval-mozilla-aurora+
Assignee | ||
Comment 22•12 years ago
|
||
Comment on attachment 658259 [details] [diff] [review] part-1-create-dialog-on-UI-thread.patch [Approval Request Comment] Regression caused by (bug #): bug 694455 User impact if declined: This is the #1 topcrash for Firefox 15. Testing completed (on m-c, etc.): Tested locally Risk to taking this patch (and alternatives if risky): Low risk. alert() dialogs are already crashing, so this patch can't make it much worse. :) Patch part 2 and 3 do NOT need to be uplifted. They are extra cleanups that are not necessary to fix the crash.
Attachment #658259 -
Flags: approval-mozilla-release?
Updated•12 years ago
|
Attachment #658259 -
Flags: approval-mozilla-release? → approval-mozilla-release+
Assignee | ||
Comment 23•12 years ago
|
||
Landed patch 1 on m-c: https://hg.mozilla.org/mozilla-central/rev/647fabcaa951 I will land patch 2 and 3 on m-i later. They are extra cleanups that are not necessary to fix the crash.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
status-firefox18:
--- → fixed
Resolution: --- → FIXED
Assignee | ||
Comment 24•12 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/39133328b86b
status-firefox17:
--- → fixed
Assignee | ||
Comment 25•12 years ago
|
||
https://hg.mozilla.org/releases/mozilla-beta/rev/db28559df995
Assignee | ||
Comment 26•12 years ago
|
||
https://hg.mozilla.org/releases/mozilla-release/rev/fa4a5f9a0081
Target Milestone: --- → Firefox 15
Reporter | ||
Comment 27•12 years ago
|
||
The target milestone is the m-c version.
Target Milestone: Firefox 15 → Firefox 18
Assignee | ||
Comment 28•12 years ago
|
||
Landed patches 2 and 3 on m-i. These follow-on patches do not need to be uplifted to m-a+. https://hg.mozilla.org/integration/mozilla-inbound/rev/06fef017a420 https://hg.mozilla.org/integration/mozilla-inbound/rev/58be0a04c3c4
Comment 29•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/06fef017a420 https://hg.mozilla.org/mozilla-central/rev/58be0a04c3c4
Reporter | ||
Comment 30•12 years ago
|
||
There's one crash in 16.0b2(build2) that contains the fix: bp-6a9fc4ce-7d1d-4d18-bf68-865fd2120907.
Assignee | ||
Comment 31•12 years ago
|
||
(In reply to Scoobidiver from comment #30) > There's one crash in 16.0b2(build2) that contains the fix: > bp-6a9fc4ce-7d1d-4d18-bf68-865fd2120907. Beta 16.0b2 (20120906211157) does not have my fix. I checked the archived sources on ftp.mozilla.org. Build 20120906211157's creation date is after I landed my m-b fix, so I assume that build was snapped before my fix but finished building after my fix. This crash is not a beta topcrash, so I think waiting for next week's Beta 16.0b3 to pick up my fix is not a big problem.
Reporter | ||
Comment 32•12 years ago
|
||
It's #3 top crasher in 15.0.1.
Assignee | ||
Comment 33•12 years ago
|
||
The patch for this bug fixed *a* bug, but it was mostly speculation by Sriram and me that it was the exact stack trace in this crash report. Sriram, do you have any other ideas why a dialog would be running on our GeckoBackgroundThread?
Updated•12 years ago
|
tracking-fennec: ? → +
Assignee | ||
Comment 34•12 years ago
|
||
I posted a patch on bug 786312 that should fix this bug.
Depends on: 786312
Assignee | ||
Comment 35•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/9980650215af
Reporter | ||
Comment 36•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/9980650215af
Status: REOPENED → RESOLVED
Closed: 12 years ago → 12 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 37•12 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/541adb1639bb https://hg.mozilla.org/releases/mozilla-beta/rev/4442bb93e91a
Assignee | ||
Updated•12 years ago
|
Reporter | ||
Comment 38•12 years ago
|
||
There are still crashes in 16.0b4.
Comment 39•12 years ago
|
||
No crashes listed in the last 4 weeks verifying this.
Status: RESOLVED → VERIFIED
Updated•3 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•