Closed Bug 1625650 Opened 4 years ago Closed 4 years ago

Crash in [@ nsAbAddressCollector::SetUpAbFromPrefs]

Categories

(Thunderbird :: Address Book, defect, P1)

Unspecified
Windows 10
defect

Tracking

(thunderbird75 wontfix)

VERIFIED FIXED
Thunderbird 76.0
Tracking Status
thunderbird75 --- wontfix

People

(Reporter: wsmwk, Assigned: darktrojan)

References

(Regression)

Details

(Keywords: crash, regression)

Crash Data

Attachments

(1 file)

Crashes start with 75.0b1 buildid 20200309225314
#7 crash for beta. No crashes seen in daily builds.

This bug is for crash report bp-10b7fccd-12d7-489b-b579-d6ec50200326.

Top 10 frames of crashing thread:

0 xul.dll nsAbAddressCollector::SetUpAbFromPrefs comm/mailnews/addrbook/src/nsAbAddressCollector.cpp:293
1 xul.dll nsAbAddressCollector::Init comm/mailnews/addrbook/src/nsAbAddressCollector.cpp:268
2 xul.dll nsAbAddressCollectorConstructor comm/mailnews/build/nsMailModule.cpp:436
3 xul.dll nsComponentManagerImpl::GetServiceLocked xpcom/components/nsComponentManager.cpp:1372
4 xul.dll nsComponentManagerImpl::GetServiceByContractID xpcom/components/nsComponentManager.cpp:1559
5 xul.dll nsGetServiceByContractID::operator const xpcom/components/nsComponentManagerUtils.cpp:243
6 xul.dll nsCOMPtr_base::assign_from_gs_contractid xpcom/base/nsCOMPtr.cpp:82
7 xul.dll nsMsgComposeAndSend::DeliverFileAsMail comm/mailnews/compose/src/nsMsgSend.cpp:2930
8 xul.dll nsMsgComposeAndSend::DeliverMessage comm/mailnews/compose/src/nsMsgSend.cpp:2901
9 xul.dll nsMsgComposeAndSend::GatherMimeAttachments comm/mailnews/compose/src/nsMsgSend.cpp:883

Flags: needinfo?(geoff)

The cause looks pretty clear: mDirectory doesn't get set here: https://searchfox.org/comm-central/rev/1e97b3c1f2224fbbf7c5479e2ec9f906d1949132/mailnews/addrbook/src/nsAbAddressCollector.cpp#293

Not entirely clear what the right solution is. For XPCOM the convention is that success means you didn't return null... This contract is not really followed for the new js implementation: https://searchfox.org/comm-central/rev/1e97b3c1f2224fbbf7c5479e2ec9f906d1949132/mailnews/addrbook/jsaddrbook/AddrBookManager.jsm#179

Priority: -- → P1

Yes, getDirectory should throw. I recall at one point deciding this, then changing my mind back again. Fortunately I can push all of the UI code that now expects null for the root address book through a wrapper function.

Side note: for this crash to happen the user would have to have an invalid value for mail.collect_addressbook, probably an address book that's been deleted. Should we reset that pref if the directory it points to is deleted?

Assignee: nobody → geoff
Status: NEW → ASSIGNED
Flags: needinfo?(geoff)
Attachment #9136638 - Flags: review?(mkmelin+mozilla)

(In reply to Geoff Lankow (:darktrojan) from comment #2)

Side note: for this crash to happen the user would have to have an invalid value for mail.collect_addressbook, probably an address book that's been deleted. Should we reset that pref if the directory it points to is deleted?

I think we should.

Comment on attachment 9136638 [details] [diff] [review]
1625650-getdirectory-throw-1.diff

Review of attachment 9136638 [details] [diff] [review]:
-----------------------------------------------------------------

r=mkmelin
Attachment #9136638 - Flags: review?(mkmelin+mozilla) → review+
Regressed by: 1614265

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/bdbc2ecaead2
AddrBookManager.getDirectory should throw instead of returning null when no directory is found. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 76.0
See Also: → 1626167

Confirmed - gone from crash-stats

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: