assertion error?

Naveen Verma ernaveenverma at gmail.com
Sun Aug 2 06:10:09 PDT 2009


Hi,

On Fri, Jul 24, 2009 at 7:36 AM, Alex Bunnett
<alexb at fusionelectronics.com>wrote:

>
>
> Got the dbus messages up and running but I keep getting a assertion error
> from time to time.
>
>
>
> Im unsure how the message can become locked as im not setting it locked
> before sending.
>
--  The message is a bit strange, I have not came across it, are you using
dbus in multi threaded environment? and what is you pass serial as NULL if
you are not interested in serial number?

>
>
> This is the code
>
>
>
>    DBusMessage*                       message = NULL;
>
>     dbus_uint32_t                        serial ; // TODO What is this?
>
>  -- Message serial number, could be NULL is you are not interested in. The
> same serial number you can check in dbus-monitor.
>
>             message = dbus_message_new_signal(SERVER_SEND_OBJECT , //
> object name of the signal
>
>
>   SEND_INTERFACE_SERVER , // interface name of the signal
>
>
>   "MessageServer");
>
>
>
>             DBusMessageIter iter, sub;
>
>
>
>             dbus_message_iter_init_append(message, &iter);
>
>
>
>             char buf[2];
>
>
>
>             buf[0] = DBUS_TYPE_BYTE;
>
>             buf[1] = '\0';
>
>
>
>             dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY, buf,
> &sub);
>
>  -- Why not just dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY,
> DBUS_TYPE_BYTE_AS_STRING, &sub); ?
>
>             if(!dbus_message_iter_append_fixed_array(&sub, DBUS_TYPE_BYTE,
> &pBuff, len))
>
>             {
>
>                         __ALEX("couldnt append message");
>
>                         dbus_message_unref(message);
>
>                 return 0;
>
>             }
>
>
>
>             dbus_message_iter_close_container(&iter, &sub);
>
>
>
>             if(!dbus_connection_send(_connection, message, &serial))
>
-- Could you try with serial as NULL (_connection, message, NULL)

>    {
>
>             __ALEX("Couldn't Send message");
>
>             dbus_message_unref(message);
>
>             return 0;
>
>    }
>
>
>
>    dbus_connection_flush(_connection); // force message to be sent now
>
>    dbus_message_unref(message);
>
>
>
>    return len;
>
>
>
> process 790: arguments to dbus_message_set_serial() were incorrect,
> assertion "!message->locked" failed in file dbus-message.c line 178.
>
> This is normally a bug in some application using the D-Bus library.
>
>   D-Bus not compiled with backtrace support so unable to print a backtrace
>
>
>
> Thanks
>
>
>
-Br
Naveen


>
>
> <http://www.fusioncaraudio.com/>
>
>
>
>
>
> *Alex Bunnett*
>
> Embedded Software Engineer
>
> Ph: +64-9-369-2900
> DDI: +64-9-369-2940
>
> Fax: +64-9-369-2907
> Email: alexb at fusionelectronics.co.nz
> Website: *http://www.fusionelectronics.com*
>
> The information in this email and any attachments is confidential. This
> information may be subject to legal, professional, or other privilege. It
> must not be disclosed to any person without our authority. If you are not
> the intended recipient you are not authorised to and must not disclose,
> copy, distribute, or retain this message or any part of it. Please return
> this message to the sender immediately and delete any and all copies from
> your system.
>
>
>
>
>
> _______________________________________________
> dbus mailing list
> dbus at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dbus
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/dbus/attachments/20090802/e575c351/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/x-citrix-jpeg
Size: 3610 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20090802/e575c351/attachment.bin 


More information about the dbus mailing list