Last Comment Bug 756813 - crash in mozilla::layers::ImageContainer::GetCurrentSize
: crash in mozilla::layers::ImageContainer::GetCurrentSize
: crash
Product: Core
Classification: Components
Component: Graphics: Layers (show other bugs)
: Trunk
: All All
-- major (vote)
: mozilla15
Assigned To: David Zbarsky (:dzbarsky)
: Milan Sreckovic [:milan]
Depends on:
  Show dependency treegraph
Reported: 2012-05-19 12:26 PDT by Andreas Gal :gal
Modified: 2012-05-22 06:41 PDT (History)
3 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Patch (993 bytes, patch)
2012-05-19 13:48 PDT, David Zbarsky (:dzbarsky)
gal: review+
Details | Diff | Splinter Review
patch (1.46 KB, patch)
2012-05-20 03:21 PDT, Andreas Gal :gal
no flags Details | Diff | Splinter Review
Patch (1.90 KB, patch)
2012-05-20 12:48 PDT, David Zbarsky (:dzbarsky)
gal: review+
Details | Diff | Splinter Review

Description User image Andreas Gal :gal 2012-05-19 12:26:12 PDT
This bug was filed from the Socorro interface and is 
report bp-e36766b9-17d2-4593-89b6-ecaa12120519 .

We have to do state.mImageRenderer.GetContainer() early in nsDisplayBackground::TryOptimizeToImageLayer and if it returns null, don't optimize into a layer.

This crash only happens when gpu image scaling is enabled, which is OFF by default so product and trunk aren't affected.
Comment 1 User image David Zbarsky (:dzbarsky) 2012-05-19 13:48:07 PDT
Created attachment 625440 [details] [diff] [review]
Comment 2 User image Andreas Gal :gal 2012-05-19 13:50:43 PDT
Comment on attachment 625440 [details] [diff] [review]

I would pull this into a local and then use that further down, but up to you.
Comment 3 User image Andreas Gal :gal 2012-05-20 03:09:31 PDT
e/contenteditable.css ../../../layout/style/designmode.css ../../../layout/style/TopLevelImageDocument.css ../../../layout/style/TopLevelVideoDocument.css ../../dist/bin/res
/Users/gal/workspace/mozilla-central/layout/base/nsDisplayList.cpp: In member function ‘bool nsDisplayBackground::TryOptimizeToImageLayer(nsDisplayListBuilder*)’:
/Users/gal/workspace/mozilla-central/layout/base/nsDisplayList.cpp:1168: error: no match for ‘operator!’ in ‘!state.nsBackgroundLayerState::mImageRenderer. nsImageRenderer::GetContainer()’
/Users/gal/workspace/mozilla-central/layout/base/nsDisplayList.cpp:1168: note: candidates are: operator!(bool) <built-in>
Comment 4 User image Andreas Gal :gal 2012-05-20 03:21:37 PDT
Created attachment 625481 [details] [diff] [review]
Comment 5 User image Andreas Gal :gal 2012-05-20 03:26:33 PDT
This page often crashes for me without the patch:

It has a large scaled background images and it loads pretty slowly, causing us to paint before the image is ready, resulting in a crash.

Works with my version of the patch. Lets land it.
Comment 6 User image David Zbarsky (:dzbarsky) 2012-05-20 12:04:46 PDT
Yeah, I made the same change locally.  I don't have L3 access so I can't actually land anything.
Comment 7 User image David Zbarsky (:dzbarsky) 2012-05-20 12:48:38 PDT
Created attachment 625509 [details] [diff] [review]
Comment 8 User image Andreas Gal :gal 2012-05-20 13:03:46 PDT
I am not of much use these days, but comment 6 I can fix!
Comment 9 User image David Zbarsky (:dzbarsky) 2012-05-21 10:48:31 PDT
Comment 10 User image Ed Morley [:emorley] 2012-05-22 06:41:13 PDT

Note You need to log in before you can comment on or make changes to this bug.