Closed
Bug 1094206
Opened 10 years ago
Closed 8 years ago
crash in java.lang.NullPointerException: at org.mozilla.gecko.gfx.GeckoLayerClient.activateProgram(GeckoLayerClient.java)
Categories
(Firefox for Android Graveyard :: Toolbar, defect)
Tracking
(firefox36 affected)
RESOLVED
WORKSFORME
Tracking | Status | |
---|---|---|
firefox36 | --- | affected |
People
(Reporter: aaronmt, Assigned: sotaro)
Details
(Keywords: crash)
Crash Data
Attachments
(1 file)
2.45 KB,
patch
|
Details | Diff | Splinter Review |
This bug was filed from the Socorro interface and is report bp-357b89c0-fc0a-49ed-836c-9a7f42141104. ============================================================= java.lang.NullPointerException at org.mozilla.gecko.gfx.GeckoLayerClient.activateProgram(GeckoLayerClient.java:745) at dalvik.system.NativeStart.run(Native Method) at dalvik.system.NativeStart.run(Native Method) at dalvik.system.NativeStart.run(Native Method)
Updated•9 years ago
|
Crash Signature: [@ java.lang.NullPointerException: at org.mozilla.gecko.gfx.GeckoLayerClient.activateProgram(GeckoLayerClient.java)] → [@ java.lang.NullPointerException: at org.mozilla.gecko.gfx.GeckoLayerClient.activateProgram(GeckoLayerClient.java)]
[@ java.lang.NullPointerException: at org.mozilla.gecko.gfx.GeckoLayerClient.activateProgram]
Sotaro, anything you can do to help?
Flags: needinfo?(sotaro.ikeda.g)
Assignee | ||
Comment 2•8 years ago
|
||
(In reply to Milan Sreckovic [:milan] from comment #1) > Sotaro, anything you can do to help? It seems that there is a case that mLayerRenderer is null. https://dxr.mozilla.org/mozilla-central/source/mobile/android/base/java/org/mozilla/gecko/gfx/GeckoLayerClient.java#735
Assignee | ||
Comment 4•8 years ago
|
||
From the code, when nsWindow::DrawWindowOverlay() should have mLayerRendererFrame and nsWindow should not be destroyed. https://dxr.mozilla.org/mozilla-central/source/widget/android/nsWindow.cpp#3210 And before calling the DrawWindowOverlay(), nsWindow::DrawWindowUnderlay() should be called by Compositor. When the DrawWindowUnderlay() was called, GeckoLayerClient.mLayerRenderer seemed valid, because mLayerRendererFrame should be valid in the DrawWindowOverlay(). It seemed to mean that GeckoLayerClient.mLayerRenderer becomes invalid between DrawWindowOverlay() call and DrawWindowOverlay().
Flags: needinfo?(sotaro.ikeda.g)
Assignee | ||
Comment 5•8 years ago
|
||
GeckoLayerClient dies not release GeckoLayerClient.mLayerRenderer during its life time since it get in GeckoLayerClient.onGeckoReady() https://dxr.mozilla.org/mozilla-central/source/mobile/android/base/java/org/mozilla/gecko/gfx/GeckoLayerClient.java#158 It seemed that GeckoLayerClient was also released when the the crash happened.
Assignee | ||
Comment 6•8 years ago
|
||
GeckoLayerClient and LayerRenderer are destroyed in LayerView.destroy(). https://dxr.mozilla.org/mozilla-central/source/mobile/android/base/java/org/mozilla/gecko/gfx/LayerView.java#194
Assignee | ||
Comment 7•8 years ago
|
||
There is a code that to trigger to pause compositor. It is triggered from surfaceDestroyed(). SurfaceListener.surfaceDestroyed() ->LayerView.onDestroyed() ->GLController.serverSurfaceDestroyed() ->GLController.pauseCompositor() ->nsWindow::GLControllerSupport::PauseCompositor() ->CompositorChild::SendPause() // sync ipc ->CompositorParent::RecvPause()
Assignee | ||
Comment 8•8 years ago
|
||
FYI: diagram around GeckoView https://github.com/sotaroikeda/firefox-diagrams/blob/master/mobile/mobile_GeckoView_47.pdf
Assignee | ||
Comment 9•8 years ago
|
||
LayerView.destroy() could be called from GeckoView.onDetachedFromWindow() https://dxr.mozilla.org/mozilla-central/source/mobile/android/base/java/org/mozilla/gecko/GeckoView.java#325
Comment 10•8 years ago
|
||
All the crash reports I looked at with this signature seem to have some memory pressure stuff on the stack, so it might be that low-memory issues are causing the LayerView to get destroyed in the middle of a composite. The native code holds a reference to the GeckoLayerClient and tries to call drawWindowUnderlay but the layer renderer has already been destroyed. Also I'm not sure if the transition to GeckoView and Jim Chen's patches will affect this - a lot of the code was modified recently.
Assignee | ||
Comment 11•8 years ago
|
||
Yea, I agree. It seems to related to low-memory situation.
Assignee | ||
Comment 12•8 years ago
|
||
SurfaceListener.surfaceDestroyed() is normally called when SurfaceView is hidden. onDetachedFromWindow() is called when Activity is going to be destroyed. But in normal use case, onDetachedFromWindow() seems not called.
Assignee | ||
Comment 13•8 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #12) > But in normal use case, onDetachedFromWindow() seems not called. I run fennec on my phone and used it several ways, but I did not see the onDetachedFromWindow().
Assignee | ||
Comment 14•8 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #12) > SurfaceListener.surfaceDestroyed() is normally called when SurfaceView is > hidden. onDetachedFromWindow() is called when Activity is going to be > destroyed. But in normal use case, onDetachedFromWindow() seems not called. Other possibility is that BrowserApp(Activity) is destroyed without surfaceDestroyed().
Assignee | ||
Comment 15•8 years ago
|
||
Assignee | ||
Comment 16•8 years ago
|
||
I could not reproduce the crash. But attachment 8717360 [details] [diff] [review] seems to address the problem.
Assignee | ||
Updated•8 years ago
|
Attachment #8717360 -
Flags: review?(nchen)
Comment 17•8 years ago
|
||
Are there any recent crash reports? The latest reports I've seen are from 44, which is before the major LayerView/GLController refactoring that landed in 46. Without STR, we don't know if this still happens or not, and I'd rather wait before we make speculative changes.
Assignee | ||
Comment 18•8 years ago
|
||
Comment on attachment 8717360 [details] [diff] [review] patch - Add manual LayerView.onDestroyed() callings Ok, I cancel the review request and wait if there could be a new crash.
Attachment #8717360 -
Flags: review?(nchen)
Comment 19•8 years ago
|
||
No recent crashes.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
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
•