Closed Bug 967528 Opened 10 years ago Closed 10 years ago

Assert failure "component alpha textures should be the same size" in ContentHostBase::Composite on www.lemonde.fr

Categories

(Core :: Graphics, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla30

People

(Reporter: bjacob, Assigned: nical)

References

()

Details

Attachments

(2 files)

Attached file Faulty session
Found by Christoph Diehl's "Faulty" fuzzer, see bug 777067
Wait... I seem to be getting this crash all the time now, even without Faulty.
Summary: Faulty: assert failure "component alpha textures should be the same size" in ContentHostBase::Composite → Assert failure "component alpha textures should be the same size" in ContentHostBase::Composite
This is caused by the patch in bug 962041: reverting it removes the crash.
Blocks: 962041
Summary: Assert failure "component alpha textures should be the same size" in ContentHostBase::Composite → Assert failure "component alpha textures should be the same size" in ContentHostBase::Composite on www.lemonde.fr
Flags: needinfo?(nical.bugzilla)
I haven't been able to reproduce so far, even on lemonde.fr. We should check in ContentClient that:
* when we call UseTexture on mTextureClientOnWhite, mTextureClient has the same size
* we are not switching between component alpha and non-component alpha for a given CompositableClient (otherwise we could have the next frame only update the TextureClient and the host would think it has component alpha because it still has the old texture on white).
That's all i cna think of so far.
Flags: needinfo?(nical.bugzilla)
This assertion prevents b2g desktop to be run in debug mode. (at least on linux)

Step to reproduce:

* Build b2g desktop with debug mode on:

  ac_add_options --enable-application=b2g
  ac_add_options --enable-debug

* Make a gaia profile:

  cd ~/gaia/
  rm -rf profile
  NOFTU=1 make

* Run b2g desktop with the gaia profile:

  ./objdir/dist/bin/b2g-bin -profile ~/gaia/profile

* Open an app, BAM. Parent process crashes with:

  Assertion failure: iterOnWhite->GetTileRect() == tileIter->GetTileRect() (component alpha textures
  should be the same size.), at /mnt/desktop/gecko/gfx/layers/composite/ContentHost.cpp:143
This patch will fix the bug if the cause was that we used the same compositable both with and without component alpha. I don't know if that can happen but we don't have code to guard against it so it doesn't hurt to be handle it without crashing. Even if it doesn't fix this issue, it's still good to take because it makes us more robust against ipdl messages arriving in the wrong order.
Attachment #8370873 - Flags: review?(bjacob)
Comment on attachment 8370873 [details] [diff] [review]
Use a specific message for component alpha

Review of attachment 8370873 [details] [diff] [review]:
-----------------------------------------------------------------

How about having component-alpha code reviewed by someone who knows component-alpha instead ;-)
Attachment #8370873 - Flags: review?(bjacob) → review?(matt.woodrow)
Comment on attachment 8370873 [details] [diff] [review]
Use a specific message for component alpha

Review of attachment 8370873 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/layers/composite/ContentHost.cpp
@@ +221,5 @@
>  ContentHostBase::UseTextureHost(TextureHost* aTexture)
>  {
> +  mTextureHost = aTexture;
> +  mTextureHostOnWhite = nullptr;
> +  mTextureHost->SetCompositor(GetCompositor());

Don't we want to call into the base class here too? Nothing is calling SetCompositableBackendSpecificData
Attachment #8370873 - Flags: review?(matt.woodrow) → review+
(In reply to Matt Woodrow (:mattwoodrow) from comment #8)
> Comment on attachment 8370873 [details] [diff] [review]
> Use a specific message for component alpha
> 
> Review of attachment 8370873 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: gfx/layers/composite/ContentHost.cpp
> @@ +221,5 @@
> >  ContentHostBase::UseTextureHost(TextureHost* aTexture)
> >  {
> > +  mTextureHost = aTexture;
> > +  mTextureHostOnWhite = nullptr;
> > +  mTextureHost->SetCompositor(GetCompositor());
> 
> Don't we want to call into the base class here too? Nothing is calling
> SetCompositableBackendSpecificData

I guess so, It wasn't there before the patch so I tossed the idea aside to do it in a separate bug. I can add it to this patch.
\o/ Thanks for fixing that so promply. I confirm that it stops asserting on b2g.
Now it's my turn: I can't reproduce the bug anymore (without the patch), so I'm not able to test at the moment. Sorry!
This landed with the wrong bug # in the commit message. Please double-check before pushing next time.
https://hg.mozilla.org/mozilla-central/rev/8d7c0ce1b376
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: