psychopy.org | Reference | Downloads | Github

Psychopy 2021.2.0 crashing Python on experiment start

OS: Mac OS X 10.15.7 (19H15)
PsychoPy version: 2021.2.0
Standard Standalone? (y/n): standalone
What are you trying to achieve?: run experiment

Before today I was running psychopy 2020.1.2 just fine, however I wanted to upgrade to 2021.2.0 in order to use the new microphone recording features. Now, I can’t start any experiment locally - it crashes Python on experiment start. This happens both for an already-developed experiment, and a brand new one with just one routine added with a textbox. There’s no error in the psychopy output, but I get a system problem report (see below). Is this a psychopy issue or a me issue? I’ve already tried removing and re-adding input monitoring permissions and deleting the app and user preference config files just to see if it was a problem with those, but that didn’t help.

Process: python [1689]
Path: /Applications/PsychoPy.app/Contents/MacOS/python
Identifier: org.opensciencetools.psychopy
Version: 2021.2.0 (2021.2.0)
Code Type: X86-64 (Native)
Parent Process: PsychoPy [1648]
Responsible: PsychoPy [1648]
User ID: 501

Date/Time: 2021-07-02 12:18:45.810 -0400
OS Version: Mac OS X 10.15.7 (19H15)
Report Version: 12
Anonymous UUID: F837878E-7833-A548-A140-07C1F72B5F5D

Time Awake Since Boot: 1300 seconds

System Integrity Protection: enabled

Crashed Thread: 0 PTB mainthread Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY

Termination Signal: Illegal instruction: 4
Termination Reason: Namespace SIGNAL, Code 0x4
Terminating Process: exc handler [1689]

Application Specific Information:
BUG IN CLIENT OF LIBDISPATCH: dispatch_sync called on queue already owned by current thread
Invalid dylib load. Clients should not load the unversioned libcrypto dylib as it does not have a stable ABI.

Thread 0 Crashed:: PTB mainthread Dispatch queue: com.apple.main-thread
0 libdispatch.dylib 0x00007fff6ad499a5 DISPATCH_WAIT_FOR_QUEUE + 387
1 libdispatch.dylib 0x00007fff6ad49593 _dispatch_sync_f_slow + 171
2 PsychHID.cpython-36m-darwin.so 0x0000000108a3a446 PsychHIDOSKbQueueCreate + 182
3 PsychHID.cpython-36m-darwin.so 0x0000000108a35745 PSYCHHIDKbQueueCreate + 405
4 PsychHID.cpython-36m-darwin.so 0x0000000108a27448 PsychScriptingGluePythonDispatch + 1672
5 org.python.python 0x000000010837f7cb _PyCFunction_FastCallDict + 491
6 org.python.python 0x0000000108401747 0x108329000 + 886599
7 org.python.python 0x00000001083fdeb7 _PyEval_EvalFrameDefault + 27559
8 org.python.python 0x00000001084021af 0x108329000 + 889263
9 org.python.python 0x0000000108402ae1 0x108329000 + 891617
10 org.python.python 0x0000000108401721 0x108329000 + 886561
11 org.python.python 0x00000001083fdeb7 _PyEval_EvalFrameDefault + 27559
12 org.python.python 0x00000001084021af 0x108329000 + 889263
13 org.python.python 0x0000000108402dfb _PyFunction_FastCallDict + 763
14 org.python.python 0x00000001083366b7 _PyObject_FastCallDict + 247
15 org.python.python 0x00000001083367d5 _PyObject_Call_Prepend + 149
16 org.python.python 0x00000001083364f0 PyObject_Call + 96
17 org.python.python 0x0000000108397add 0x108329000 + 453341
18 org.python.python 0x0000000108393d09 0x108329000 + 437513
19 org.python.python 0x0000000108336685 _PyObject_FastCallDict + 197
20 org.python.python 0x0000000108401648 0x108329000 + 886344
21 org.python.python 0x00000001083fdeb7 _PyEval_EvalFrameDefault + 27559
22 org.python.python 0x00000001084021af 0x108329000 + 889263
23 org.python.python 0x0000000108402dfb _PyFunction_FastCallDict + 763
24 org.python.python 0x00000001083366b7 _PyObject_FastCallDict + 247
25 org.python.python 0x00000001083367d5 _PyObject_Call_Prepend + 149
26 org.python.python 0x00000001083364f0 PyObject_Call + 96
27 org.python.python 0x0000000108397add 0x108329000 + 453341
28 org.python.python 0x0000000108393d09 0x108329000 + 437513
29 org.python.python 0x0000000108336685 _PyObject_FastCallDict + 197
30 org.python.python 0x0000000108336ac5 _PyObject_FastCallKeywords + 197
31 org.python.python 0x0000000108401648 0x108329000 + 886344
32 org.python.python 0x00000001083fdf56 _PyEval_EvalFrameDefault + 27718
33 org.python.python 0x00000001084021af 0x108329000 + 889263
34 org.python.python 0x0000000108402ae1 0x108329000 + 891617
35 org.python.python 0x0000000108401721 0x108329000 + 886561
36 org.python.python 0x00000001083fdeb7 _PyEval_EvalFrameDefault + 27559
37 org.python.python 0x00000001084021af 0x108329000 + 889263
38 org.python.python 0x0000000108402dfb _PyFunction_FastCallDict + 763
39 org.python.python 0x00000001083366b7 _PyObject_FastCallDict + 247
40 org.python.python 0x00000001083367d5 _PyObject_Call_Prepend + 149
41 org.python.python 0x00000001083364f0 PyObject_Call + 96
42 org.python.python 0x0000000108397add 0x108329000 + 453341
43 org.python.python 0x0000000108393d09 0x108329000 + 437513
44 org.python.python 0x0000000108336685 _PyObject_FastCallDict + 197
45 org.python.python 0x0000000108401648 0x108329000 + 886344
46 org.python.python 0x00000001083fdeb7 _PyEval_EvalFrameDefault + 27559
47 org.python.python 0x00000001084021af 0x108329000 + 889263
48 org.python.python 0x00000001083f7244 PyEval_EvalCode + 100
49 org.python.python 0x000000010842d381 PyRun_FileExFlags + 209
50 org.python.python 0x000000010842cbf2 PyRun_SimpleFileExFlags + 882
51 org.python.python 0x0000000108446b12 Py_Main + 3554
52 python 0x0000000108320df8 0x108320000 + 3576
53 libdyld.dylib 0x00007fff6ad96cc9 start + 1

