If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Crash [@ purpleAccountBuddy::Get* ] during shutdown

Assigned to


Chat Core
4 years ago
4 years ago


(Reporter: clokep, Assigned: florian)


Windows 7

Firefox Tracking Flags

(Not tracked)



(2 attachments)



4 years ago
*** Original post on bio 1928 at 2013-04-13 15:47:00 UTC ***


Plenty more too.

Comment 1

4 years ago
Created attachment 8354148 [details]
C++ Stack trace

*** Original post on bio 1928 as attmnt 2381 at 2013-04-18 00:24:00 UTC ***

JS Stack trace:
I think the JS stack is:
0 anonymous() ["file:///c:/Users/Patrick/instantbird/objdir-debug/mozilla/dist/b
    this = [object Object]
1 anonymous() ["file:///c:/Users/Patrick/instantbird/objdir-debug/mozilla/dist/b
    this = [object Object]
2 anonymous() ["file:///c:/Users/Patrick/instantbird/objdir-debug/mozilla/dist/b
    this = [object Object]
3 anonymous() ["file:///c:/Users/Patrick/instantbird/objdir-debug/mozilla/dist/b
    this = [object Object]
4 anonymous() ["file:///c:/Users/Patrick/instantbird/objdir-debug/mozilla/dist/b
    this = [object Object]
5 anonymous() ["file:///c:/Users/Patrick/instantbird/objdir-debug/mozilla/dist/b
    this = [object Object]
6 anonymous() ["file:///c:/Users/Patrick/instantbird/objdir-debug/mozilla/dist/b
    this = [object Object]
7 anonymous() ["file:///c:/Users/Patrick/instantbird/objdir-debug/mozilla/dist/b
    this = [object Object]
8 anonymous() ["file:///c:/Users/Patrick/instantbird/objdir-debug/mozilla/dist/b
    this = [object Object]
9 anonymous() ["file:///c:/Users/Patrick/instantbird/objdir-debug/mozilla/dist/b
    this = [object Object]
10 anonymous() ["file:///c:/Users/Patrick/instantbird/objdir-debug/mozilla/dist/
    this = [object Object]
11 anonymous() ["resource:///modules/jsProtoHelper.jsm":221]
    this = [object Object]
12 anonymous() ["resource:///modules/jsProtoHelper.jsm":291]
    this = [object Object]
13 anonymous() ["resource:///modules/jsProtoHelper.jsm":292]
    this = [object Object]
14 anonymous() ["resource:///modules/xmpp.jsm":1185]
    this = [object Object]
15 anonymous() ["resource:///modules/xmpp.jsm":747]
    this = [object Object]
16 anonymous() ["file:///c:/Users/Patrick/instantbird/objdir-debu

Comment 2

4 years ago
*** Original post on bio 1928 at 2013-04-18 21:56:07 UTC ***

I've identified a possible cause for this shutdown mess. Filed it as a separate bug 955376 (bio 1938), as I'm not sure it's the only thing we want to fix for this crash.

Also note that this bug is very similar to bug 955289 (bio 1856).

Comment 3

4 years ago
*** Original post on bio 1928 at 2013-11-03 01:33:55 UTC ***

The stacks in comment 0 are in purpleAccountBuddy::GetDisplayName and purpleAccountBuddy::GetServerAlias. I reproduced today this shutdown crash in purpleAccountBuddy::GetCanSendMessage, I'm pretty sure it's the same root cause (our prupleAccountBuddy instance not uninitialized when libpurple's PurpleBuddy is freed during shutdown).

Here is the JS stack I got:
0 anonymous() ["components/imContacts.js":1109]
1 anonymous() ["components/imContacts.js":831]
2 anonymous() ["components/ibConvStatsService.js":658]
3 anonymous() ["components/ibConvStatsService.js":303]
4 anonymous() ["components/ibConvStatsService.js":293]
5 anonymous() ["components/ibConvStatsService.js":221]
6 anonymous() ["components/ibConvStatsService.js":523]
7 anonymous() ["components/imContacts.js":858]
8 anonymous() ["components/imContacts.js":861]
9 anonymous() ["components/imContacts.js":816]
10 anonymous() ["components/imContacts.js":817]

The problem there is that during shutdown, we uninitialize libpurple and then the contacts service, which fires plenty of notifications, which the stats service listens for some reason... and then the stats services pointlessly attempts to access plenty of stuff during shutdown, even though some may have already been freed.

There are different problems here:
1. The JS code doing nonsense shouldn't make the application crash. I'm going to address this purplexpcom issue here.
2. The contacts (and possibly conversations too) service shouldn't send update notifications during shutdown.
3. (maybe) The stats service should stop listening to notifications after receiving the prpl-quit notification.

I think 1. should be fixed ASAP (and I have a patch); 2. is worth considering but there's no rush: it's been like this for several releases before (we should definitely file a bug though!); for 3. I would like nhnt11's opinion, it may be wanted for 1.5 but it most likely doesn't block.
Summary: purplexpcom shutdown crash on Windows [@ msvcr100.dll@0x28ec ] → Crash [@ purpleAccountBuddy::Get* ] during shutdown

Comment 4

4 years ago
Created attachment 8354791 [details] [diff] [review]

*** Original post on bio 1928 as attmnt 3010 at 2013-11-03 01:34:00 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8354791 - Flags: review?(clokep)


4 years ago
Assignee: nobody → florian

Comment 5

4 years ago
Comment on attachment 8354791 [details] [diff] [review]

*** Original change on bio 1928 attmnt 3010 at 2013-11-03 13:42:05 UTC ***

It looks like this will fix the issue.
Attachment #8354791 - Flags: review?(clokep) → review+

Comment 6

4 years ago
*** Original post on bio 1928 at 2013-11-03 16:05:42 UTC ***

(In reply to comment #4)
> Created attachment 8354791 [details] [diff] [review] (bio-attmnt 3010) [details]
> Patch



I'll leave this open until we decide about 2 & 3.
You need to log in before you can comment on or make changes to this bug.