Nux

Comment 5 for bug 1103961

Revision history for this message
Sergio Gelato (sergio-gelato) wrote : compiz crashes with SIGSEGV in nux::IOpenGLShaderProgram::Begin()

I can't seem to persuade apport to upload my crash file for this bug, so here
is what I see as the gist of it.

The crash is due to the method nux::IOpenGLShaderProgram::Begin() being
invoked on a null object. It occurs while trying to read field _OpenGLID,
and the failing instruction (i386) is
 mov 0x44(%eax),%eax
with %eax being 0 at this point.

This method is invoked from nux::GraphicsEngine::QRP_GLSL_1Tex(), and simple
inspection of the source code (NuxGraphics/RenderingPipeGLSL.cpp) reveals
that if the DeviceTexture argument isn't of a type derived from
nux::IOpenGLTexture2D::StaticObjectType the ShaderProg local variable will
indeed hold a null value. So the solution is either to extend this method
so that it can handle other device texture types, or to make sure it never
gets invoked with a texture type it does not support.

In my case the additional texture type that needs to be supported turns out
to be IOpenGLRectangleTexture. The code to do this is present but commented
out in the source. It seems to always have been commented out since the
code was first added to the bzr repository (revision 9). I assume that
uncommenting it will take me into uncharted territory?

Here is the stack trace:

