libpurple2.5.2 crash when add buddy
yyaadet2002
yyaadet2002 at gmail.com
Wed Nov 26 01:41:47 EST 2008
Hi, all:
my codes here :
static void im_blist_request_add_buddy(PurpleAccount *account,
const char *username,
const char *group,
const char *alias)
{
const char *grp, *who, *whoalias;
PurpleGroup *g;
PurpleBuddy *b;
PurpleConversation *c;
PurpleBuddyIcon *icon;
who = username;
grp = group;
whoalias = alias;
if ( whoalias == NULL || *whoalias == '\0')
whoalias = NULL;
g = NULL;
purple_debug_info(__func__, "Account %s, username %s, group %s, alias %s\n", \
account->username,
username,
grp,
alias);
if(grp == NULL) {
if( NULL == (g = purple_find_group("friends"))) {
g = purple_group_new("friends");
purple_blist_add_group(g, NULL);
}
} else if ((grp != NULL) && (*grp != '\0') && ((g = purple_find_group(grp)) == NULL)) {
g = purple_group_new(grp);
purple_blist_add_group(g, NULL);
}
assert(g);
b = purple_buddy_new(account, who, whoalias);
purple_blist_add_buddy(b, NULL, g, NULL);
purple_account_add_buddy(account, b);
/*
* XXX
* It really seems like it would be better if the call to
* purple_account_add_buddy() and purple_conversation_update() were done in
* blist.c, possibly in the purple_blist_add_buddy() function. Maybe
* purple_account_add_buddy() should be renamed to
* purple_blist_add_new_buddy() or something, and have it call
* purple_blist_add_buddy() after it creates it. --Mark
*
* No that's not good. blist.c should only deal with adding nodes to the
* local list. We need a new, non-gtk file that calls both
* purple_account_add_buddy and purple_blist_add_buddy().
* Or something. --Mark
*/
c = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, who, account);
if (c != NULL) {
icon = purple_conv_im_get_icon(PURPLE_CONV_IM(c));
if (icon != NULL)
purple_buddy_icon_update(icon);
}
}
stack:
(gdb) bt
#0 0x286b8887 in calloc () from /lib/libc.so.7
#1 0x286b8b7e in free () from /lib/libc.so.7
#2 0x283716cc in xmlFreeURI () from /usr/local/lib/libxml2.so.5
#3 0x2835358d in xmlParseStartTag2 () from /usr/local/lib/libxml2.so.5
#4 0x2835d9d0 in xmlParseElement () from /usr/local/lib/libxml2.so.5
#5 0x2835e000 in xmlParseDocument () from /usr/local/lib/libxml2.so.5
#6 0x2835eb1f in xmlSAXUserParseMemory () from /usr/local/lib/libxml2.so.5
#7 0x282a6fdb in xmlnode_from_str (
str=0x28826938 "<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLS"..., size=889) at xmlnode.c:713
#8 0x28b1c2ac in msn_soap_read_cb (data=0x28843ec0, fd=8, cond=PURPLE_INPUT_READ) at soap.c:405
#9 0x08050db3 in im_io_invoke (source=0x28873180, condition=Variable "condition" is not available.
) at imeventloop.c:47
#10 0x284e6b4d in g_io_channel_unix_get_fd () from /usr/local/lib/libglib-2.0.so.0
#11 0x284b7886 in g_main_context_dispatch () from /usr/local/lib/libglib-2.0.so.0
#12 0x284bac02 in g_main_context_check () from /usr/local/lib/libglib-2.0.so.0
#13 0x284bafe7 in g_main_loop_run () from /usr/local/lib/libglib-2.0.so.0
#14 0x0804d8e5 in main (argc=Cannot access memory at address 0xc
) at server.c:447
help me!
Thanks
2008-11-26
yyaadet2002
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pidgin.im/pipermail/devel/attachments/20081126/788f2e94/attachment.html>
More information about the Devel
mailing list