1

I am trying to execute the following basic psychopy (version 2021.2.3) code through the Python 3.6.13 console:

import psychopy.visual as pv
pv.Window()

Which gives the following error.

*** stack smashing detected ***: <unknown> terminated
Aborted (core dumped)

The only related topic I can find is on the psychopy forum with no answers

I'm running this on an Ubuntu 18.04.05 machine. The machine is initialized as a headless server, but I am trying to run this through RDP.

I installed psychopy using pip inside a conda environment. Initially I was getting errors related to wxPython. When I manually installed wxPython from a whl file that error was resolved and error in this question appeared.

Mitchell van Zuylen
  • 3,905
  • 4
  • 27
  • 64

2 Answers2

0

My guess is that this is to do with the version of one of the libraries but very hard to tell from this limited info.

What version of PsychoPy are you trying to install and by what means are you installing it? Are you running from the app or is this a script you're trying to launch from the terminal? ie. trying to work out what parts of PsychoPy this is affecting (the app, the visual lib, the gui libs...?)

Jon
  • 1,198
  • 7
  • 8
  • Hi. I added the detail to my original question. It might be important that this Ubuntu was original initialized as a headless server, but I am trying to run `Psychopy` through RDP. It does show a window appearing just before crashing. Originally I was trying to run a script which caused this error, and recreated the error directly in a python console – Mitchell van Zuylen Sep 08 '21 at 01:25
  • I suspect that is important information, indeed. Most likely pyglet is failing in some part of the window creation (e.g. due to some part of the OpenGL spec not being available) and going into a spin. Glad to hear this isn't a general issue but I'm afraid I can't help you much beyond that. Note that using RDP is going to give you appalling timing - it isn't something we'd recommend or support – Jon Sep 08 '21 at 13:01
  • thanks for the heads-up about timing. In this case I'm only trying to get psychopy running because some analysis code implementation uses psychopy to render the stimuli to test a NN on. As such RDP should be fine (but is still a nightmare). I shall try to debug pyglet a little and get back to you if I find something. , but will likely just run this analaysis on my local machine. – Mitchell van Zuylen Sep 09 '21 at 00:05
0

I had a very similar problem on ubuntu 18.04.5, psychopy 3.2.4, no headless server. I suspect that the problem is general but ubuntu/drivers related.
My solution was to update the system and to install&switch to a proprietary NVIDIA driver.

Nat
  • 1