event.waitKeys() causing freezing issues

Hey @sol , updated the psychopy env and it has brought me back to the first error:

(ioWait_new_test) [ jeff @ ultron /users/jeff/.conda/envs/ioWait_new_test/lib/python3.6/site-packages/psychopy/demos/coder/iohub ] python keyboard.py
pygame 2.0.2 (SDL 2.0.16, Python 3.6.13)
Hello from the pygame community. https://www.pygame.org/contribute.html
 *** iohub warning: Display / Monitor unit type has not been set.
Traceback (most recent call last):
  File "keyboard.py", line 18, in <module>
    io = launchHubServer()
  File "/Users/jeff/.conda/envs/ioWait_new_test/lib/python3.6/site-packages/psychopy/contrib/lazy_import.py", line 120, in __call__
    return obj(*args, **kwargs)
  File "/Users/jeff/.conda/envs/ioWait_new_test/lib/python3.6/site-packages/psychopy/iohub/client/connect.py", line 290, in launchHubServer
    return ioHubConnection(iohub_config)
  File "/Users/jeff/.conda/envs/ioWait_new_test/lib/python3.6/site-packages/psychopy/iohub/client/__init__.py", line 289, in __init__
    raise RuntimeError('Error starting ioHub server: {}'.format(self.iohub_status))
RuntimeError: Error starting ioHub server: ioHub startup failed.
ioHub Server Process Completed With Code:  Negsignal.SIGSEGV

Both Psychopy and Terminal are both still allowed in my security preferences, so maybe that wasn’t related after all. The new env started with msgpack=1.0.2 already, and I downgraded to gevent=20.12.1 (same error occurred with the original gevent=21.8.0). Here’s a copy of the new env:

name: ioWait_new_test
channels:
  - conda-forge
  - defaults
