Skip Menu |

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

Report information
The Basics
Id: 27733
Status: resolved
Priority: 0/
Queue: Net-DBus

People
Owner: Nobody in particular
Requestors: JABLKO [...] cpan.org
Cc:
AdminCc:

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



Subject: libnet-dbus-perl calls dbus_message_iter_open_container with invalid arguments
Hi Daniel, Debian users have recently upgraded to dbus 1.1.1 and discovered libnet-dbus-perl calls dbus_message_iter_open_container with invalid arguments: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=430186 Consequently some gnome-system-tools are inoperable. Severity: grave bugs have been filed against lib-net-dbus-perl: http://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=libnet-dbus-perl;dist=unstable Do you have any time these days to take a look at this issue? Much thanks for all your work on Perl DBus, Jack
From: DANBERR [...] cpan.org
I think I've tracked down the problem - there was a bug in way dictionaries (hashes) are created. Can you try the attached patch and confirm whether this solves the gnome-system-tools problems.
diff -r 07164a921221 lib/Net/DBus/Binding/Iterator.pm --- a/lib/Net/DBus/Binding/Iterator.pm Sun Feb 04 12:03:45 2007 -0500 +++ b/lib/Net/DBus/Binding/Iterator.pm Mon Jun 25 14:23:12 2007 -0400 @@ -636,7 +636,7 @@ sub append_dict { foreach my $key (keys %{$hash}) { my $value = $hash->{$key}; - my $entry = $iter->_open_container(&Net::DBus::Binding::Message::TYPE_DICT_ENTRY, $sig); + my $entry = $iter->_open_container(&Net::DBus::Binding::Message::TYPE_DICT_ENTRY, ""); $entry->append($key, $type->[0]); $entry->append($value, $type->[1]);
From: Otavio Salvador <otavio [...] debian.org>
On Seg. Jun. 25 14:25:31 2007, DANBERR wrote: Show quoted text
> I think I've tracked down the problem - there was a bug in way > dictionaries (hashes) are created. Can you try the attached patch and > confirm whether this solves the gnome-system-tools problems.
Hello, We've tested the patch and it didn't work for us. There's anything we can do to get any other useful information for you? Feel free to ask for it.
I've installed gnome-system-tools and system-tools-backends and managed to reproduce the problem with latest DBus. It no longer treats empty string as equivalent to NULL string. The attached patch forces Net::DBus to use NULL, and for my tests solves the assertion failure seen when starting the 'network-admin' tool. Can you try this patch on Debian...
diff -r 07164a921221 DBus.xs --- a/DBus.xs Sun Feb 04 12:03:45 2007 -0500 +++ b/DBus.xs Fri Jun 29 13:34:39 2007 -0400 @@ -1301,7 +1301,10 @@ _open_container(iter, type, sig) char *sig; CODE: RETVAL = dbus_new(DBusMessageIter, 1); - dbus_message_iter_open_container(iter, type, sig, RETVAL); + if (!dbus_message_iter_open_container(iter, type, sig && *sig == '\0' ? NULL : sig, RETVAL)) { + dbus_free(RETVAL); + croak("failed to open iterator container"); + } OUTPUT: RETVAL
From: yahya
On Mo. 25. Jun. 2007, 14:25:31, DANBERR wrote: Show quoted text
> I think I've tracked down the problem - there was a bug in way > dictionaries (hashes) are created. Can you try the attached patch and > confirm whether this solves the gnome-system-tools problems.
Hi, Id just like to confirm, that applying /both/ patches fixes it.
Both of the patches in this ticket have been incorporated into the new Net-DBus-0.33.5 release just uploaded to CPAN, so marking this resolved based on positive feedback from previous comment. Feel free to re-open if the new release doesn't resolve the issue.