#0 0xb2db9873 in nux::IOpenGLShaderProgram::Begin() () from /usr/lib/i386-linux-gnu/libnux-graphics-4.0.so.0
No symbol table info available.
#1 0xb2dc97d4 in nux::GraphicsEngine::QRP_GLSL_1Tex(int, int, int, int, nux::ObjectPtr<nux::IOpenGLBaseTexture>, nux::TexCoordXForm&, nux::color::Color const&) () from /usr/lib/i386-linux-gnu/libnux-graphics-4.0.so.0
No symbol table info available.
#2 0xb2dc2e2a in nux::GraphicsEngine::QRP_1Tex(int, int, int, int, nux::ObjectPtr<nux::IOpenGLBaseTexture>, nux::TexCoordXForm&, nux::color::Color const&) () from /usr/lib/i386-linux-gnu/libnux-graphics-4.0.so.0
No symbol table info available.
#3 0xb06088f3 in nux::TextureLayer::Renderlayer(nux::GraphicsEngine&) () from /usr/lib/i386-linux-gnu/libnux-4.0.so.0
No symbol table info available.
#4 0xb0602077 in nux::BasePainter::RenderSinglePaintLayer(nux::GraphicsEngine&, nux::Rect, nux::AbstractPaintLayer*) () from /usr/lib/i386-linux-gnu/libnux-4.0.so.0
No symbol table info available.
#5 0xb111ff3d in unity::panel::PanelView::Draw(nux::GraphicsEngine&, bool) () from /usr/lib/compiz/libunityshell.so
No symbol table info available.
#6 0xb061ff67 in nux::View::ProcessDraw(nux::GraphicsEngine&, bool) () from /usr/lib/i386-linux-gnu/libnux-4.0.so.0
No symbol table info available.
#7 0xb05fe513 in nux::Layout::ProcessDraw(nux::GraphicsEngine&, bool) () from /usr/lib/i386-linux-gnu/libnux-4.0.so.0
No symbol table info available.
#8 0xb05d89a5 in nux::BaseWindow::DrawContent(nux::GraphicsEngine&, bool) () from /usr/lib/i386-linux-gnu/libnux-4.0.so.0
No symbol table info available.
#9 0xb061fa32 in nux::View::ProcessDraw(nux::GraphicsEngine&, bool) () from /usr/lib/i386-linux-gnu/libnux-4.0.so.0
No symbol table info available.
#10 0xb06236b6 in nux::WindowCompositor::RenderTopViewContent(nux::BaseWindow*, bool) () from /usr/lib/i386-linux-gnu/libnux-4.0.so.0
No symbol table info available.
#11 0xb0629020 in nux::WindowCompositor::RenderTopViews(bool, std::list<nux::ObjectWeakPtr<nux::BaseWindow>, std::allocator<nux::ObjectWeakPtr<nux::BaseWindow> > >&, bool) () from /usr/lib/i386-linux-gnu/libnux-4.0.so.0
No symbol table info available.
#12 0xb0629328 in nux::WindowCompositor::Draw(bool, bool) () from /usr/lib/i386-linux-gnu/libnux-4.0.so.0
No symbol table info available.
#13 0xb062f9c1 in nux::WindowThread::RenderInterfaceFromForeignCmd(nux::Rect const&) () from /usr/lib/i386-linux-gnu/libnux-4.0.so.0
No symbol table info available.
#14 0xb0fbb7be in unity::UnityScreen::paintDisplay() () from /usr/lib/compiz/libunityshell.so
No symbol table info available.
#15 0xb0fbbbc2 in unity::UnityScreen::glPaintOutput(GLScreenPaintAttrib const&, GLMatrix const&, CompRegion const&, CompOutput*, unsigned int) () from /usr/lib/compiz/libunityshell.so
No symbol table info available.
#16 0xb586c320 in GLScreen::glPaintOutput(GLScreenPaintAttrib const&, GLMatrix const&, CompRegion const&, CompOutput*, unsigned int) () from /usr/lib/compiz/libopengl.so
No symbol table info available.
#17 0xb586d3e9 in PrivateGLScreen::paintOutputs(std::list<CompOutput*, std::allocator<CompOutput*> >&, unsigned int, CompRegion const&) () from /usr/lib/compiz/libopengl.so
No symbol table info available.
#18 0xb58a4b85 in CompositeScreen::paint(std::list<CompOutput*, std::allocator<CompOutput*> >&, unsigned int) () from /usr/lib/compiz/libcomposite.so
No symbol table info available.
#19 0xb58a4cc6 in CompositeScreenInterface::paint(std::list<CompOutput*, std::allocator<CompOutput*> >&, unsigned int) () from /usr/lib/compiz/libcomposite.so
No symbol table info available.
#20 0xb58a4bb8 in CompositeScreen::paint(std::list<CompOutput*, std::allocator<CompOutput*> >&, unsigned int) () from /usr/lib/compiz/libcomposite.so
No symbol table info available.
#21 0xb58a4cc6 in CompositeScreenInterface::paint(std::list<CompOutput*, std::allocator<CompOutput*> >&, unsigned int) () from /usr/lib/compiz/libcomposite.so
No symbol table info available.
#22 0xb58a4bb8 in CompositeScreen::paint(std::list<CompOutput*, std::allocator<CompOutput*> >&, unsigned int) () from /usr/lib/compiz/libcomposite.so
No symbol table info available.
#23 0xb58a4cc6 in CompositeScreenInterface::paint(std::list<CompOutput*, std::allocator<CompOutput*> >&, unsigned int) () from /usr/lib/compiz/libcomposite.so
No symbol table info available.
#24 0xb58a4bb8 in CompositeScreen::paint(std::list<CompOutput*, std::allocator<CompOutput*> >&, unsigned int) () from /usr/lib/compiz/libcomposite.so
No symbol table info available.
#25 0xb15437c9 in WallScreen::paint(std::list<CompOutput*, std::allocator<CompOutput*> >&, unsigned int) () from /usr/lib/compiz/libwall.so
No symbol table info available.
#26 0xb58a4bb8 in CompositeScreen::paint(std::list<CompOutput*, std::allocator<CompOutput*> >&, unsigned int) () from /usr/lib/compiz/libcomposite.so
No symbol table info available.
#27 0xb58a4cc6 in CompositeScreenInterface::paint(std::list<CompOutput*, std::allocator<CompOutput*> >&, unsigned int) () from /usr/lib/compiz/libcomposite.so
No symbol table info available.
#28 0xb58a4bb8 in CompositeScreen::paint(std::list<CompOutput*, std::allocator<CompOutput*> >&, unsigned int) () from /usr/lib/compiz/libcomposite.so
No symbol table info available.
#29 0xb58a4cc6 in CompositeScreenInterface::paint(std::list<CompOutput*, std::allocator<CompOutput*> >&, unsigned int) () from /usr/lib/compiz/libcomposite.so
No symbol table info available.
#30 0xb58a4bb8 in CompositeScreen::paint(std::list<CompOutput*, std::allocator<CompOutput*> >&, unsigned int) () from /usr/lib/compiz/libcomposite.so
No symbol table info available.
#31 0xb58a8390 in CompositeScreen::handlePaintTimeout() () from /usr/lib/compiz/libcomposite.so
No symbol table info available.
#32 0xb58a86b1 in boost::detail::function::function_obj_invoker0<boost::_bi::bind_t<bool, boost::_mfi::mf0<bool, CompositeScreen>, boost::_bi::list1<boost::_bi::value<CompositeScreen*> > >, bool>::invoke(boost::detail::function::function_buffer&) () from /usr/lib/compiz/libcomposite.so
No symbol table info available.
#33 0xb769dd8a in CompTimer::triggerCallback() () from /usr/lib/libcompiz_core.so.ABI-20140123
No symbol table info available.
#34 0xb769de49 in CompTimeoutSource::callback() () from /usr/lib/libcompiz_core.so.ABI-20140123
No symbol table info available.
#35 0xb769df62 in sigc::internal::slot_call0<sigc::bound_mem_functor0<bool, CompTimeoutSource>, bool>::call_it(sigc::internal::slot_rep*) () from /usr/lib/libcompiz_core.so.ABI-20140123
No symbol table info available.
#36 0xb769d1ef in CompTimeoutSource::dispatch(sigc::slot_base*) () from /usr/lib/libcompiz_core.so.ABI-20140123
No symbol table info available.
#37 0xb71b2f41 in Glib::Source::dispatch_vfunc(_GSource*, int (*)(void*), void*) () from /usr/lib/i386-linux-gnu/libglibmm-2.4.so.1
No symbol table info available.
#38 0xb70a30a7 in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#39 0xb70a3468 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#40 0xb70a376b in g_main_loop_run () from /lib/i386-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#41 0xb71b43a3 in Glib::MainLoop::run() () from /usr/lib/i386-linux-gnu/libglibmm-2.4.so.1
No symbol table info available.
#42 0xb7654838 in compiz::private_screen::EventManager::startEventLoop(_XDisplay*) () from /usr/lib/libcompiz_core.so.ABI-20140123
No symbol table info available.
#43 0xb765489e in CompScreenImpl::eventLoop() () from /usr/lib/libcompiz_core.so.ABI-20140123
No symbol table info available.
#44 0x08049b52 in CompManager::run() ()
No symbol table info available.
#45 0x0804930c in main ()
No symbol table info available.