BasicLayers.cpp ABORTs in DEBUG mode on B2G

RESOLVED FIXED in mozilla16



7 years ago
7 years ago


(Reporter: dhylands, Assigned: cjones)


Gonk (Firefox OS)

Firefox Tracking Flags

(Not tracked)



(2 attachments)



7 years ago
All DEBUG builds after the following commit from our mozilla-central git repository:

7fe94a9 Sat May 26 12:38:17 2012 +0800 Kan-Ru Chen Bug 743182 - Use gfxPlatform::OptimalFormatForContent everywhere. r=joedrew

cause the following ABORT to occur in B2G:

###!!! ABORT: Bad! Did we create a buffer twice without painting?: '!mIsNewBuffer', file /home/work/B2G/gecko/gfx/layers/basic/BasicLayers.cpp, line 2531


7 years ago
Blocks: 743182

Comment 1

7 years ago
Created attachment 628230 [details]
gdb backtrace from the ABORT

Comment 2

7 years ago
And oh yeah - the ABORT is only seen when OMTC is enabled.
This abort is a very serious logic error: it means our double-buffering code became discombobulated and probably would have not have synchronized front->back buffers correctly.  If that happens we'll get horrendous rendering artifacts.

Very interested to know how we're getting into this state.
It would be instructive to try re-applying the patch from bug 743182, but with the gfx/layers hunks removed.

Comment 5

7 years ago
I also confirmed that a non-debug build of the same commit fixes bug 744238 (so no artifacts seen when sliding up the lock screen when OMTC is enabled).

Comment 6

7 years ago
Removing gfx/layers/basic/BasicLayers.cpp and gfx/layers/ipc/ShadowLayers.cpp from the patchset, and adding back in the gfxASurface::FormatFromContent function cause the ABORT to not occur (and the lock screen artifact still shows)
That is very very odd.

Comment 8

7 years ago
In the working code case, the image format that ShadowLayerForwarder::AllocBuffer creates is ImageFormatRGB16_565.

In the case that aborts, the image format that ShadowLayerForwarder::AllocBuffer creates is ImageFormatARGB32.

And if I go back to the version of the code that doesn't ABORT and modify OptimalFormatFor to return ImageFormatARGB32 then I also get the ABORT.

Comment 9

7 years ago
And all of this testing was being done on a Samsung Galaxy S II running the ICS variant of gonk.
dhylands, do you have a patch for the ImageFormat problem?
Actually, I think this bug only affects sgs2, so it's not a top priority.  But if you already have a patch we should land it.
Created attachment 632115 [details] [diff] [review]
Use RGB24 for offscreen surfaces on android-esque platforms
Assignee: nobody → jones.chris.g
Attachment #632115 - Flags: review?(mwu)


7 years ago
Attachment #632115 - Flags: review?(mwu) → review+
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.