Open justvanrossum opened 1 year ago
when CheckEventQueueForUserCancel
is True it fails and crashes
https://github.com/typemytype/drawbot/blob/master/drawBot/scriptTools.py#L110
the rest of the code in side that if statement seems to work fine (did this silly test):
I currently cannot get it to not crash, even with Python 3.7, even though the 3.128 release works perfectly.
what OS?
it crashes every time when esc
or cmd .
on M1 Ventura
Ok, this is unfortunately related to py2app: it works with py2app==0.25
but crashes with py2app==0.26
and later.
Browsing through https://github.com/ronaldoussoren/py2app/compare/v0.25...v0.26 so far doesn't give me any clues.
it crashes every time when esc or cmd . on M1 Ventura
Same here, unless I downgrade py2app to 0.25
(which also requires downgrading setuptools to something older).
strange, DB is building the function from the Carbon library with ctypes
https://github.com/typemytype/drawbot/blob/master/drawBot/scriptTools.py#L24-L26
the minimal setup to make it crash, in the main loop, however this works in terminal
import ctypes
from ctypes.util import find_library
_carbonPath = find_library("Carbon")
CheckEventQueueForUserCancel = ctypes.CFUNCTYPE(ctypes.c_bool)(('CheckEventQueueForUserCancel', ctypes.CDLL(_carbonPath)))
while not CheckEventQueueForUserCancel():
pass
In terminal there is no event loop, so that is to be expected.
I've been trying to make a minimal Cocoa app to reproduce, but I'm failing so far.
Type command-period while the above is running. It exists with a hard crash
Illegal instruction: 4