[pulseaudio-tickets] [PulseAudio] #887: pulseaudio crashes when getting property values on org.PulseAudio.Core1 dbus interface

PulseAudio trac-noreply at tango.0pointer.de
Fri Dec 24 11:01:00 PST 2010


#887: pulseaudio crashes when getting property values on org.PulseAudio.Core1
dbus interface
--------------------+-------------------------------------------------------
 Reporter:  mk_fg   |       Owner:  lennart
     Type:  defect  |      Status:  new    
Milestone:          |   Component:  daemon 
 Keywords:          |  
--------------------+-------------------------------------------------------
 git version had [wiki:DBusInterface dbus interface] for some time now, but
 it doesn't seem to work since changes in f564c7d7637 (Oct 20, "core: make
 use of dbus_message_iter_append_fixed_array").

 Simple test case (pulseaudio process should be running):

 {{{
 import dbus

 srv_addr = dbus.SessionBus()\
         .get_object('org.PulseAudio1', '/org/pulseaudio/server_lookup1')\
         .Get('org.PulseAudio.ServerLookup1', 'Address',
                 dbus_interface='org.freedesktop.DBus.Properties')

 sinks = dbus.connection.Connection(srv_addr)\
         .get_object(object_path='/org/pulseaudio/core1')\
         .Get('org.PulseAudio.Core1', 'Sinks',
                 dbus_interface='org.freedesktop.DBus.Properties')
 }}}

 ...crashes pulseaudio with following error from dbus:

 {{{
 D: protocol-dbus.c: Received message: destination = /org/pulseaudio/core1,
 interface = org.freedesktop.DBus.Properties, member = Get
 process 9455: arguments to dbus_message_iter_append_fixed_array() were
 incorrect, assertion "dbus_type_is_fixed (element_type)" failed in file
 dbus-message.c line 2622.
 This is normally a bug in some application using the D-Bus library.
         /usr/lib/libdbus-1.so.3(+0x5165e) [0xb70fc65e]
         /usr/lib/libdbus-1.so.3(+0x54918) [0xb70ff918]
         /usr/lib/libdbus-1.so.3(+0x3fba6) [0xb70eaba6]
         /usr/lib/libdbus-1.so.3(dbus_message_iter_append_fixed_array+0xb5)
 [0xb70d3885]
         /usr/lib/libpulsecommon-1.0.so(pa_dbus_append_basic_array+0x94)
 [0xb76b4f94]
 /usr/lib/libpulsecommon-1.0.so(pa_dbus_append_basic_array_variant+0xa1)
 [0xb76b5531]
 /usr/lib/libpulsecommon-1.0.so(pa_dbus_send_basic_array_variant_reply+0x96)
 [0xb76b57b6]
         /usr/lib/pulse-1.0/modules/module-dbus-protocol.so(+0x11f42)
 [0xb1330f42]
         /usr/lib/libpulsecore-1.0.so(+0x72652) [0xb7777652]
         /usr/lib/libdbus-1.so.3(+0x2f31e) [0xb70da31e]
         /usr/lib/libdbus-1.so.3(dbus_connection_dispatch+0xae9)
 [0xb70c0e19]
         /usr/lib/libpulsecommon-1.0.so(+0x3eafe) [0xb76b2afe]
         /usr/lib/libpulse.so.0(pa_mainloop_dispatch+0x1b9) [0xb76e3b09]
         /usr/lib/libpulse.so.0(pa_mainloop_iterate+0x51) [0xb76e3f21]
         /usr/lib/libpulse.so.0(pa_mainloop_run+0x34) [0xb76e3ff4]
         pulseaudio(main+0x1d2a) [0x805382a]
         /lib/libc.so.6(__libc_start_main+0xe7) [0xb6f24b97]
         pulseaudio() [0x804bdc1]
 }}}

 Problem also affects "Modules" and any other properties, returning arrays
 of object paths.
 The bug seem to be easily reproducible with pulseaudio-v1.0-dev and
 dbus-1.4.0.

 As Ford_Prefect pointed out in #pulseaudio, it is caused by the fact that
 DBUS_TYPE_OBJECT_PATH is not considered a fixed-size type, hence
 [http://dbus.freedesktop.org/doc/api/html/group__DBusMessage.html#gae195a3312ae445e7ef0196854f3523f8
 should not be passed to this function] as it does now from handle_*
 methods in iface-core.c.

 Reverting the aforementioned commit (f564c7d7637) fixes the problem,
 making dbus interface useable again.

-- 
Ticket URL: <http://pulseaudio.org/ticket/887>
PulseAudio <http://pulseaudio.org/>
The PulseAudio Sound Server


More information about the pulseaudio-bugs mailing list