Mir

miral-app -launcher <app> sometimes causes egl image bad alloc

Bug #1723235 reported by Brandon Schaefer on 2017-10-12
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
High
Alan Griffiths

Bug Description

When running the miral-app -launcher <app> script to start an app it causes issues egl image bad alloc:

ERROR: /home/bschaefer/src/mir/src/platforms/mesa/server/buffer_allocator.cpp(180): Throw in function virtual void {anonymous}::DMABufTextureBinder::ensure_egl_image()
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::system_error> >
std::exception::what: Failed to create EGLImage: EGL_BAD_ALLOC (0x3003)

A way for me to reproduce is through an SDL2 app which:

miral-app -launcher ./testgl2 (from SDL2 source)

Causes flashing of the buffer rendering.

Alan Griffiths (alan-griffiths) wrote :

This comes from a failed attempt to "bypass" a fullscreen surface from a Wayland client. Simply not bypassing for this case works around the issue:

- if (!native)
- BOOST_THROW_EXCEPTION(std::invalid_argument("could not convert NativeBuffer"));
- if (native->flags & mir_buffer_flag_can_scanout &&
+ if (native && native->flags & mir_buffer_flag_can_scanout &&

But this loses efficiency.

Changed in mir:
importance: Undecided → High
status: New → Triaged
Alan Griffiths (alan-griffiths) wrote :

Root cause:

class WaylandBuffer :
...
    std::shared_ptr<mir::graphics::NativeBuffer> native_buffer_handle() const override
    {
        return nullptr;
    }

Alan Griffiths (alan-griffiths) wrote :

Root cause:

class WaylandBuffer :
...
    std::shared_ptr<mir::graphics::NativeBuffer> native_buffer_handle() const override
    {
        return nullptr;
    }

But this isn't quick to fix.

So I'll offer up the above fix and log the lack of bypass as a performance issue.

Changed in mir:
assignee: nobody → Alan Griffiths (alan-griffiths)
Changed in mir:
status: Triaged → Invalid
mir-ci-bot (mir-ci-bot) wrote :

Fix committed into lp:mir at revision None, scheduled for release in mir, milestone Unknown

Changed in mir:
status: Invalid → Fix Committed
Changed in mir:
status: Fix Committed → Invalid
Changed in mir:
milestone: none → 0.28.1
Changed in mir:
milestone: 0.28.1 → none
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers