Service crash when returning array of dictionary

Bug #539666 reported by Olivier Le Thanh Duong
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
NDesk D-Bus
Fix Committed
Undecided
Unassigned

Bug Description

I implemented an exported object possessing several standard dbus properties, one of theses properties is a Dictionnary of < string, Dictionnary of <string, object> when I query this property via GetAll it return without problem when I do a Get on this particular property it doesn't respond and the whole service seems to have crashed.

See attached test case which you can compile with :
gmcs \
  -debug \
  -out:TestService.exe \
  -target:exe\
  -r:Mono.Posix \
  `pkg-config --libs ndesk-dbus-1.0 ndesk-dbus-glib-1.0` \
  -pkg:gtk-sharp-2.0 \
  TestExport.cs \

Output:
$ dbus-send --print-reply --dest="org.ndesk.gtest" "/org/ndesk/test" "org.freedesktop.DBus.Properties.GetAll" string:"org.ndesk.gtest"
method return sender=:1.585 -> dest=:1.586 reply_serial=2
   array [
      dict entry(
         string "HandlerChannelFilter"
         variant array [
               array [
                  dict entry(
                     string "TargetHandleType"
                     variant int32 1
                  )
                  dict entry(
                     string "ContentType"
                     variant string "application/x-note"
                  )
               ]
            ]
      )
   ]

$ dbus-send --print-reply --dest="org.ndesk.gtest" "/org/ndesk/test" "org.freedesktop.DBus.Properties.Get" string:"org.ndesk.gtest" string:"HandlerChannelFilter"
Error org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus)

$ dbus-send --print-reply --dest="org.ndesk.gtest" "/org/ndesk/test" "org.freedesktop.DBus.Properties.GetAll" string:"org.ndesk.gtest"
Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.ndesk.gtest was not provided by any .service files

Also I noticed that when FileTransferFilter is empty both method make the service crash

Revision history for this message
Olivier Le Thanh Duong (olethanh) wrote :
Revision history for this message
Olivier Le Thanh Duong (olethanh) wrote :

Sorry small mistake it's obviously not a Dictionary of Dictonary but an array of dictionary

Revision history for this message
Olivier Le Thanh Duong (olethanh) wrote :

I managed to refine my test case, this happen with all method returning an array of dictionary but not when that array is included in another container. This has nothing to do with property so renaming the bug

summary: - Service crash when querying property with a Get but not GetAll
+ Service crash when returning array of dictionary
Revision history for this message
Olivier Le Thanh Duong (olethanh) wrote :

Test it with: dbus-send --print-reply --dest="org.ndesk.gtest" "/org/ndesk/test" "org.ndesk.gtest.Get"

Revision history for this message
Olivier Le Thanh Duong (olethanh) wrote :

This was already fixed in Git

Changed in ndesk-dbus:
status: New → Fix Committed
Revision history for this message
Sandy Armstrong (sanfordarmstrong) wrote :

Ah, this is probably fixed by the same fix as bug #385254.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.