Crash when using GPtrArray with Dbus
NayaN kumar
nayankk at gmail.com
Wed Jul 29 03:35:43 PDT 2009
Dear All,
I am trying to send array of integers using GPtrArray. Bindings which I have
is ,
<method name="GetAllDownloads">
<annotation name="org.freedesktop.DBus.GLib.CSymbol"
value="downloadDaemonGetAllDownloads"/>
<arg type="a(u)" name="allDownloads" direction="out"/>
</method>
On the client side, I am calling this method as, (org_nayan_dlmgr is the
object path)
GPtrArray* gptr_all_dls = NULL;
org_nayan_dlmgr_get_all_downloads(remoteObject, &gptr_all_dls, &error);
Corresponding server side code is,
gboolean
downloadDaemonGetAllDownloads(DownloadDaemon* DaemonObject,
GPtrArray** gptrAllDls,
GError** error)
{
GPtrArray* gptr_all_dls = g_ptr_array_sized_new(1);
gptr_all_dls->len = numDls;
g_ptr_array_add(gptr_all_dls,(gpointer)(1234567));
*gptrAllDls = gptr_all_dls;
return TRUE;
}
When I call GetAllDownloads method over DBus, it is crashing with following
backtrace,
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb6d95740 (LWP 7638)]
0xb79c6880 in g_type_check_value () from /usr/lib/libgobject-2.0.so.0
(gdb) bt
#0 0xb79c6880 in g_type_check_value () from /usr/lib/libgobject-2.0.so.0
#1 0xb79cce78 in g_value_copy () from /usr/lib/libgobject-2.0.so.0
#2 0xb7809849 in ?? () from /usr/lib/libdbus-glib-1.so.2
#3 0xb7806f79 in dbus_g_type_struct_get_member () from
/usr/lib/libdbus-glib-1.so.2
#4 0xb7804b7e in ?? () from /usr/lib/libdbus-glib-1.so.2
#5 0xb7804876 in ?? () from /usr/lib/libdbus-glib-1.so.2
#6 0xb7809192 in ?? () from /usr/lib/libdbus-glib-1.so.2
#7 0xb78071ad in dbus_g_type_collection_value_iterate () from
/usr/lib/libdbus-glib-1.so.2
#8 0xb7805c86 in ?? () from /usr/lib/libdbus-glib-1.so.2
#9 0xb78049c3 in ?? () from /usr/lib/libdbus-glib-1.so.2
#10 0xb77fe944 in ?? () from /usr/lib/libdbus-glib-1.so.2
#11 0xb77d971b in ?? () from /usr/lib/libdbus-1.so.3
#12 0xb77cbaa6 in dbus_connection_dispatch () from /usr/lib/libdbus-1.so.3
#13 0xb77fb4cd in ?? () from /usr/lib/libdbus-glib-1.so.2
#14 0xb791ecf6 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#15 0xb79220b3 in ?? () from /usr/lib/libglib-2.0.so.0
#16 0xb7922497 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#17 0x0804a7ea in main () at DownloadDaemon.cpp:303
Am I missing anything? Please help me. dbus-binding-tool version is 0.74.
Regards,
Nayan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/dbus/attachments/20090729/decfc62f/attachment.html
More information about the dbus
mailing list