in order to get familiar with the QDBus mechanism,
i made some examples derived from examples/dbus/complexpingpong.
I use Qt 4.4.0.
First I extended the example to user-defined structures containing "elemantary data types" to be marshalled by the DBus, they work fine.

Then, i tried to marshall a QPixmap-Object by the DBus,
I know this is not very usefull, but nevertheless i want to make this example work.

Problem: The server program has a segmentation fault and crashes.

Qt Code:
  1. inline QDBusArgument &operator<<(QDBusArgument &argument, const QPixmap &pixmap)
  2. {
  3. QVariant variant;
  4. variant = pixmap;
  5. QDBusVariant dbusvariant = QDBusVariant(variant);
  7. argument.beginStructure();
  8. argument << dbusvariant; // erroneous !!!!
  9. argument.endStructure();
  10. return argument;
  11. }
To copy to clipboard, switch view to plain text mode 

Erro during execution of the server and client programs:
The serialization indicated above is run cyclically many thousand times, then the segmentation error occurs.

Has anyone a hint or an idea ?