Closed Bug 866521 Opened 7 years ago Closed 7 years ago

B2G compositor crash when doing camera recordings

Categories

(Core :: Graphics: Layers, defect, critical)

ARM
Gonk (Firefox OS)
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla23

People

(Reporter: bas.schouten, Assigned: bas.schouten)

Details

(Keywords: crash, Whiteboard: [b2g-crash])

Attachments

(1 file)

When doing a camera recording and then for example wanting to play it. My B2G unagi frequently crashes. The cause of this appears to be that we get Gralloc images using one of the reserved pixel formats (0x100-0x1FF, see system/graphics.h). We don't know about this format though and is causes us to do a MOZ_ABORT. The fix for this should be pretty simple and I'll put it up here soon.
Severity: normal → critical
Keywords: crash
OS: Windows 7 → Gonk (Firefox OS)
Hardware: x86_64 → ARM
Whiteboard: [b2g-crash]
This deal with the conceivably useful pixel formats I was able to find from the header files. I've also changed this to no longer crash in release builds when we hit a pixel format we don't know about. Since it seems preferrable to not show an image (i.e. have a defect App), over bringing the entire phone down. This also contains the pixel format that will be needed for the bug 864017 fix.
Attachment #742849 - Flags: review?(bjacob)
(In reply to Bas Schouten (:bas.schouten) from comment #1)
> Created attachment 742849 [details] [diff] [review]
> Deal with additional pixel formats for Gralloc buffers

This patch also stops <video> crashing in the b2g browser. Land it! Ship it! Feedback+!
Comment on attachment 742849 [details] [diff] [review]
Deal with additional pixel formats for Gralloc buffers

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

r=me with the follow two IMPORTANT changes -- DO NOT LAND IN CURRENT FORM!

::: gfx/layers/Makefile.in
@@ +177,5 @@
>  Layers.$(OBJ_SUFFIX): CXXFLAGS += -GL-
>  endif
>  endif
> +
> +CXXFLAGS += -O0 -g
\ No newline at end of file

Remove this hunk!

::: gfx/layers/opengl/TextureHostOGL.cpp
@@ +607,5 @@
> +      // formats we don't deal with.
> +      // We only want to abort in debug builds here, since if we crash here
> +      // we'll take down the compositor process and thus the phone. This seems
> +      // like undesirable behaviour. We'd rather have a subtle artifact.
> +      NS_ERROR("Unknown Android pixel format.");

NS_ERROR doesn't abort even DEBUG builds. You can achieve what you want here with MOZ_ASSERT(false, message).

@@ +637,5 @@
> +      // formats we don't deal with.
> +      // We only want to abort in debug builds here, since if we crash here
> +      // we'll take down the compositor process and thus the phone. This seems
> +      // like undesirable behaviour. We'd rather have a subtle artifact.
> +      NS_ERROR("Unknown Android pixel format.");

Same.
Attachment #742849 - Flags: review?(bjacob) → review+
https://hg.mozilla.org/mozilla-central/rev/094ae19a982e
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
You need to log in before you can comment on or make changes to this bug.