dependencies:
  - appdirs=1.4.4=pyh9f0ad1d_0
  - arabic_reshaper=2.1.3=pyhd8ed1ab_0
  - astunparse=1.6.3=pyhd8ed1ab_0
  - backports=1.0=py_2
  - backports.lzma=0.0.14=py36hcf28acf_3
  - blosc=1.21.0=he49afe7_0
  - brotlipy=0.7.0=py36hfa26744_1001
  - bzip2=1.0.8=h0d85af4_4
  - c-ares=1.18.0=h0d85af4_0
  - ca-certificates=2021.10.8=h033912b_0
  - cairo=1.16.0=h0ab9d94_1001
  - certifi=2021.5.30=py36h79c6626_0
  - cffi=1.14.6=py36hbc36220_1
  - chardet=4.0.0=py36h79c6626_1
  - colorama=0.4.4=pyh9f0ad1d_0
  - configobj=5.0.6=py_0
  - configparser=5.0.2=pyhd8ed1ab_0
  - cryptography=35.0.0=py36ha6a00b0_0
  - cycler=0.10.0=py_2
  - decorator=4.4.2=py_0
  - dukpy=0.2.3=py36hfa26744_1
  - esprima-python=4.0.1=py_2001
  - et_xmlfile=1.0.1=py_1001
  - expat=2.4.1=he49afe7_0
  - ffmpeg=4.3.2=h4dad6da_1
  - fontconfig=2.13.1=h1027ab8_1000
  - freetype=2.10.4=h4cff582_1
  - freetype-py=2.2.0=pyh9f0ad1d_0
  - future=0.18.2=py36h79c6626_3
  - gettext=0.19.8.1=hd1a6beb_1008
  - gevent=20.12.1=py36h20b66c6_2
  - gitdb=4.0.9=pyhd8ed1ab_0
  - gitpython=3.1.18=pyhd8ed1ab_0
  - glfw=3.3.4=h0d85af4_0
  - glib=2.70.0=hcf210ce_1
  - glib-tools=2.70.0=hcf210ce_1
  - gmp=6.2.1=h2e338ed_0
  - gnutls=3.6.13=h756fd2b_1
  - graphite2=1.3.13=h2e338ed_1001
  - greenlet=1.1.2=py36hefe7e0e_0
  - harfbuzz=2.4.0=h92b87b8_1
  - hdf5=1.10.6=nompi_hc5d9132_1114
  - icu=58.2=h0a44026_1000
  - idna=2.10=pyh9f0ad1d_0
  - imageio=2.9.0=py_0
  - imageio-ffmpeg=0.4.5=pyhd8ed1ab_0
  - jasper=1.900.1=h636a363_1006
  - javascripthon=0.11=py_0
  - jbig=2.1=h0d85af4_2003
  - jpeg=9d=hbcb3906_0
  - json_tricks=3.15.5=pyhd8ed1ab_0
  - kiwisolver=1.3.1=py36hc61eee1_1
  - krb5=1.19.2=hcfbf3a7_2
  - lame=3.100=h35c211d_1001
  - lcms2=2.12=h577c468_0
  - lerc=3.0=he49afe7_0
  - libblas=3.9.0=12_osx64_openblas
  - libcblas=3.9.0=12_osx64_openblas
  - libcurl=7.79.1=hf45b732_1
  - libcxx=12.0.1=habf9029_0
  - libdeflate=1.8=h0d85af4_0
  - libedit=3.1.20191231=h0678c8f_2
  - libev=4.33=haf1e3a3_1
  - libffi=3.4.2=he49afe7_4
  - libflac=1.3.3=h046ec9c_1
  - libgfortran=5.0.0=9_3_0_h6c81a4c_23
  - libgfortran5=9.3.0=h6c81a4c_23
  - libglib=2.70.0=hf1fb8c0_1
  - libiconv=1.16=haf1e3a3_0
  - liblapack=3.9.0=12_osx64_openblas
  - liblapacke=3.9.0=12_osx64_openblas
  - libnghttp2=1.43.0=h6f36284_1
  - libogg=1.3.4=h35c211d_1
  - libopenblas=0.3.18=openmp_h3351f45_0
  - libopencv=4.4.0=py36_2
  - libopus=1.3.1=hc929b4f_1
  - libpng=1.6.37=h7cec526_2
  - libsndfile=1.0.31=he49afe7_1
  - libsodium=1.0.18=hbcb3906_1
  - libssh2=1.10.0=h52ee1ee_2
  - libtiff=4.3.0=hd146c10_2
  - libuv=1.42.0=h0d85af4_0
  - libvorbis=1.3.7=h046ec9c_0
  - libwebp-base=1.2.1=h0d85af4_0
  - libxml2=2.9.9=hd80cff7_2
  - libzlib=1.2.11=h9173be1_1013
  - llvm-openmp=12.0.1=hda6cdc1_1
  - lz4-c=1.9.3=he49afe7_1
  - macropy3=1.1.0b2=py_0
  - matplotlib=3.3.4=py36h79c6626_0
  - matplotlib-base=3.3.4=py36h4ea959b_0
  - mock=4.0.3=py36h79c6626_1
  - moviepy=1.0.1=py_0
  - msgpack-numpy=0.4.7.1=pyh9f0ad1d_0
  - msgpack-python=1.0.2=py36hc61eee1_1
  - ncurses=6.2=h2e338ed_4
  - nettle=3.6=hedd7734_0
  - numexpr=2.7.3=py36he43235d_0
  - numpy=1.19.5=py36h08b5fde_2
  - olefile=0.46=pyh9f0ad1d_1
  - opencv=4.4.0=py36_2
  - openh264=2.1.1=hfd3ada9_0
  - openjpeg=2.4.0=h6e7aa92_1
  - openpyxl=3.0.9=pyhd8ed1ab_0
  - openssl=1.1.1l=h0d85af4_0
  - packaging=21.0=pyhd8ed1ab_0
  - pandas=1.1.5=py36h2be6da3_0
  - pathlib2=2.3.6=py36h79c6626_0
  - pcre=8.45=he49afe7_0
  - pillow=8.3.2=py36h950f3bb_0
  - pip=21.3.1=pyhd8ed1ab_0
  - pixman=0.38.0=h01d97ff_1003
  - portaudio=19.6.0=he49afe7_4
  - proglog=0.1.9=py_0
  - psutil=5.8.0=py36hfa26744_1
  - psychopy=2021.2.3=py36h79c6626_0
  - pthread-stubs=0.4=hc929b4f_1001
  - py-opencv=4.4.0=py36h95af2a2_2
  - pycparser=2.20=pyh9f0ad1d_2
  - pyglet=1.5.16=py36h79c6626_0
  - pyglfw=2.3.0=py36h79c6626_0
  - pyobjc-core=7.3=py36hfa26744_2
  - pyobjc-framework-cocoa=7.3=py36h79c6626_0
  - pyobjc-framework-quartz=7.3=py36h79c6626_0
  - pyopengl=3.1.5=py_0
  - pyopenssl=21.0.0=pyhd8ed1ab_0
  - pyosf=1.0.5=py_2
  - pyparsing=3.0.1=pyhd8ed1ab_1
  - pypubsub=4.0.3=py_0
  - pyqmix=2021.1.2=py36h79c6626_0
  - pyqt=5.6.0=py36hc26a216_1008
  - pyserial=3.5=pyhd8ed1ab_0
  - pysocks=1.7.1=py36h79c6626_3
  - pysoundfile=0.10.3.post1=pyhd3deb0d_0
  - pytables=3.6.1=py36h256c1cb_3
  - python=3.6.13=haf480d7_2_cpython
  - python-bidi=0.4.2=py_0
  - python-dateutil=2.8.2=pyhd8ed1ab_0
  - python-gitlab=2.10.1=pyhd8ed1ab_0
  - python-sounddevice=0.4.1=pyh9f0ad1d_0
  - python.app=1.3=py36hfa26744_5
  - python_abi=3.6=2_cp36m
  - pytz=2021.3=pyhd8ed1ab_0
  - pyyaml=5.4.1=py36hfa26744_1
  - pyzmq=22.3.0=py36h50cd92c_0
  - qt=5.6.2=h822fa55_1013
  - questplus=2019.4=py_0
  - readline=8.1=h05e3726_0
  - requests=2.25.1=pyhd3deb0d_0
  - requests-toolbelt=0.9.1=py_0
  - ruamel.yaml=0.17.16=py36hfa26744_0
  - ruamel.yaml.clib=0.2.2=py36h20b66c6_2
  - scipy=1.5.3=py36h4f136de_1
  - setuptools=58.0.4=py36h79c6626_2
  - sip=4.18.1=py36h0a44026_1000
  - six=1.16.0=pyh6c4a22f_0
  - smmap=3.0.5=pyh44b312d_0
  - sqlite=3.36.0=h23a322b_2
  - tk=8.6.11=h5dbffcc_1
  - tornado=6.1=py36hfa26744_1
  - tqdm=4.62.3=pyhd8ed1ab_0
  - typing_extensions=3.10.0.2=pyha770c72_0
  - urllib3=1.26.7=pyhd8ed1ab_0
  - webassets=2.0=py_0
  - websocket-client=0.57.0=py36h79c6626_4
  - wheel=0.37.0=pyhd8ed1ab_1
  - wxpython=4.0.6=py36h1cd7e00_1
  - x264=1!161.3030=h0d85af4_1
  - xarray=0.18.2=pyhd8ed1ab_0
  - xlrd=2.0.1=pyhd8ed1ab_3
  - xz=5.2.5=haf1e3a3_1
  - yaml=0.2.5=haf1e3a3_0
  - zeromq=4.3.4=he49afe7_1
  - zlib=1.2.11=h9173be1_1013
  - zope.event=4.5.0=pyh9f0ad1d_0
  - zope.interface=5.4.0=py36hfa26744_0
  - zstd=1.5.0=h582d3a0_0
  - pip:
    - psychtoolbox==3.0.18.0
    - pygame==2.0.2
    - pyo==1.0.4
    - pyparallel==0.2.2
prefix: /Users/jeff/.conda/envs/ioWait_new_test