xdg_surface_move Segmentation fault (core dumped)

Pekka Paalanen ppaalanen at gmail.com
Thu Oct 15 02:53:24 PDT 2015


On Wed, 14 Oct 2015 10:19:44 -0600
Vinicio Cordero <vcordero2991 at gmail.com> wrote:

> Hello,
> 
> I am making a simple wayland client using the simple-shm, simple-egl and
> fullscreen as a guide; while the surface is displayed and updated correctly
> on weston attempting to move the surface on pointer move event by calling
> xdg_surface_move will sometimes(almost always, sometimes the surface
> actually moves with no problems) make the client crash with a Segmentation
> fault (core dumped). Is there any minimum requirement I am missing to
> handle this feature the right way? Or is my main loop handled incorrectly?

Get a backtrace in gdb. There should be nothing mysterious here, it's a
simple program like any. Valgrind is useful too.

> Is the double buffer swapping implemented on simple-shm really neccesary?

Yes, see
http://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_buffer
and the references to wl_surface.

You can see the difference in buffer handling if you compare running
simple-shm on Weston with gl-renderer vs. Weston with pixman-renderer
(cmdline: --use-pixman). Pixman-renderer will not release a wl_shm
buffer until it has received another buffer. GL-renderer does release
earlier, because it makes a copy of the contents (glTexImage2D).

If the app uses sub-surfaces in a certain way, it is possible to need
three buffers.

Note, that the buffer management talked about here is necessary for
visual correctness, not for avoiding crashes. An app can write to a
reserved wl_buffer, there usually is no way to detect that in the
compositor, and it probably won't cause crashes or errors. It may just
cause glitches on the screen.

> Wayland and weston version: 1.9.0,  the code is send as an attachment.

Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 811 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20151015/2a3daeb0/attachment.sig>


More information about the wayland-devel mailing list