[wayland + ILM] proxy wrappers usage of wayland 1.11.0 to 1.9.0

Vikas Patil vikasmpatil at gmail.com
Mon Aug 21 05:35:10 UTC 2017


Thanks a lot Philipp for your comments, it really helped. Now I get
the display correctly. However now I get the segmentation at different
location with my uses case [1] after back porting patches from wayland
1.11.0 to 1.9.0 and and also utilizing proxy wrappers in ILM control
library.

(gdb) bt
#0  0x68d11554 in wl_array_copy (array=0x67d2eb98, source=0x1) at
/usr/src/debug/wayland/1.9.0-r0/wayland-1.9.0/src/wayland-util.c:145
#1  0x00000000 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)


[1] https://lists.freedesktop.org/archives/wayland-devel/2017-August/

Thanks & Regards,
Vikash

On Fri, Aug 18, 2017 at 7:35 PM, Philipp Kerling <pkerling at casix.org> wrote:
> Hi,
>
> Am Freitag, den 18.08.2017, 18:35 +0530 schrieb Vikas Patil:
>> Dear All,
>>
>>
>> I have backported following patches from wayland 1.11.0 to 1.9.0 to
>> test one crash issue [1] . I am able to backport and start Weston
>> with
>> it. Is this valid thing to do?
>>
>>
>> https://cgit.freedesktop.org/wayland/wayland/commit/?id=6d29c0da3cd16
>> 8e08187cd204d2314188479c0f1
>> [client: Introduce proxy wrappers]
>>
>> https://cgit.freedesktop.org/wayland/wayland/commit/?id=6fe12f02e3b48
>> 79cd3d5faa08f023cc761d13be9
>> [client: Fix wl_display_roundtrip_queue() race condition]
>>
>> https://cgit.freedesktop.org/wayland/wayland/commit/?id=69ec70fb0d3f7
>> 5f4bcce449238d6297f6a986b5f
>> [tests/queue-test: Add tests for proxy wrappers] -- not required.
>>
>>
>>
>> Now If I understand it correctly I need to use/modify code where the
>> wayland client creates the proxy and sets the queue. One such
>> components is [2] ILM control library. I tried to do as per the
>> patches but with it nothing is coming on display even though weston
>> starts successfully with ivi-shell and ivi-controller.so.
>>
>>
>> Attached here the modified file. I would like to understand if the
>> way I used is correct or not? Could someone explain this fix and How
>> to use it properly for ILM control library? Do I need to add similar
>> fix in qtwayland  5.5.1 and other such components (e.g. wayland sink
>> from gstreamer) ?
> I think there are some problems judging by a quick look at your file:
>  * You create a wrapper for the wl_display, but then call
>    wl_display_get_registry on your original display. You need to use
>    the wrapped display here.
>  * Consequently, you must set the queue on the wl_display wrapper
>    before that so it correctly gets inherited to the wl_registry.
>  * I don't understand what you use wl_display_sync for. You do know
>    that wl_display_roundtrip_queue uses that implicitly?
>  * You must add the registry listener immediately after creating it and
>    not dispatch any events (on the queue the registry uses) in between.
>    Otherwise they will get lost.
>
> You might want to take a look at how other libraries use the API, e.g.
> https://github.com/01org/libva/blob/master/va/wayland/va_wayland_drm.c#L251
>
> If other libraries you use also operate on global objects in a thread-
> unsafe way (i.e. they are not using proxy wrappers *and* you cannot
> guarantee that the main queue will not be dispatched in parallel) then
> you will have to patch them.
>
> Regards
> Philipp
>
>
>>
>> [1] https://lists.freedesktop.org/archives/wayland-devel/2017-August/
>> 034784.html
>>
>> [2] https://github.com/GENIVI/wayland-ivi-extension/blob/1.9.1/ivi-la
>> yermanagement-api/ilmControl/src/ilm_control_wayland_platform.c
>> (function: init_control(),  line: 1260 )
>>
>>
>> Thanking you in advance for your time and comments.
>>
>>
>>
>> Thanks & Regards,
>>
>> Vikash
>> _______________________________________________
>> wayland-devel mailing list
>> wayland-devel at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list