Closed Bug 1414853 Opened 7 years ago Closed 7 years ago

Crash in nsDisplayImageContainer::ConfigureLayer


(Core :: Graphics: WebRender, defect, P1)

Windows 10



Tracking Status
firefox-esr52 --- unaffected
firefox57 --- disabled
firefox58 --- disabled
firefox59 --- verified


(Reporter: marcia, Assigned: kechen)



(Keywords: crash, regression, Whiteboard: [wr-mvp] [gfx-noted])

Crash Data


(1 file)

This bug was filed from the Socorro interface and is 
report bp-32c5947b-f773-4bb3-9d47-c483c0171105.

Seen while looking at crash stats - not exactly sure where to bucket it:

On 58 crashes started using 20171104100412. Install time indicates a few unique users crashed. Crash reason is EXCEPTION_ACCESS_VIOLATION_READ.
One comment "Tried to change the background colors (new page etc..) to something other than blinding white. I think I broke it. Sorry"
New crash in 58 that only happens in the extension process. Appears to have something to do with painting.
Flags: needinfo?(amckay)
I wonder what "change the background colors (new page etc...)". Is that someone fiddling with userChrome.css?
I am getting this crash signature when trying to use the Page Shadow or Update Bookmark webextensions.  When trying to use these extensions, this crash occurs, and I then cannot use any (other) webextension until after I close and restart the browser.

Note: this occurs only with webrender enabled.
Based on comment 4, blocking on webrender.
Blocks: webrender
Flags: needinfo?(amckay)
Webrender is disabled on FF 58.
I think this should be a P2.

Kevin, please help to check this.
Assignee: nobody → kechen
Whiteboard: [wr-mvp] [gfx-noted]
Priority: -- → P2
This problem can be reproduced by installing google translator lite add-on and click the icon.
A blank widget will be shown in Windows Firefox nightly with Webrender enabled and hit the crash (which should be to translator kit in the widget in the normal case).

According to the crash stack, the process is trying to build layers from displaylist. This should not happen since we don't build layers when Webrender is enabled.

The backend type of the layer manager might be wrong here[1].

I will keep investigating.

Whiteboard: [wr-mvp] [gfx-noted] → [wr-mvp] [triage] [gfx-noted]
According to Bug 1390741, because of transparent window problem and extensions.webextensions.remote pref enabled, we use BasicCompositor to render this kind of widget, that's why we use ClientLayerManager instead of WebrenderLayrManager.

Now the problem is that we are try to build layer from a nsDisplayBackgroundImage without image data.
Make a early return in [1] can skip the crash, but some component won't be shown on the add-on widget.

I will keep investigating why these image data are missing.

Component: Graphics: Layers → Graphics: WebRender
Priority: P2 → P1
Whiteboard: [wr-mvp] [triage] [gfx-noted] → [wr-mvp] [gfx-noted]
We added a condition in nsDisplayBackgroundImage::GetLayerState[1] to decide if we should create Webrender commands; however, by using BasicCompositor for remote extension process with Webrender enabled, it causes some unexpected behavior.

This fix decouple the condition from GetLayerState, I will request for review after it passes try tests.

:kechen, we use ShouldUseAdvancedLayer() a lot of places and BasicCompositor usage was enabled by Bug 1390741.  ShouldUseAdvancedLayer()s might cause another problems. It might better to change that ShouldUseAdvancedLayer() returns false for non WebRenderLayerManager case. It seems OK since gecko seems to use AdvancedLayer only with WebRender for now. How do you think about it? If it is OK, we could address the problem with the following change.


 nsDisplayItem::CanUseAdvancedLayer(LayerManager* aManager) const
   if (!gfxPrefs::LayersAdvancedBasicLayerEnabled() &&
-      aManager && aManager->GetBackendType() == layers::LayersBackend::LAYERS_BASIC) {
+      aManager && aManager->GetBackendType() != layers::LayersBackend::LAYERS_WR) {
     return false;
Flags: needinfo?(kechen)
Hello Sotaro, thank you for the feedback.
Yes, it seems more reasonable and can solve this kind of problems at one time.
I will do the test and try before requesting the review.
Flags: needinfo?(kechen)
Comment on attachment 8932771 [details]
Bug 1414853 - Ensure LayerManager's backend type is LAYERS_WR in CanUseAdvancedLayer since BasicCompositor might be used for remote extension process;
Attachment #8932771 - Flags: review?(sotaro.ikeda.g) → review+
Keywords: checkin-needed
Pushed by
Ensure LayerManager's backend type is LAYERS_WR in CanUseAdvancedLayer since BasicCompositor might be used for remote extension process; r=sotaro
Keywords: checkin-needed
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
No more crashes in nightly 59 after the patch landed.
You need to log in before you can comment on or make changes to this bug.