Thread 1:
0 libsystem_pthread.dylib 0x00007fff6af96b68 start_wqthread + 0

Thread 2:
0 libsystem_pthread.dylib 0x00007fff6af96b68 start_wqthread + 0

Thread 3:: AMCP Logging Spool
0 libsystem_kernel.dylib 0x00007fff6aed7e36 semaphore_wait_trap + 10
1 com.apple.audio.caulk 0x00007fff6496ab16 caulk::mach::semaphore::wait() + 16
2 com.apple.audio.caulk 0x00007fff6496a9b2 caulk::semaphore::timed_wait(double) + 106
3 com.apple.audio.caulk 0x00007fff6496a7c4 caulk::concurrent::details::worker_thread::run() + 30
4 com.apple.audio.caulk 0x00007fff6496a1e4 void* caulk::thread_proxy<std::__1::tuple<caulk::thread::attributes, void (caulk::concurrent::details::worker_thread::)(), std::__1::tuplecaulk::concurrent::details::worker_thread* > >(void) + 45
5 libsystem_pthread.dylib 0x00007fff6af9b109 _pthread_start + 148
6 libsystem_pthread.dylib 0x00007fff6af96b8b thread_start + 15

Thread 4:
0 libsystem_kernel.dylib 0x00007fff6aed7e36 semaphore_wait_trap + 10
1 com.apple.audio.caulk 0x00007fff6496ab16 caulk::mach::semaphore::wait() + 16
2 com.apple.audio.caulk 0x00007fff6496a9b2 caulk::semaphore::timed_wait(double) + 106
3 com.apple.audio.caulk 0x00007fff6496a7c4 caulk::concurrent::details::worker_thread::run() + 30
4 com.apple.audio.caulk 0x00007fff6496a1e4 void* caulk::thread_proxy<std::__1::tuple<caulk::thread::attributes, void (caulk::concurrent::details::worker_thread::)(), std::__1::tuplecaulk::concurrent::details::worker_thread* > >(void) + 45
5 libsystem_pthread.dylib 0x00007fff6af9b109 _pthread_start + 148
6 libsystem_pthread.dylib 0x00007fff6af96b8b thread_start + 15

Thread 5:
0 libsystem_pthread.dylib 0x00007fff6af96b68 start_wqthread + 0

Thread 6:
0 libsystem_pthread.dylib 0x00007fff6af96b68 start_wqthread + 0

Thread 7:
0 libsystem_pthread.dylib 0x00007fff6af96b68 start_wqthread + 0

Thread 8:
0 libsystem_pthread.dylib 0x00007fff6af96b68 start_wqthread + 0

Thread 9:
0 libsystem_pthread.dylib 0x00007fff6af96b68 start_wqthread + 0

Thread 10:
0 libsystem_pthread.dylib 0x00007fff6af96b68 start_wqthread + 0

