Subject: bug#11541: 24.0.97; Crash when visiting file on OS X 10.7.3

From: Florian Ebeling <[email-masked]>
Date: Fri, 1 Jun 2012 10:52:16 +0200

I also see crashes whose stack traces looks quite similar when doing
editing on non-unicode text.

This is from editing a pure ASCII file. The crash originates from a
call to CGStringGetLength below ns_findfonts as well. Head of the
system crash reporter text looks like this:

Process:         Emacs [11929]
Path:            /Applications/Emacs.app/Contents/MacOS/Emacs
Identifier:      org.gnu.Emacs
Version:         Version 24.0.97 (9.0)
Code Type:       X86-64 (Native)
Parent Process:  launchd [225]

Date/Time:       2012-06-01 10:42:51.606 +0200
OS Version:      Mac OS X 10.7.4 (11E53)
Report Version:  9

Interval Since Last Report:          48562 sec
Crashes Since Last Report:           2
Per-App Interval Since Last Report:  29627 sec
Per-App Crashes Since Last Report:   2
Anonymous UUID:                      C18CC773-D97A-495D-9009-B980469EE8A9

Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_BAD_ACCESS (SIGABRT)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000

VM Regions Near 0:
-->
    __TEXT                 0000000100000000-00000001001f4000 [ 2000K]
r-x/rwx SM=COW  /Applications/Emacs.app/Contents/MacOS/Emacs

Application Specific Information:
objc[11929]: garbage collection is OFF
abort() called

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	0x00007fff89f9482a __kill + 10
1   org.gnu.Emacs                 	0x00000001000a29e0 fatal_error_signal + 320
2   libsystem_c.dylib             	0x00007fff8afbdcfa _sigtramp + 26
3   libsystem_kernel.dylib        	0x00007fff89f94ce2 __pthread_kill + 10
4   libsystem_c.dylib             	0x00007fff8af6b7d2 pthread_kill + 95
5   libsystem_c.dylib             	0x00007fff8af5ca7a abort + 143
6   org.gnu.Emacs                 	0x000000010018cb21 ns_term_shutdown + 129
7   org.gnu.Emacs                 	0x00000001000a08bf shut_down_emacs + 239
8   org.gnu.Emacs                 	0x00000001000a29af fatal_error_signal + 271
9   libsystem_c.dylib             	0x00007fff8afbdcfa _sigtramp + 26
10  com.apple.CoreFoundation      	0x00007fff8966d3c2 CFStringGetLength + 18
11  com.apple.CoreFoundation      	0x00007fff896849e9
CFStringCompareWithOptionsAndLocale + 73
12  com.apple.CoreText            	0x00007fff89e937b2
CompareLocalizedDescriptorsByTraitsAndPrecedence(void const*, void
const*, void*, bool) + 209
13  com.apple.CoreFoundation      	0x00007fff896a5fa5 __CFSimpleMergeSort + 85
14  com.apple.CoreFoundation      	0x00007fff896a6067 __CFSimpleMergeSort + 279
15  com.apple.CoreFoundation      	0x00007fff896a6083 __CFSimpleMergeSort + 307
16  com.apple.CoreFoundation      	0x00007fff896a6083 __CFSimpleMergeSort + 307
17  com.apple.CoreFoundation      	0x00007fff896a6067 __CFSimpleMergeSort + 279
18  com.apple.CoreFoundation      	0x00007fff896a6067 __CFSimpleMergeSort + 279
19  com.apple.CoreFoundation      	0x00007fff896a6067 __CFSimpleMergeSort + 279
20  com.apple.CoreFoundation      	0x00007fff896a6067 __CFSimpleMergeSort + 279
21  com.apple.CoreFoundation      	0x00007fff896a6067 __CFSimpleMergeSort + 279
22  com.apple.CoreFoundation      	0x00007fff896a5ef6 CFSortIndexes + 1446
23  com.apple.CoreFoundation      	0x00007fff89678e33 CFQSortArray + 275
24  com.apple.CoreFoundation      	0x00007fff89678bb8 CFArraySortValues + 1080
25  com.apple.CoreText            	0x00007fff89ebdb28
TDescriptorSource::GetAllDescriptors(bool, long (*)(void const*, void
const*, void*)) const + 136
26  com.apple.CoreText            	0x00007fff89e8a587
TDescriptor::CreateMatchingDescriptors(__CFSet const*, unsigned long)
const + 163
27  com.apple.AppKit              	0x0000000100a32599
-[NSCTFontDescriptor matchingFontDescriptorsWithMandatoryKeys:] + 12
28  org.gnu.Emacs                 	0x00000001001a1c7a ns_findfonts + 1786
29  org.gnu.Emacs                 	0x000000010012ff32 font_list_entities + 770
30  org.gnu.Emacs                 	0x0000000100131d5e font_find_for_lface + 1918