Opened 11 years ago

Closed 11 years ago

#5377 closed patch (fixed)

MSNP14 crash CAL failed for reason 3

Reported by: salinasv Owned by: QuLogic
Milestone: 2.5.0 Component: MSN
Version: 2.4.1 Keywords: msn crash
Cc:

Description

This patch prevents the "cal_error_helper: command CAL failed for reason 3" crash by closing the switchboard so SLP will not try to use it when the user is offline.

This happens when we are getting the buddy icon from a contact and it goes offline.

Maiku figured out what was causing the crash and the way to reproduce it.

Attachments (1)

cal_error_3_crash.patch (1.6 KB) - added by salinasv 11 years ago.
Update the patch

Download all attachments as: .zip

Change History (22)

comment:1 Changed 11 years ago by Maiku

Pidgin would crash when it queued a request to update a contact's display picture, but the contact logged out before that request started. I reproduced it by having the MSNP14 client logged in, then on another client, change the display picture, but then have that other client log out relatively quickly.

I'm not quite satisfied with this fix though. Upon further investigation I think it may close the switchboard connection if inviting another contact, who is offline, to a chat. I'm not absolutely sure that's the case, I haven't quite researched it enough, but I think that's a possibility. I'll continue to look into it and see if I can find a better solution.

comment:2 Changed 11 years ago by salinasv

Yeah, after sleeping some time. This looks like a hack. I think we must take a look to swboard->current_users and look if the swboard have more than one session and what is doing each one and only close the one with the offline user.

Btw, why are we sending a CAL command?

comment:3 Changed 11 years ago by salinasv

This one doesn't brake chats and prevent requesting buddy icon when the user is offline.

Changed 11 years ago by salinasv

Update the patch

comment:4 Changed 11 years ago by salinasv

I have updated the patch so it will not crash when the user->status is NULL. In this case it will request the buddy icon and fail each time.

comment:5 Changed 11 years ago by QuLogic

  • Milestone set to Activate MSNPV14

CC & stuff...

comment:6 Changed 11 years ago by salinasv

There is a misbehavior with some buddies.

I don't know why with this patch applied I can't get the buddy icon from some of my contacts. Have you noticed the same?

comment:7 Changed 11 years ago by salinasv

I tested with two of my friends from wich I'm not able to get the buddy icon and got this log. I have no problem with most of my buddies. (They was using kopete, I will test tomorrow with other friend who -I guess- uses the official client)

(03:23:47) msn: S: NS 000: NLN NLN cxxx5@hotmail.com 1 héctor%20acosta 1073741860 <msnobj%20Creator="cxxx5@hotmail.com"%20Size="9242"%20Type="3"%20Location="kopete.tmp"%20Friendly="AAA="%20SHA1D="/ovmp2VBmEeQfO6WYk1GYOiZJEc="%20SHA1C="owZQe7Nz2gXqydiC5pFCO9CHvf0="/> 
(03:23:47) MSNP14: get payload len:0
(03:23:47) msn: Queueing buddy icon request for cxxx5@hotmail.com (buddy_icon_window = 1)
(03:23:47) msn: Releasing buddy icon request
(03:23:47) msn-reas3: Requesting display from cxxx5@hotmail.com
(03:23:47) MSNP14: switchboard send msg..
(03:23:47) msn: C: SB 007: MSG 33 D 811
(03:23:47) msn: msn_release_buddy_icon_request(): buddy_icon_window-- yields =0
(03:23:47) blist: Updating buddy status for cxxx5@hotmail.com (MSN)
(03:23:47) msn: S: SB 007: ACK 33
(03:23:47) MSNP14: get payload len:0
(03:23:48) msn: S: SB 007: MSG cxxx5@hotmail.com héctor%20acosta 436
(03:23:48) MSNP14: get payload len:436
(03:23:48) msn: Received non-OK result: 500 Internal Error
(03:23:48) MSNP14: switchboard send msg..
(03:23:48) msn: C: SB 007: MSG 34 D 144
(03:23:48) msn: End User Display
(03:23:48) msn: S: SB 007: ACK 34
(03:23:48) MSNP14: get payload len:0
(03:23:49) msn: S: SB 007: MSG cxxx5@hotmail.com héctor%20acosta 90
(03:23:49) MSNP14: get payload len:90
(03:23:50) msn: S: SB 007: MSG cxxx5@hotmail.com héctor%20acosta 139
(03:23:50) MSNP14: get payload len:139
(03:23:50) msn: S: SB 007: MSG cxxx5@hotmail.com héctor%20acosta 90
(03:23:50) MSNP14: get payload len:90
(03:23:52) msn: C: NS 000: PNG
(03:23:52) msn: S: NS 000: QNG 49
(03:23:52) MSNP14: get payload len:0
(03:23:52) msn: S: SB 007: MSG cxxx5@hotmail.com héctor%20acosta 140
(03:23:52) MSNP14: get payload len:140
(03:24:07) MSNP14: switchboard send msg..
(03:24:07) msn: C: SB 007: MSG 35 U 94
(03:24:08) msn: Releasing buddy icon request

