Closed Bug 1355439 Opened 7 years ago Closed 7 years ago

Startup Crash in CrashReporter::TerminateHandler via nsAbOSXDirectory::Init [Mac]

Categories

(Thunderbird :: Address Book, defect)

52 Branch
Unspecified
macOS
defect
Not set
critical

Tracking

(thunderbird_esr45 unaffected, thunderbird_esr5255+ fixed, thunderbird54 wontfix, thunderbird55 wontfix, thunderbird56 fixed)

VERIFIED FIXED
Thunderbird 56.0
Tracking Status
thunderbird_esr45 --- unaffected
thunderbird_esr52 55+ fixed
thunderbird54 --- wontfix
thunderbird55 --- wontfix
thunderbird56 --- fixed

People

(Reporter: wsmwk, Assigned: m_kato)

References

Details

(Keywords: crash, regression, topcrash-thunderbird, Whiteboard: [startupcrash])

Crash Data

Attachments

(1 file, 1 obsolete file)

#1 crash for Mac users on THunderbird 52.0. And all crashes with this signature are version 52.0 and "newer". https://crash-stats.mozilla.com/signature/?product=Thunderbird&signature=CrashReporter%3A%3ATerminateHandler&date=%3E%3D2017-01-11T11%3A10%3A20.000Z&date=%3C2017-04-11T11%3A10%3A20.000Z&_columns=date&_columns=product&_columns=version&_columns=build_id&_columns=platform&_columns=reason&_columns=address&_columns=install_time&_sort=-date&page=1#reports

Both 10.11 and 10.12. None of the crashes have comments. Perhaps it correlates to previously reported Mac bugs of this liniage, i.e. bug 1286613 etc - I won't have time to investigate any time soon.

bp-0b91e028-4a62-4b3f-8861-3df572170411
 0 	XUL	CrashReporter::TerminateHandler()	toolkit/crashreporter/nsExceptionHandler.cpp:1521
1 	libc++abi.dylib	std::__terminate(void (*)())	
2 	libc++abi.dylib	__cxa_rethrow	
3 	libobjc.A.dylib	objc_exception_rethrow	
4 	AddressBook	+[ABAddressBook sharedAddressBook]	
5 	XUL	nsAbOSXDirectory::Init(char const*)	/builds/slave/tb-rel-c-esr52-m64_bld-0000000/build/mailnews/addrbook/src/nsAbOSXDirectory.mm:466
6 	XUL	nsAbManager::GetDirectory(nsACString_internal const&, nsIAbDirectory**)	/builds/slave/tb-rel-c-esr52-m64_bld-0000000/build/mailnews/addrbook/src/nsAbManager.cpp:295
7 	XUL	nsAbOSXDirFactory::GetDirectories(nsAString_internal const&, nsACString_internal const&, nsACString_internal const&, nsISimpleEnumerator**)	/builds/slave/tb-rel-c-esr52-m64_bld-0000000/build/mailnews/addrbook/src/nsAbOSXDirFactory.cpp:32
8 	XUL	nsAbBSDirectory::CreateDirectoriesFromFactory(nsACString_internal const&, DIR_Server*, bool)	/builds/slave/tb-rel-c-esr52-m64_bld-0000000/build/mailnews/addrbook/src/nsAbBSDirectory.cpp:57
9 	XUL	nsAbBSDirectory::EnsureInitialized()	/builds/slave/tb-rel-c-esr52-m64_bld-0000000/build/mailnews/addrbook/src/nsAbBSDirectory.cpp:151
10 	XUL	nsAbBSDirectory::GetChildNodes(nsISimpleEnumerator**)	/builds/slave/tb-rel-c-esr52-m64_bld-0000000/build/mailnews/addrbook/src/nsAbBSDirectory.cpp:94
11 	XUL	nsAbManager::GetDirectories(nsISimpleEnumerator**)	/builds/slave/tb-rel-c-esr52-m64_bld-0000000/build/mailnews/addrbook/src/nsAbManager.cpp:202
12 	XUL	NS_InvokeByIndex	xpcom/reflect/xptcall/md/unix/xptcinvoke_x86_64_unix.cpp:180
13 	XUL	XPCWrappedNative::CallMethod(XPCCallContext&, XPCWrappedNative::CallMode)	js/xpconnect/src/XPCWrappedNative.cpp:2058
14 	XUL	XPC_WN_GetterSetter(JSContext*, unsigned int, JS::Value*)	js/xpconnect/src/xpcprivate.h:1824
15 	XUL	js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct)	js/src/jscntxtinlines.h:239
16 	XUL	CallGetter	js/src/vm/Interpreter.cpp:523
Why doesn't addrbook use NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT?  Since this code is objective-c, it can throw exception, so when using objective-c, Gecko must use NS_OBJC_BEGIN_TRY_ABORT_BLOCK.
#3 Mac crash for 52.1.0
Easily fixed?

(In reply to Makoto Kato [:m_kato] from comment #1)
> Why doesn't addrbook use NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT?  Since this
> code is objective-c, it can throw exception, so when using objective-c,
> Gecko must use NS_OBJC_BEGIN_TRY_ABORT_BLOCK.
Component: General → Address Book
Summary: Crash in CrashReporter::TerminateHandler via nsAbOSXDirectory::Init [Mac] → Startup Crash in CrashReporter::TerminateHandler via nsAbOSXDirectory::Init [Mac]
Whiteboard: [startupcrash]
I don't know how to reproduce this.

But objective-c code might throw exception, so we should catch that exception.
Assignee: nobody → m_kato
Attachment #8880736 - Attachment is obsolete: true
Attachment #8880737 - Flags: review?(jorgk)
Comment on attachment 8880737 [details] [diff] [review]
Use NS_OBJC_BEGIN_TRY_ABORT_BLOCK

Looks good to me. I'm not a Mac expert at all, but the code changes won't do any damage and hopefully avoid crashes.

Let me land that myself after an M-C merge.
Attachment #8880737 - Flags: review?(jorgk) → review+
https://hg.mozilla.org/comm-central/rev/baa69f1f608ef4dbb94bf5cf1bb3d02c30f5d4dd
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 56.0
Comment on attachment 8880737 [details] [diff] [review]
Use NS_OBJC_BEGIN_TRY_ABORT_BLOCK

No harm in uplifting this.
Attachment #8880737 - Flags: approval-comm-esr52?
(In reply to Jorg K (GMT+2) from comment #9)
> Comment on attachment 8880737 [details] [diff] [review]
> Use NS_OBJC_BEGIN_TRY_ABORT_BLOCK
> 
> No harm in uplifting this.

Beta history [1] shows far not crashes for 56.0b2, and #26 crash for 55.0b2.(impossible to tell by nightly stats) Hopefully this does kill it in 52.x

[1] https://crash-stats.mozilla.com/signature/?release_channel=beta&signature=CrashReporter%3A%3ATerminateHandler&date=%3E%3D2017-05-14T06%3A13%3A09.000Z&date=%3C2017-08-14T06%3A13%3A09.000Z&_columns=date&_columns=product&_columns=version&_columns=build_id&_columns=platform&_columns=reason&_columns=address&_columns=install_time&_sort=-date&page=1#reports
Attachment #8880737 - Flags: approval-comm-esr52? → approval-comm-esr52+
crash via nsAbOSXDirectory::Init is gone in 52.3.0 and 56.0beta
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: