I remember facing similar marshalling issues when writing my bindings. The
thing is that the wire args do not always match the literal protocol args,
especially when creating a new object iirc. If it might be of any help, you
can always take a look at wayland-java-bindings on github to get an idea
how it's done.

gl & hf

2017-02-10 18:56 GMT+01:00 Rémi Thébault <remi.theba...@gmail.com>:

> Hi
>
> Thanks for your hints.
>
> Here is what I get with WAYLAND_DEBUG=1:
>
> from client:
> [3998325.807]  -> wl_display@1.get_registry(new id wl_registry@2)
> [3998325.834]  -> wl_disp...@1.sync(new id wl_callback@3)
> message too short, object (2), message error(ous)
>
> from server:
> [3998325.858] wl_display@1.get_registry(new id wl_registry@2)
> [3998325.876]  -> wl_registry@2.global(1, "wl_compositor", 4)
> [3998325.889]  -> wl_registry@2.global(2, "wl_subcompositor", 1)
> .... (other wl_registry.global elided)
> [3998326.102] wl_disp...@1.sync(new id wl_callback@3)
> [3998326.109]  -> wl_callb...@3.done(187)
> [3998326.116]  -> wl_display@1.delete_id(3)
> Unknown OSC escape code 777, text notify;Command 
> completed;examples/hello/wayland-d_hello
>
>
> OSC warning comes from weston-terminal, probably not related.
>
> and the output of wayland-tracker:
>
> wayland-tracker: connecting to /run/user/1000/wayland-0
> message too short, object (2), message error(ous)
> wayland-tracker: client closed socket
> wayland-tracker: sigCHLD received
> [0.062825s   ]  -> wl_disp...@1.sync(new id wl_callback@3)
> [0.062825s   ]  -> wl_display@1.get_registry(new id wl_registry@2)
> [0.062984s   ] <-  wl_display@1.delete_id(3)
> [0.062984s   ] <-  wl_callb...@3.done(6010)
> [0.062984s   ] <-  wl_registry@2.global(17, "zxdg_importer_v1", 1)
> ...
> [0.062984s   ] <-  wl_registry@2.global(4, "wl_output", 2)
> [0.062984s   ] <-  wl_registry@2.global(3, "wl_shm", 1)
> [0.062984s   ] <-  wl_registry@2.global(2, "wl_compositor", 3)
> [0.062984s   ] <-  wl_registry@2.global(1, "wl_drm", 2)
>
>
> It seems that the marshalling is correct, no?
>
> Rémi
>
> 2017-02-10 9:14 GMT+01:00 Pekka Paalanen <ppaala...@gmail.com>:
>
>> On Thu, 9 Feb 2017 08:07:37 +0100
>> Rémi Thébault <remi.theba...@gmail.com> wrote:
>>
>> > 2017-02-09 7:56 GMT+01:00 Rémi Thébault <remi.theba...@gmail.com>:
>> >
>> > > Hello,
>> > >
>> > > I've started to build new bindings to Wayland for the D programming
>> > > language.
>> > > Available at github.com/rtbo/wayland-d. Only client protocol
>> supported at
>> > > the moment.
>> > > I come over an issue when starting to test requests. I wrote a simple
>> > > program using the bindings:
>> > >
>> > > Sorry, premature email shoot! So,
>> > I come over an issue when starting to test requests. I wrote a simple
>> > program using the bindings:
>> >   - connect to display
>> >   - get the registry
>> >   - roundtrip
>> >
>> > I suspect wrong marshalling of the request because during roundtrip,
>> this
>> > message is printed:
>> >
>> > message too short, object (2), message error(ous)
>> >
>> > 2 is the registry id, and "ous" is the signature of wl_display.error.
>> > What can possibly go wrong here?
>> >
>> > Some insights over the bindings:
>> >   - I link to libwayland-client for the connection and marshalling code,
>> > but not for the main protocol interfaces objects.
>> >   - the D scanner create code for initialization of wl_interface
>> instances
>> > at program startup
>> >   - wl_interfaces are wrapped in higher level WlInterface instances
>> which
>> > act as Factory objects.
>> >   - each protocol interface translates into a wrapper over a wl_proxy
>> > object, and requests translates to marshalling calls in
>> libwayland-client.
>>
>> Hi,
>>
>> a wild guess: wrong args to a marshalling call?
>> Or opcode generated wrong?
>> Maybe use WAYLAND_DEBUG=1 to see what's going on, and compare both
>> server and client side protocol dumps.
>>
>>
>> Thanks,
>> pq
>>
>
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
>
>
_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to