The interesting thing here is the "non-OK result 500 Internal Error" wich means that my friends client doesn't agree with the value in the body of the SLP message we are sending or the content type is not supported.

The important thing is that when I run pidgin without this patch I can get the buddy icon without problems.

I will try to check out why are we getting this odd slp message when my buddies get connected again. Any idea?

comment:8 Changed 11 years ago by Dimmuxx

Cc

comment:9 Changed 11 years ago by qulogic@…

(In 30bc11fb0f287ef49ab01b130617f89c53ab47a3):
A patch from felipec to make (msn_)request_user_display static.

References #5377. And http://pidgin.im/pipermail/devel/2008-June/006137.html

comment:11 follow-up: Changed 11 years ago by qulogic@…

(In e2a8133c3648a1a37576ade5e67c46730885e40e):
A patch from felipec to consistently use NULL for the status of offline MSN buddies.

References #5377. And http://pidgin.im/pipermail/devel/2008-June/006136.html

comment:10 Changed 11 years ago by qulogic@…

(In 075bff91d9cbcfd6f59c270802c5bffeb98c3b50):
A patch from felipec to stop requesting the MSN buddy icon when the object is changed in the middle of the request or the buddy has gone offline.

References #5377. And http://pidgin.im/pipermail/devel/2008-June/006133.html And http://pidgin.im/pipermail/devel/2008-June/006134.html

comment:11 follow-up: Changed 11 years ago by Dimmuxx

It seems that felipec's patch broke the buddy icon retrieval for users that are already online when you login so that their buddy icons aren't downloaded/updated until they change buddy icon or if they logout and login again.

comment:12 Changed 11 years ago by QuLogic

Hmm, yes, this does appear to be true.

comment:15 Changed 11 years ago by qulogic@…

(In 86d2aabc8c0973823a48a28d3c74e0a8b988d8dd):
Get rid of that whole msn_set_payload_len thing and correctly set the cmd->payload_len in each command handler callback. This should take care of that CAL 3 error and a few sporadic "unhandled commands" I saw while testing HTTP method.

References #5377.

comment:16 in reply to: ↑ 11 ; follow-up: Changed 11 years ago by visionkrew

Replying to Dimmuxx:

It seems that felipec's patch broke the buddy icon retrieval for users that are already online when you login so that their buddy icons aren't downloaded/updated until they change buddy icon or if they logout and login again.

This is still broken in the last revision (86d2aabc8c0973823a48a28d3c74e0a8b988d8dd).

comment:17 in reply to: ↑ 16 Changed 11 years ago by QuLogic

Replying to visionkrew:

This is still broken in the last revision (86d2aabc8c0973823a48a28d3c74e0a8b988d8dd).

That's not the latest revision.

comment:18 follow-up: Changed 11 years ago by visionkrew

Yes...I mean rev. e0c15c710af77a687e1adb624fdf03917bfef2fe. I compiled & tested it with Adium, and it looks like it's still not working.

comment:19 in reply to: ↑ 18 Changed 11 years ago by QuLogic

Replying to visionkrew:

Yes...I mean rev. e0c15c710af77a687e1adb624fdf03917bfef2fe. I compiled & tested it with Adium, and it looks like it's still not working.

It works for me. Please open a new ticket and post a debug log. It is not the same as this ticket.

comment:20 Changed 11 years ago by QuLogic

  • Owner changed from khc to QuLogic

comment:21 Changed 11 years ago by qulogic@…

  • Milestone changed from Activate MSNPV14 to 2.5.0
  • Resolution set to fixed
  • Status changed from new to closed

(In 42c781022327add4641b756f0a78587ef3ce2d1a):
On MSN, when an error occurs when opening a switchboard and calling the user, don't unref the unsent messages, because msg_error_helper does it for us. Masca says this stopped the CAL 3 error crash.

Fixes #5377.

Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!