[Pythonmac-SIG] ctypes MemoryError when attempting to launch notarized app

Glyph glyph at twistedmatrix.com
Sun Oct 28 01:27:43 EDT 2018


I adjusted my code-signing to use the new, stricter requirements imposed by app notarization.  I managed to get it successfully notarized, but the app is now non-functional as a result: at startup, I get:

Traceback (most recent call last):
  File "my.app/Contents/Resources/__boot__.py", line 93, in <module>
    _setup_ctypes()
  File "my.app/Contents/Resources/__boot__.py", line 86, in _setup_ctypes
    from ctypes.macholib import dyld
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
  File "ctypes/__init__.pyc", line 538, in <module>
  File "ctypes/__init__.pyc", line 273, in _reset_cache

(If anyone wants to follow along in the traceback, this is using python.org <http://python.org/> 3.6.6.)

This happens before any of my code even runs, so I can't just try to avoid ctypes.

Curiously, this is the same traceback that comes from https://forum.kodi.tv/showthread.php?tid=329171 <https://forum.kodi.tv/showthread.php?tid=329171>, which suggests it's something fundamental to strict shared-library sandboxing that ctypes trips over when trying to initialize itself.

Does anyone have experience with this, or ideas about what to do?

-glyph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20181027/570b723b/attachment.html>


More information about the Pythonmac-SIG mailing list