BasicLayers.cpp ABORTs in DEBUG mode on B2G

RESOLVED FIXED in mozilla16

Status

()

Core
Graphics
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: dhylands, Assigned: cjones)

Tracking

unspecified
mozilla16
ARM
Gonk (Firefox OS)
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

5 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
(Reporter)

Updated

5 years ago
Blocks: 743182
(Reporter)

Comment 1

5 years ago
Created attachment 628230 [details]
gdb backtrace from the ABORT
(Reporter)

Comment 2

5 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.
(Reporter)

Comment 5

5 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).
(Reporter)

Comment 6

5 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.
(Reporter)

Comment 8

5 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.
(Reporter)

Comment 9

5 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)

Updated

5 years ago
Attachment #632115 - Flags: review?(mwu) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/a9479d148ce5
Target Milestone: --- → mozilla16
https://hg.mozilla.org/mozilla-central/rev/a9479d148ce5
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.