Thread 11:: com.apple.NSEventThread
0 libsystem_kernel.dylib 0x00007fff6aed7dfa mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff6aed8170 mach_msg + 60
2 com.apple.CoreFoundation 0x00007fff30cdfef5 __CFRunLoopServiceMachPort + 247
3 com.apple.CoreFoundation 0x00007fff30cde9c2 __CFRunLoopRun + 1319
4 com.apple.CoreFoundation 0x00007fff30cdde3e CFRunLoopRunSpecific + 462
5 com.apple.AppKit 0x00007fff2e0f1954 _NSEventThread + 132
6 libsystem_pthread.dylib 0x00007fff6af9b109 _pthread_start + 148
7 libsystem_pthread.dylib 0x00007fff6af96b8b thread_start + 15

Thread 12:
0 libsystem_kernel.dylib 0x00007fff6aeda882 __psynch_cvwait + 10
1 libsystem_pthread.dylib 0x00007fff6af9b425 _pthread_cond_wait + 698
2 interpreter.so 0x0000000132cabdff th_worker(void*) + 191
3 libsystem_pthread.dylib 0x00007fff6af9b109 _pthread_start + 148
4 libsystem_pthread.dylib 0x00007fff6af96b8b thread_start + 15

Thread 13:
0 libsystem_kernel.dylib 0x00007fff6aeda882 __psynch_cvwait + 10
1 libsystem_pthread.dylib 0x00007fff6af9b425 _pthread_cond_wait + 698
2 interpreter.so 0x0000000132cabdff th_worker(void*) + 191
3 libsystem_pthread.dylib 0x00007fff6af9b109 _pthread_start + 148
4 libsystem_pthread.dylib 0x00007fff6af96b8b thread_start + 15

Thread 14:
0 libsystem_kernel.dylib 0x00007fff6aeda882 __psynch_cvwait + 10
1 libsystem_pthread.dylib 0x00007fff6af9b425 _pthread_cond_wait + 698
2 interpreter.so 0x0000000132cabdff th_worker(void*) + 191
3 libsystem_pthread.dylib 0x00007fff6af9b109 _pthread_start + 148
4 libsystem_pthread.dylib 0x00007fff6af96b8b thread_start + 15

Thread 15:
0 libsystem_kernel.dylib 0x00007fff6aeda882 __psynch_cvwait + 10
1 libsystem_pthread.dylib 0x00007fff6af9b425 _pthread_cond_wait + 698
2 interpreter.so 0x0000000132cabdff th_worker(void*) + 191
3 libsystem_pthread.dylib 0x00007fff6af9b109 _pthread_start + 148
4 libsystem_pthread.dylib 0x00007fff6af96b8b thread_start + 15

Thread 16:
0 libsystem_kernel.dylib 0x00007fff6aeda882 __psynch_cvwait + 10
1 libsystem_pthread.dylib 0x00007fff6af9b425 _pthread_cond_wait + 698
2 interpreter.so 0x0000000132cabdff th_worker(void*) + 191
3 libsystem_pthread.dylib 0x00007fff6af9b109 _pthread_start + 148
4 libsystem_pthread.dylib 0x00007fff6af96b8b thread_start + 15

Thread 17:
0 libsystem_kernel.dylib 0x00007fff6aeda882 __psynch_cvwait + 10
1 libsystem_pthread.dylib 0x00007fff6af9b425 _pthread_cond_wait + 698
2 interpreter.so 0x0000000132cabdff th_worker(void*) + 191
3 libsystem_pthread.dylib 0x00007fff6af9b109 _pthread_start + 148
4 libsystem_pthread.dylib 0x00007fff6af96b8b thread_start + 15

Thread 18:
0 libsystem_kernel.dylib 0x00007fff6aeda882 __psynch_cvwait + 10
1 libsystem_pthread.dylib 0x00007fff6af9b425 _pthread_cond_wait + 698
2 interpreter.so 0x0000000132cabdff th_worker(void*) + 191
3 libsystem_pthread.dylib 0x00007fff6af9b109 _pthread_start + 148
4 libsystem_pthread.dylib 0x00007fff6af96b8b thread_start + 15

Thread 19:
0 libsystem_kernel.dylib 0x00007fff6aeda882 __psynch_cvwait + 10
1 libsystem_pthread.dylib 0x00007fff6af9b425 _pthread_cond_wait + 698
2 interpreter.so 0x0000000132cabdff th_worker(void*) + 191
3 libsystem_pthread.dylib 0x00007fff6af9b109 _pthread_start + 148
4 libsystem_pthread.dylib 0x00007fff6af96b8b thread_start + 15

Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x001ffe9000000304 rbx: 0x00007ffee78dda10 rcx: 0x001ffe9000000304 rdx: 0x00007fff6ad70247
rdi: 0xff80002000000002 rsi: 0x0000002000000000 rbp: 0x00007ffee78dda00 rsp: 0x00007ffee78dd9e0
r8: 0x00007fff91490000 r9: 0x0000000000000013 r10: 0x0000003000000000 r11: 0x0060000000000000
r12: 0x00007ffee78ddac8 r13: 0x00007fff91490000 r14: 0x00007fff91490000 r15: 0x0000000108a3aaf0
rip: 0x00007fff6ad499a5 rfl: 0x0000000000010246 cr2: 0x0000000108a3a390

