Closed Bug 991741 Opened 8 years ago Closed 8 years ago

Crash in SwapBuffers() because Framebuffer's Fence misuse when HWComposer is not used. [SGS2][JB]

Categories

(Core :: Graphics: Layers, defect)

1.4 Branch
ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla31

People

(Reporter: _AtilA_, Assigned: _AtilA_)

Details

Attachments

(1 file)

After landing Bug 974152, I'm getting a crash at startup at this point (at least on v1.4):

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 11863.11906]
android::Fence::dup (this=0x0) at frameworks/native/libs/ui/Fence.cpp:99
99          return ::dup(mFenceFd);
(gdb) bt
#0  android::Fence::dup (this=0x0) at frameworks/native/libs/ui/Fence.cpp:99
#1  0x000156bc in mozilla::GonkDisplayJB::SwapBuffers (this=0x4051a300, dpy=0x1, sur=0x4811cb80) at ../../../../gecko/widget/gonk/libdisplay/GonkDisplayJB.cpp:219
#2  0x413269c0 in SwapBuffers (this=0x47d16800) at ../../../gecko/gfx/gl/GLContextProviderEGL.cpp:441
#3  mozilla::gl::GLContextEGL::SwapBuffers (this=0x47d16800) at ../../../gecko/gfx/gl/GLContextProviderEGL.cpp:433
#4  0x413a9c66 in mozilla::layers::CompositorOGL::EndFrame (this=0x482ef860) at ../../../gecko/gfx/layers/opengl/CompositorOGL.cpp:1190
#5  0x41392228 in mozilla::layers::LayerManagerComposite::Render (this=0x47ba2de0) at ../../../gecko/gfx/layers/composite/LayerManagerComposite.cpp:511
#6  0x41392388 in EndTransaction (aFlags=<optimized out>, this=0x47ba2de0, aCallback=<optimized out>, aCallbackData=<optimized out>)
    at ../../../gecko/gfx/layers/composite/LayerManagerComposite.cpp:245
#7  mozilla::layers::LayerManagerComposite::EndTransaction (this=0x47ba2de0, aCallback=0, aCallbackData=<optimized out>, aFlags=<optimized out>)
...

I've found that we are using FrameBufferSurface.cpp::mPrevFBAcquireFence without being correctly initialized when we are not using HWC (SGS2 case).

I already have a patch.
Comment on attachment 8401371 [details] [diff] [review]
0001-Bug-991741-Crash-in-SwapBuffers-because-Framebuffer-.patch

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

Looks good. Thanks!
Attachment #8401371 - Flags: review?(sotaro.ikeda.g) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/83373340af8d
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in before you can comment on or make changes to this bug.