Ticket #14437 (closed defect: fixed)

Opened 7 months ago

Last modified 7 months ago

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

patch-check_hasfunc-get_moods.diff (1.7 kB) - added by dustin 7 months 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.

Change History

  Changed 7 months 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?

follow-up: ↓ 3   Changed 7 months 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 :)

in reply to: ↑ 2   Changed 7 months 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.

  Changed 7 months 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 7 months 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.

  Changed 7 months ago by MarkDoliner

  • status changed from new to closed
  • resolution set to fixed

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.

  Changed 7 months 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!