Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#14437 closed defect (fixed)

Crash on selecting "Set mood"

Reported by: sunahe Owned by: MarkDoliner
Milestone: 2.10.0 Component: ICQ
Version: 2.9.0 Keywords: crash, set mood, icq
Cc:

Description

System: Windows 7 x86/x64

The program crashes on selecting "Tools -> Set Mood" when ICQ account is enabled. No repro when only GoogleTalk? is enabled. I have actually experienced this crash since I started to use Pidgin, which was about 2.6 or 2.7

Attachments (1)

patch-check_hasfunc-get_moods.diff (1.7 KB) - added by dustin 8 years ago.
Patch to add the usual PURPLE_PROTOCOL_PLUGIN_HAS_FUNC() check for prpl_info->get_moods() in get_global_moods(). Avoids a crash for some prpl misconfigurations.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 8 years ago by dustin

I've seen such crashes happening if an actual ICQ account is configured as an AIM account in pidgin. In that case there will be a crash even if you try to set the mood for a different account.

Can you check if this is the case?

comment:2 follow-up: Changed 8 years ago by sunahe

Thank you for a quick response.

Yes, it is the case. I guess, a warning message about poorly configured account would do better than crash :)

comment:3 in reply to: ↑ 2 Changed 8 years ago by dustin

Yes, it is the case. I guess, a warning message about poorly configured account would do better than crash :)

Of course. ;-)

The problem is that there are currently two ways to distinguish an ICQ from an AIM account. So the account is initialized as AIM, but later Pidgin will guess it's an ICQ account (because the user name is a sequence of digits) and offer the "Set mood" function, which has never been initialized.

There is a patch for Pidgin 3.0 (see ticket #13883) which will resolve this ambiguity -- and prevent this crash -- anyway, so I didn't concern myself further with this bug.

comment:4 Changed 8 years ago by dustin

In the code of gtkblist.c a check for the get_moods() callback is intentionally left out. Although the bug will be solved for AIM/ICQ soon, I think this check should be included:

There are also other protocols that come in several flavours. Therefore the combination of choosing the wrong prpl + the prpl being too smart about which callbacks should be available can still occur for other protocols (which would basically be a bug in the prpl, though).

So a crash at prpl_info->get_moods(account) may still happen.

Changed 8 years ago by dustin

Patch to add the usual PURPLE_PROTOCOL_PLUGIN_HAS_FUNC() check for prpl_info->get_moods() in get_global_moods(). Avoids a crash for some prpl misconfigurations.

comment:5 Changed 8 years ago by MarkDoliner

  • Resolution set to fixed
  • Status changed from new to closed

I fixed the oscar code in im.pidgin.pidgin. I don't have a strong opinion on whether gtkblist.c should do the HAS_FUNC() check, so my choice is the err on the side of simpler code and not add the check. But if another dev thinks it's a good idea I certainly won't object.

comment:6 Changed 8 years ago by markdoliner@…

  • Milestone set to 2.9.1

(In 3af0a4445a2e76ca0d3d66ad4a3fb376448826ce):
Fix crash selecting Tools->Set Mood when you're online with an ICQ account that is configured as an AIM account. (fixes #14437)

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!