Opened 5 years ago
Closed 5 years ago
#59661 closed defect (invalid)
fontforge + glib2 Illegal instruction crash on my very old Mac
Reported by: | snowflake (Dave Evans) | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.6.99 |
Keywords: | Cc: | ||
Port: | fontforge glib2 |
Description
fontforge.app is not making it to the initial screen. It crashes with an illegal instruction. My Mac is very old and only has a Core 2 Duo processor T7700. OS is El Capitan 10.11.6. fontforge seems to be OK if run as a command line app.
This is not the crash reported in #57249. The crash may be in a library provided by or copied from glib2
I invoked Fontforge with the lldb script in Fontforge.app/Contents/MacOS. Here is the result
Script started on Sun Nov 10 20:28:21 2019 command: lldb -S debug-script "crashlog" and "save_crashlog" command installed, use the "--help" option for detailed help "malloc_info", "ptr_refs", "cstr_refs", "find_variable", and "objc_refs" commands have been installed, use the "--help" options on these commands for detailed help. (lldb) command source -s 0 'debug-script' Executing commands in '/Applications/FontForge.app/Contents/MacOS/debug-script'. (lldb) version lldb-360.1.70 (lldb) script print sys.version 2.7.10 (default, Oct 23 2015, 19:19:21) [GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] (lldb) settings set frame-format "frame #${frame.index}: ${frame.pc}{ ${module.file.basename}`${function.name-with-args}{${function.pc-offset}}}{ at ${line.file.basename}:${line.number}}\n" (lldb) target create /Applications/FontForge.app/Contents/Resources/opt/local/bin/fontforge Current executable set to '/Applications/FontForge.app/Contents/Resources/opt/local/bin/fontforge' (x86_64). (lldb) target select 0 Current targets: * target #0: /Applications/FontForge.app/Contents/Resources/opt/local/bin/fontforge ( arch=x86_64-apple-macosx, platform=host ) (lldb) #run -SkipPythonInitFiles (lldb) # please type the run command to start FontForge (lldb) # (lldb) # run (lldb) # (lldb) run Process 22576 launched: '/Applications/FontForge.app/Contents/Resources/opt/local/bin/fontforge' (x86_64) Process 22576 stopped * thread #1: tid = 0x8a816a, 0x0000000101502c40 libglib-2.0.0.dylib`g_hash_table_insert_node + 480, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) frame #0: 0x0000000101502c40 libglib-2.0.0.dylib`g_hash_table_insert_node + 480 libglib-2.0.0.dylib`g_hash_table_insert_node: -> 0x101502c40 <+480>: pmovzxdq -0x8(%rcx), %xmm0 ; xmm0 = mem[0],zero,mem[1],zero 0x101502c46 <+486>: pmovzxdq (%rcx), %xmm1 ; xmm1 = mem[0],zero,mem[1],zero 0x101502c4b <+491>: movdqu %xmm0, -0x10(%rdx) 0x101502c50 <+496>: movdqu %xmm1, (%rdx) (lldb) quit Script done on Sun Nov 10 20:28:35 2019
Change History (5)
comment:1 Changed 5 years ago by snowflake (Dave Evans)
comment:2 Changed 5 years ago by kencu (Ken)
I'm sorry to hear that. I have it running right now on MacOSX Tiger 10.4 PPC and it works just great, so it certainly runs on older systems!
You are getting a divide-by-zero error, if that makes you feel any better to know what is happening.
My first thought would be to build it from source on your hardware, and see if that works better for you:
sudo port -f uninstall fontforge sudo port -v destroot fontforge sudo port -v -s install fontforge
is how I would do that (destrooting it first often avoids needlessly building a great many build dependencies from source as well).
comment:3 Changed 5 years ago by snowflake (Dave Evans)
Are you sure it's a divide by zero?
According to https://www.felixcloutier.com/x86/pmovzx pmovzxdq instruction requires SSE4 cpu option, which my ancient Core 2 Duo T7700 does not have.
You obviously do not have the same problem on your PPC.
comment:4 Changed 5 years ago by snowflake (Dave Evans)
I seem to have got a bit confused. /Applications/FontForge.app is not a Macport! Silly me!
I realized this when I rebuilt glib2 with configure.cflags-append -march=core2
added to the Portfile. I then reinstalled fontforge from source and found that Fonforge.app still crashed. I then noticed that the dates of the files were 6 months old.
/opt/local/bin/fontforge
does work with my customized glib2 and it does open the GUI - which crashes when scrolling, but that's another known bug. #57249 . It's probably wise to leave my customized glib2 Portfile in place so that there is no chance of building it with instructions that are not available on my processor.
Version info: fontforge @20190801_1 ; glib2 @2.58.3