[PATCH] weston: Don't ask for EGL depth buffer if not needed

Bill Spitzak spitzak at gmail.com
Thu Mar 22 22:22:16 PDT 2012


On 03/22/2012 09:51 PM, Kristian Høgsberg wrote:

>> Thanks it is good to know. I did suspect that such an obvious bug would not
>> be in there and you have reason to believe this function should never be
>> called when the data buffer is empty and want to find out what is really
>> wrong.
>>
>> The terminal does not crash, instead the compositor gets a protocol error
>> and then it kills the client.
>>
>> This patch does fix it and I see no sign of a message getting lost or a
>> extra one being created, when I put debug statements in both client and
>> compositor.
>>
>> I did get a stack dump from the point where this if statement is taken, but
>> I don't have it now. I will reproduce it tonight and send it. It was inside
>> the attach() call in wayland_client.c however.
>
> Should be fixed in wayland master now.

Okay, just in case, here is the stack dump. At this point (b->head == 
b->tail):

#1  0x001323cd in wl_buffer_get_iov (connection=0x8059110, mask=2)
     at connection.c:128
#2  wl_connection_data (connection=0x8059110, mask=2) at connection.c:268
#3  0x00132993 in wl_connection_put_fd (connection=0x8059110,
     sender=0x805db80, opcode=0, ap=<value optimized out>, message=0x135b94)
     at connection.c:405
#4  wl_connection_vmarshal (connection=0x8059110, sender=0x805db80, 
opcode=0,
     ap=<value optimized out>, message=0x135b94) at connection.c:537
#5  0x001313dc in wl_proxy_marshal (proxy=0x805db80, opcode=0)
     at wayland-client.c:196
#6  0x08050d0d in wl_shm_create_buffer (flags=0,
     display=<value optimized out>, rectangle=<value optimized out>)
     at /home/spitzak/install/include/wayland-client-protocol.h:318
#7  display_create_shm_surface (flags=0, display=<value optimized out>,
     rectangle=<value optimized out>) at window.c:514
#8  0x080513d6 in window_create_surface (window=0x815afe0) at window.c:866
#9  0x080513f5 in idle_redraw (task=0x815b04c, events=0) at window.c:2116
#10 0x080538d0 in display_run (display=0x8059008) at window.c:3109
#11 0x0804f9c9 in main (argc=<value optimized out>, argv=0xbffff274)
     at terminal.c:2392


More information about the wayland-devel mailing list