how to handle the last_error of wl_display
Pekka Paalanen
ppaalanen at gmail.com
Thu Jun 14 10:33:35 UTC 2018
On Thu, 14 Jun 2018 16:59:35 +0800
zou lan <nancy.lan.zou at gmail.com> wrote:
> Dear pekka & All:
>
> I find a wayland application report error about allocate memory fail.
> I check the code, after request to weston to allocate dma buffer, it call
> wl_display_roundtrip().
> But this function return very fast, it doesn't block until the create
> events back.
>
> I suspect the display->last_error is not 0. Then the wl_display_roundtrip()
> return fast because of the last_error. Does it right?
Hi,
sounds plausible.
> I find the following log:
>
> wl_display at 1: error 0: invalid object 10
Your application has a bug.
> Does the application need to handle the display errors? How could I make
> the last_error not impact wl_display_roundtrip?
All protocol errors are always fatal: they cause the client to be
disconnected and render the client wl_display unusable. The application
can only report the error somewhere and quit.
Protocol errors always imply a bug. Usually the bug is in the client
code, but it could be in compositor code as well.
Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20180614/0834e368/attachment.sig>
More information about the wayland-devel
mailing list