Cocoa Emacs works fine in Mac OSX English environment.
However, it (the same executable binary) immediately
crashes in Japanese language environment.
It looks like font-related initialization problem.
Any hints?
In English environment, you can try the following test.
$ build/Emacs.app/Contents/MacOS/Emacs
==> OK
$ __CF_USER_TEXT_ENCODING=0x1F6:1:14 build/Emacs.app/Contents/MacOS/
Emacs
$ __CF_USER_TEXT_ENCODING=0x1F6:1:14 gdb build/Emacs.app/Contents/
MacOS/Emacs
==> Emacs crashes. Gdb info is as follows.
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x911e903c
0x001fd67d in nsfont_escape_name (name=0x911e9034 "Hiragino Kaku
Gothic ProN") at nsfont.m:7272 name[i] = '_';