Logical CPU: 2
Error Code: 0x00000000
Trap Number: 6

1 Like

I’m having the same issue as well.
Tried to run a test trial with text presentation and the program crashes at the start.
(Using Standalone)

On of my undergraduates is reporting this same error. Seems to be some issues with the latest version of psychopy and mac OS X. I’m having them role back to [2021.1.4] to see if that helps for now.

At least in my case the fault is with the keyboard handling, for example

kb = keyboard.Keyboard()

crashes Psychopy. This is from the Coder’s Demos->input->keyNameFinder.py
Whereas demos that display visual stimuli but do not poll the keyboard work.

This is on macOS BigSur Macbook Pro (2016) and also on BigSur 11.4 M1 MacBook Pro (2020).

I have the exact same problem.
Running macOS Big Sur version 11.4 on a MacBook Air (2020).
Also tried to role back to [2021.1.4] but this sadly did not help.

I’m also having this problem! I’m very new to using PsychoPy so I wasn’t sure that I had done everything correctly. But it’s encouraging (?) to see that others are having the same system error that I’m having. Hopefully it’s fixed soon.

Rooslucas,
Does the following still not work for you even on 2021.1.4?

I’m guessing that the reason for the error is the following change noted in the Changelog:

  • Py: hardware.Keyboard class now supports ioHub as a backend and will use that in preference to Psychtoolbox keyboard (PsychHID) if ioHub has been started before the Keyboard is created. ioHub keyboard is similarly in performance but with fewer constraints (can handle a wider range of keyboards)

Unfortunately there seems to be no way to go back to Psychtoolbox keyboard without changing the source code (psychopy.hardware.keyboard — PsychoPy v2021.2)
@Becca

By editing the source code, I switched the keyboard from ioHub back to ‘ptb’ but that doesn’t fix the problem.
On my machine, the failure occurs at the following line of keyboard.py (around line 188):

buffer = _keyBuffers.getBuffer(devId, bufferSize)

However the code around there looks identical to that of Psychopy2021.1.4, especially in the context of Keyboard.backend = 'ptb' which I’ve now set, so I don’t know what the problem is.

Just here to say, I’m having the same issue!

fwiw, rolling back to 2021.1.4 did not work for me. I had to go back to a 2020 version entirely.

Hi There,
Thanks for flagging.
This is an issue the team were aware of, sorry it is affecting so many of you here! I need to check in on the status/progress - but watch this space and we will get back to you when we have an update!

Becca

1 Like

For me [2021.1.4] does work now. I had to change something in my settings: System Preferences > Security & Privacy > Input Monitoring and allow PsychoPy3. (Name error: name 'event' is not defined)

So rolling back to the earlier version does help for now.

1 Like

I have the same problem as smburns47. My Builder scrips that run just fine on 2021.1.4 (standalone) will not run on 2021.2.0 (standalone). I get the same error message as smburns47 reports. Even a bare-bones experiment (default with a default text component) crashes. Everything works if I reinstall 2021.1.4.
MacOS 11.4 (Big Sur),MacBook Pro (16-inch, 2019)

Hey there,

i am having the same problem as all of you above have reported (PsychoPy V2021.2.0 on WIN 10). My problem is, that going back to PsychoPy Version 2021.1.4 or older versoins doesn’t work either! At the moment, I am completely stuck and can’t go on with my work at all.

Has any solution or recommendation already been found?

Best,
Lea

Hi There,

The team have managed to put a fix in place for mac and that should be released in the next few days here Releases · psychopy/psychopy · GitHub - this is however the first time we are hearing of the issue on windows 10 - does that still happen if you completely install 2021.1.4 as a standalone version?

Becca

1 Like

Hello Becca,

I have uninstalled 2021.2.0 manually and installed 2021.1.4 as a standalone version, and now it works! Only installing 2021.1.4 and by doing that automatically deinstalling 2021.2.0 did not work, as it seems as if windows doesn’t really uninstall the program (although it is supposed to do so).

Thank you!
Lea

Hello,
I’m running window 10 and have the same problem. My experiment worked fine in v2021.1 but I updated to v2021.2 and the builder opens up with missing routines and the experiment doesnt run.

@Lealexandra What do you mean exactly by manually deinstalling or installing? can you specify the steps you took to make your experiment run again with v2021.1?

thankuuu!

That fixed it! For example, the keyNameFinder.py demo in Coder->Demos->Input now works!

1 Like