Closed Bug 946879 Opened 12 years ago Closed 11 years ago

ASSERT_SYMBOL_PRESENT(fGetTexLevelParameteriv) fails during layer dump on B2G

Categories

(Core :: Graphics: Layers, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla32

People

(Reporter: botond, Assigned: kats)

References

Details

Attachments

(2 files, 2 obsolete files)

While trying to do a layer dump on B2G, I am getting a crash due to an assertion failure. Here is the stacktrace: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 4444.4495] 0xb47f908c in fGetTexLevelParameteriv (this=<optimized out>, target=<optimized out>, level=<optimized out>, pname=<optimized out>, params=<optimized out>) at ../../../gfx/gl/GLContext.h:1212 1212 ASSERT_SYMBOL_PRESENT(fGetTexLevelParameteriv); (gdb) i s #0 0xb47f908c in fGetTexLevelParameteriv (this=<optimized out>, target=<optimized out>, level=<optimized out>, pname=<optimized out>, params=<optimized out>) at ../../../gfx/gl/GLContext.h:1212 #1 mozilla::gl::GLContext::fGetTexLevelParameteriv (this=0xb0650000, target=3553, level=0, pname=4096, params=0xafdcf4c0) at ../../../gfx/gl/GLContext.h:1209 #2 0xb47ffc1e in mozilla::gl::GLContext::GetTexImage (this=0xb0650000, aTexture=<optimized out>, aYInvert=<optimized out>, aFormat=mozilla::gfx::FORMAT_UNKNOWN) at ../../../gfx/gl/GLContext.cpp:1784 #3 0xb47fffc6 in mozilla::gl::ReadBackSurface (aContext=<optimized out>, aTexture=<optimized out>, aYInvert=<optimized out>, aFormat=mozilla::gfx::FORMAT_UNKNOWN) at ../../../gfx/gl/GLContextUtils.cpp:19 #4 0xb48c29cc in mozilla::layers::SurfaceStreamHostOGL::GetAsSurface (this=0xae130830) at ../../../gfx/layers/opengl/TextureHostOGL.cpp:1366 #5 0xb487a440 in mozilla::layers::CompositableHost::DumpDeprecatedTextureHost (aFile=0xb6f481c4, aTexture=0xae130830) at ../../../gfx/layers/composite/CompositableHost.cpp:215 #6 0xb487fcd2 in mozilla::layers::DeprecatedImageHostSingle::Dump (this=0xb1fe2900, aFile=0xb6f481c4, aPrefix=0xafdcf6dc "[layerdump] ", aDumpHtml=false) at ../../../gfx/layers/composite/ImageHost.cpp:396 #7 0xb484b0d8 in mozilla::layers::Layer::Dump (this=0xaf5595e0, aFile=0xb6f481c4, aPrefix=0xafdcf6dc "[layerdump] ", aDumpHtml=false) at ../../../gfx/layers/Layers.cpp:1173 #8 0xb484b1ec in mozilla::layers::Layer::Dump (this=0xaf558e20, aFile=0xb6f481c4, aPrefix=0xafdcf6dc "[layerdump] ", aDumpHtml=false) at ../../../gfx/layers/Layers.cpp:1204 #9 0xb484b1a4 in mozilla::layers::Layer::Dump (this=0xb22d2800, aFile=0xb6f481c4, aPrefix=0xafdcf75c "[layerdump] ", aDumpHtml=false) at ../../../gfx/layers/Layers.cpp:1194 #10 0xb484b1a4 in mozilla::layers::Layer::Dump (this=0xac835000, aFile=0xb6f481c4, aPrefix=0xafdcf85c "[layerdump] ", aDumpHtml=false) at ../../../gfx/layers/Layers.cpp:1194 #11 0xb484b1ec in mozilla::layers::Layer::Dump (this=0xaf558090, aFile=0xb6f481c4, aPrefix=0xafdcf85c "[layerdump] ", aDumpHtml=false) at ../../../gfx/layers/Layers.cpp:1204 #12 0xb484b1a4 in mozilla::layers::Layer::Dump (this=0xac3f2000, aFile=0xb6f481c4, aPrefix=0xafdcf9dc "[layerdump] ", aDumpHtml=false) at ../../../gfx/layers/Layers.cpp:1194 #13 0xb484b1ec in mozilla::layers::Layer::Dump (this=0xaf558470, aFile=0xb6f481c4, aPrefix=0xafdcf9dc "[layerdump] ", aDumpHtml=false) at ../../../gfx/layers/Layers.cpp:1204 #14 0xb484b1ec in mozilla::layers::Layer::Dump (this=0xaf557ea0, aFile=0xb6f481c4, aPrefix=0xafdcf9dc "[layerdump] ", aDumpHtml=false) at ../../../gfx/layers/Layers.cpp:1204 #15 0xb484b1a4 in mozilla::layers::Layer::Dump (this=0xac3f1c00, aFile=0xb6f481c4, aPrefix=0xafdcfa5c "[layerdump] ", aDumpHtml=false) at ../../../gfx/layers/Layers.cpp:1194 #16 0xb484bbb4 in mozilla::layers::LayerManager::Dump (this=0xb0618860, aFile=0x0, aPrefix=0xb5faa934 "[layerdump]", aDumpHtml=false) at ../../../gfx/layers/Layers.cpp:1414 #17 0xb48812c8 in mozilla::layers::LayerManagerComposite::Render (this=0xb0618860) at ../../../gfx/layers/composite/LayerManagerComposite.cpp:362 #18 0xb4880e32 in mozilla::layers::LayerManagerComposite::EndTransaction (this=0xb0618860, aCallback=0, aCallbackData=0x0, aFlags=mozilla::layers::LayerManager::END_DEFAULT) at ../../../gfx/layers/composite/LayerManagerComposite.cpp:246 #19 0xb4880c20 in mozilla::layers::LayerManagerComposite::EndEmptyTransaction (this=0xb0618860, aFlags=mozilla::layers::LayerManager::END_DEFAULT) at ../../../gfx/layers/composite/LayerManagerComposite.cpp:196 #20 0xb489c8d4 in mozilla::layers::CompositorParent::CompositeInTransaction (this=0xad0f3800) at ../../../gfx/layers/ipc/CompositorParent.cpp:607 #21 0xb489c694 in mozilla::layers::CompositorParent::Composite (this=0xad0f3800) at ../../../gfx/layers/ipc/CompositorParent.cpp:561 #22 0xb48ad634 in DispatchToMethod<mozilla::layers::ImageBridgeParent, void (mozilla::layers::ImageBridgeParent::*)()> (obj=0xad0f3800, method= (void (mozilla::layers::ImageBridgeParent::*)(mozilla::layers::ImageBridgeParent * const)) 0xb489c661 <mozilla::layers::CompositorParent::Composite()>, arg=...) at ../../../ipc/chromium/src/base/tuple.h:383 #23 0xb48ac924 in RunnableMethod<mozilla::layers::ImageBridgeParent, void (mozilla::layers::ImageBridgeParent::*)(), Tuple0>::Run (this=0xb16f0220) at ../../../ipc/chromium/src/base/task.h:307 #24 0xb468f834 in MessageLoop::RunTask (this=0xafdcfdf0, task=0xb16f0220) at ../../../ipc/chromium/src/base/message_loop.cc:340 Backtrace stopped: previous frame inner to this frame (corrupt stack?) I investigated this a bit with Benoit Jacob. It looks like GetTexLevelParameteriv is not available in OpenGL ES, and therefore we shouldn't be trying to use it on mobile platforms like B2G. Benoit suggested doing two things: - Asserting in GLContext::GetTexImage that we are not using OpenGL ES. That would have given a clearer assertion in this case. - Modifying ReadBackSurface to use to use ReadTextureImage instead of GetTexImage.
I also get this assertion with several different backtraces if the MOZ_DUMP_PAINT environment variable is set to 1.
Until a proper fix can be found, I am working around these crashes by commenting out parts of the layer dump / MOZ_PAINT_DUMP code that are causing the crash (and that are irrelevant to me). See the attached patches.
Attached patch Delete busted code (obsolete) — Splinter Review
It's obvious nobody is using this, and it causes problems for people trying to do other things. So I'd like to kill it. If anybody wants it later they can put it back and figure out how to fix it properly.
Attachment #8359323 - Attachment is obsolete: true
Attachment #8427208 - Flags: review?(nical.bugzilla)
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #4) > It's obvious nobody is using this, and it causes problems for people trying > to do other things. I think people are using it, just not on b2g. The crash is specific to the embedded version of OpenGL.
(In reply to Botond Ballo [:botond] from comment #5) > (In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #4) > > It's obvious nobody is using this, and it causes problems for people trying > > to do other things. > > I think people are using it, just not on b2g. The crash is specific to the > embedded version of OpenGL. I would therefore suggest guarding the code with a preprocessor condition which is false when the embedded version of OpenGL is being used (others will know better what that might be).
Attachment #8427208 - Flags: review?(nical.bugzilla) → review+
Attachment #8427208 - Attachment is obsolete: true
Attachment #8427873 - Flags: review?(bgirard)
Attachment #8427873 - Flags: review?(bgirard) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
Assignee: nobody → bugmail.mozilla
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: