3-manifolds / SnapPy

SnapPy is a package for studying the topology and geometry of 3-manifolds, with a focus on hyperbolic structures. It is based on the SnapPea kernel written by Jeff Weeks.
https://snappy.computop.org/
84 stars 39 forks source link

macOS Catalina (10.15): app crashes when opening the preferences menu. #12

Closed NathanDunfield closed 4 years ago

NathanDunfield commented 4 years ago
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/snappy/app.py", line 450, in <module>
    main()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/snappy/app.py", line 446, in main
    terminal.window.mainloop()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/tkinter/__init__.py", line 1283, in mainloop
    self.tk.mainloop(n)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/snappy/app.py", line 99, in edit_prefs
    dialog = PreferenceDialog(self.window, self.prefs)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/snappy/preferences.py", line 98, in __init__
    self.build_font_pane(notebook)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/snappy/preferences.py", line 163, in build_font_pane
    self.current_family = families.index(current_font['family'])
ValueError: '.SF NS Mono' is not in list
culler commented 4 years ago

Sigh. Apple broke [NSFont monospacedSystemFontOfSize: weight:] in the first Catalina release. It returns a font named @'.SF NS Mono' but the NSFontManager will not accept that name. I filed a bug report with Apple on November 1, 2019. The current resolution is "Potential fix identified - For a future OS update" but several updates have come and gone with no fix. Tk used to use that call to get a default font. The bug was worked around in Tk quite a while ago, but we will need to update the Snappy App to use a current Tk 8.6.10 which has the workaround. I suggest the mac_styles branch, hopefully soon to be merged into core-8-6-branch (after I submit my TIP).

culler commented 4 years ago

Fixed in the current disk image, which is still being hosted on bitbucket.