Mac OS X Archive (.app) crashed on test Mac machine: EXC_BAD_INSTRUCTION

Deadly 提交于 2019-12-12 03:30:01

问题


I am working on a Mac application, which is running fine on my machine which is a development machine. The project has quite a few dylib files, the dependancies for which I had to solve using

install_name_tool -change

I used @executable_path in the above command. After doing this, the program works fine on my machine, when I move the .app file to test environment it fails..

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

Exception Type: EXC_BAD_INSTRUCTION (SIGILL) Exception Codes: 0x0000000000000001, 0x0000000000000000

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libfreetype.6.dylib 0x001f736b FT_CMap_New + 105

1 libfreetype.6.dylib 0x0022d1a4 tt_face_build_cmaps + 516
2 libfreetype.6.dylib 0x00229f0a sfnt_load_face + 1424
3 libfreetype.6.dylib 0x00200cbe tt_face_init + 231
4 libfreetype.6.dylib 0x001f5fb4 open_face + 218
5 libfreetype.6.dylib 0x001f5bf1 FT_Open_Face + 528
6 libfreetype.6.dylib 0x001f59db FT_New_Face + 68

Looking at the bold characters one can make out that the problem is in freetype dylib. But why is it giving problems? I have included the .dylib file in the my_app.app/Contents/Frameworks/ directory.

Is this why the problem is caused?


回答1:


This error is seen because the location of the font supplied to freetype was incorrect.

The client did not have the supplied font file (ttf) on his machine.

When I supplied the ttf file along with the bundle, it was fixed.!



来源:https://stackoverflow.com/questions/19375796/mac-os-x-archive-app-crashed-on-test-mac-machine-exc-bad-instruction

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!