Skip Menu |

This queue is for tickets about the Net-DBus CPAN distribution.

Report information
The Basics
Id: 117897
Status: rejected
Priority: 0/
Queue: Net-DBus

People
Owner: Nobody in particular
Requestors: john_simpson [...] swajime.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Warning: requested type 'b' (98) did not match wire type 's' (115)
Date: Fri, 16 Sep 2016 15:12:51 -0400
To: bug-Net-DBus [...] rt.cpan.org
From: John Simpson <john_simpson [...] swajime.com>
I'm getting the following warning: "requested type 'b' (98) did not match wire type 's' (115)" I've traced through the execution of the code, adding these debug lines: Debug statements added to encode(): print "1: interface: $interface; type: $type; name: $name; direction: $direction; types: @types\n"; and print "2: type: $type; direction: $direction; types: @types\n"; after each @types assignment. Debug statements added to decode(): print "3. interface: $interface; type: $type; name: $name; direction: $direction; types: @types\n"; and print "4. interface: $interface; type: $type; name: $name; direction: $direction; types: @types\n"; after each @types assignment. I get the following output during execution: $ myprog.pl 1: interface: com.swajime.mbda_get.iou_config; type: methods; name: ac_tail; direction: params; types: 4. interface: com.swajime.mbda_get.iou_config; type: methods; name: ac_tail; direction: returns; types: string ac_tail = SW0012 $ myprog.pl 1: interface: com.swajime.mbda_get.iou_config; type: methods; name: ac_tail; direction: params; types: 4. interface: com.swajime.mbda_set.iou_config; type: methods; name: ac_tail; direction: returns; types: bool requested type 'b' (98) did not match wire type 's' (115) at /usr/lib/perl5/Net/DBus/Binding/Iterator.pm line 239. ac_tail = SW0012 It appears that the correct interface property is available during the call to Introspector::encode(), but is not available during the call to Introspector::decode(), obtained by the following line (the same in both functions): my $interface = $message->get_interface; Because undef is returned when called from decode() the code goes on to choose the first listed interface (random because it's a hash) and returns the type for the given function of that interface. Because I have the same function name on two different interfaces with different return types, I am getting a 50% failure rate, depending on which interface is listed first in the hash. I would offer a patch, but I do not see how to correct the problem. Thanks, John
Subject: Re: [rt.cpan.org #117897] AutoReply: Warning: requested type 'b' (98) did not match wire type 's' (115)
Date: Fri, 16 Sep 2016 16:11:51 -0400
To: bug-Net-DBus [...] rt.cpan.org
From: John Simpson <john_simpson [...] swajime.com>
FYI, this is failing on Ubuntu 14.04.4, with dbus 1.6.18-0ubuntu4.3, libdbus-1-3 1.6.18-0ubuntu4.3, and a customized libnet-dbus-perl 1.1.0 A working system is Mandriva 2010.1 with dbus 1.2.24-1mdv2010.1, libdbus-1_3 1.2.24-1mdv2010.1, and a customized libnet-dbus-perl 0.33.6 The working system has the following output for the same mods: $ myprog.pl 1: interface: com.swajime.mbda_get.iou_config; type: methods; name: ac_tail; direction: params; types: 3. interface: com.swajime.mbda_get.iou_config; type: methods; name: ac_tail; direction: returns; types: string ac_tail = SW0001 $ myprog.pl 1: interface: com.swajime.mbda_get.iou_config; type: methods; name: ac_tail; direction: params; types: 3. interface: com.swajime.mbda_get.iou_config; type: methods; name: ac_tail; direction: returns; types: string ac_tail = SW0001 On Fri, Sep 16, 2016 at 3:13 PM, Bugs in Net-DBus via RT <bug-Net-DBus@rt.cpan.org> wrote: Show quoted text
> > Greetings, > > This message has been automatically generated in response to the > creation of a trouble ticket regarding: > "Warning: requested type 'b' (98) did not match wire type 's' (115)", > a summary of which appears below. > > There is no need to reply to this message right now. Your ticket has been > assigned an ID of [rt.cpan.org #117897]. Your ticket is accessible > on the web at: > > https://rt.cpan.org/Ticket/Display.html?id=117897 > > Please include the string: > > [rt.cpan.org #117897] > > in the subject line of all future correspondence about this issue. To do so, > you may reply to this message. > > Thank you, > bug-Net-DBus@rt.cpan.org > > ------------------------------------------------------------------------- > I'm getting the following warning: "requested type 'b' (98) did not > match wire type 's' (115)" > > I've traced through the execution of the code, adding these debug lines: > > Debug statements added to encode(): > print "1: interface: $interface; type: $type; name: $name; direction: > $direction; types: @types\n"; > and > print "2: type: $type; direction: $direction; types: @types\n"; > after each @types assignment. > > Debug statements added to decode(): > print "3. interface: $interface; type: $type; name: $name; direction: > $direction; types: @types\n"; > and > print "4. interface: $interface; type: $type; name: $name; direction: > $direction; types: @types\n"; > after each @types assignment. > > > I get the following output during execution: > > $ myprog.pl > 1: interface: com.swajime.mbda_get.iou_config; type: methods; name: > ac_tail; direction: params; types: > 4. interface: com.swajime.mbda_get.iou_config; type: methods; name: > ac_tail; direction: returns; types: string > ac_tail = SW0012 > $ myprog.pl > 1: interface: com.swajime.mbda_get.iou_config; type: methods; name: > ac_tail; direction: params; types: > 4. interface: com.swajime.mbda_set.iou_config; type: methods; name: > ac_tail; direction: returns; types: bool > requested type 'b' (98) did not match wire type 's' (115) at > /usr/lib/perl5/Net/DBus/Binding/Iterator.pm line 239. > ac_tail = SW0012 > > It appears that the correct interface property is available during the > call to Introspector::encode(), but is not available during the call > to Introspector::decode(), obtained by the following line (the same in > both functions): > > my $interface = $message->get_interface; > > Because undef is returned when called from decode() the code goes on > to choose the first listed interface (random because it's a hash) and > returns the type for the given function of that interface. > > Because I have the same function name on two different interfaces with > different return types, I am getting a 50% failure rate, depending on > which interface is listed first in the hash. > > I would offer a patch, but I do not see how to correct the problem. > > Thanks, > > > John
Subject: Re: [rt.cpan.org #117897] AutoReply: Warning: requested type 'b' (98) did not match wire type 's' (115)
Date: Fri, 16 Sep 2016 16:44:12 -0400
To: bug-Net-DBus [...] rt.cpan.org
From: John Simpson <john_simpson [...] swajime.com>
Ahh ... found the answer was one of the mods I'd missed. Sorry about that. For anybody interested, the fix is: Add $interface to the params of line 395 of RemoteObject.pm, like so: -@reply = $ins->decode($reply, "methods", $name, "returns"); +@reply = $ins->decode($reply, "methods", $name, "returns", $interface); Modify Introspector.pm to use that parameter if available: -my $interface = $message->get_interface; +my $interface = shift; +$interface ||= $message->get_interface; All better now :-) On Fri, Sep 16, 2016 at 4:11 PM, John Simpson <john_simpson@swajime.com> wrote: Show quoted text
> FYI, this is failing on Ubuntu 14.04.4, with dbus 1.6.18-0ubuntu4.3, > libdbus-1-3 1.6.18-0ubuntu4.3, and a customized libnet-dbus-perl 1.1.0 > > A working system is Mandriva 2010.1 with dbus 1.2.24-1mdv2010.1, > libdbus-1_3 1.2.24-1mdv2010.1, and a customized libnet-dbus-perl > 0.33.6 > > The working system has the following output for the same mods: > > $ myprog.pl > 1: interface: com.swajime.mbda_get.iou_config; type: methods; name: > ac_tail; direction: params; types: > 3. interface: com.swajime.mbda_get.iou_config; type: methods; name: > ac_tail; direction: returns; types: string > ac_tail = SW0001 > $ myprog.pl > 1: interface: com.swajime.mbda_get.iou_config; type: methods; name: > ac_tail; direction: params; types: > 3. interface: com.swajime.mbda_get.iou_config; type: methods; name: > ac_tail; direction: returns; types: string > ac_tail = SW0001 > > On Fri, Sep 16, 2016 at 3:13 PM, Bugs in Net-DBus via RT > <bug-Net-DBus@rt.cpan.org> wrote:
>> >> Greetings, >> >> This message has been automatically generated in response to the >> creation of a trouble ticket regarding: >> "Warning: requested type 'b' (98) did not match wire type 's' (115)", >> a summary of which appears below. >> >> There is no need to reply to this message right now. Your ticket has been >> assigned an ID of [rt.cpan.org #117897]. Your ticket is accessible >> on the web at: >> >> https://rt.cpan.org/Ticket/Display.html?id=117897 >> >> Please include the string: >> >> [rt.cpan.org #117897] >> >> in the subject line of all future correspondence about this issue. To do so, >> you may reply to this message. >> >> Thank you, >> bug-Net-DBus@rt.cpan.org >> >> ------------------------------------------------------------------------- >> I'm getting the following warning: "requested type 'b' (98) did not >> match wire type 's' (115)" >> >> I've traced through the execution of the code, adding these debug lines: >> >> Debug statements added to encode(): >> print "1: interface: $interface; type: $type; name: $name; direction: >> $direction; types: @types\n"; >> and >> print "2: type: $type; direction: $direction; types: @types\n"; >> after each @types assignment. >> >> Debug statements added to decode(): >> print "3. interface: $interface; type: $type; name: $name; direction: >> $direction; types: @types\n"; >> and >> print "4. interface: $interface; type: $type; name: $name; direction: >> $direction; types: @types\n"; >> after each @types assignment. >> >> >> I get the following output during execution: >> >> $ myprog.pl >> 1: interface: com.swajime.mbda_get.iou_config; type: methods; name: >> ac_tail; direction: params; types: >> 4. interface: com.swajime.mbda_get.iou_config; type: methods; name: >> ac_tail; direction: returns; types: string >> ac_tail = SW0012 >> $ myprog.pl >> 1: interface: com.swajime.mbda_get.iou_config; type: methods; name: >> ac_tail; direction: params; types: >> 4. interface: com.swajime.mbda_set.iou_config; type: methods; name: >> ac_tail; direction: returns; types: bool >> requested type 'b' (98) did not match wire type 's' (115) at >> /usr/lib/perl5/Net/DBus/Binding/Iterator.pm line 239. >> ac_tail = SW0012 >> >> It appears that the correct interface property is available during the >> call to Introspector::encode(), but is not available during the call >> to Introspector::decode(), obtained by the following line (the same in >> both functions): >> >> my $interface = $message->get_interface; >> >> Because undef is returned when called from decode() the code goes on >> to choose the first listed interface (random because it's a hash) and >> returns the type for the given function of that interface. >> >> Because I have the same function name on two different interfaces with >> different return types, I am getting a 50% failure rate, depending on >> which interface is listed first in the hash. >> >> I would offer a patch, but I do not see how to correct the problem. >> >> Thanks, >> >> >> John