Psychopy3 (2020.1.3 version, PY2, x86) crash upon opening (Windows7)

Hi there
I installed and desinstalled several time either the standalone version of psychopy3 (PY2) x86, or the standalone version of psychopy3 x86. In both cases I obtain a crash at startup, a few seconds after launching psychopy either trough command line or through the windows icon. The windows of the app get initialized then python crashes silently.

  • The python.exe process disappears from the task manager upon crash (aka no window is hidden)
  • My computer is a dell latitude laptop running W7 (graphic card intel HD 520, drivers uptodate)
  • I went through the troubleshooting page. Here is the content of the last_app_load.log file
    I spent a couple of hours already reading all the “crash upon startup” entries I found in the forum to try different fixes but without any results unfortunately. I appreciate your help very much!

Traceback (most recent call last):
File “C:\Program Files (x86)\PsychoPy3_PY2\lib\runpy.py”, line 174, in run_module_as_main
main”, fname, loader, pkg_name)
File “C:\Program Files (x86)\PsychoPy3_PY2\lib\runpy.py”, line 72, in run_code
exec code in run_globals
File “C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\psychopy\app\psychopyApp.py”, line 104, in
main()
File “C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\psychopy\app\psychopyApp.py”, line 100, in main
start_app()
File “C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\psychopy\app\psychopyApp.py”, line 28, in start_app
app = PsychoPyApp(0, showSplash=showSplash)
File “C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\psychopy\app_psychopyApp.py”, line 210, in init
self.onInit(testMode=testMode, **kwargs)
File “C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\psychopy\app_psychopyApp.py”, line 350, in onInit
self.showBuilder(fileList=exps)
File “C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\psychopy\app_psychopyApp.py”, line 584, in showBuilder
self.newBuilderFrame()
File “C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\psychopy\app_psychopyApp.py”, line 566, in newBuilderFrame
from .builder.builder import BuilderFrame
File “C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\psychopy\app\builder\builder.py”, line 50, in
from .dialogs import (DlgComponentProperties, DlgExperimentProperties,
File "C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\psychopy\app\builder\dialogs_init
.py", line 31, in
from … validators import NameValidator, CodeSnippetValidator
File “C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\psychopy\app\builder\validators.py”, line 27, in
from pyglet.window import key
File "C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\pyglet\window_init
.py", line 1896, in
gl.create_shadow_window()
File "C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\pyglet\gl_init
.py", line 208, in create_shadow_window
shadow_window = Window(width=1, height=1, visible=False)
File "C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\pyglet\window\win32_init
.py", line 134, in init
super(Win32Window, self).init(*args, **kwargs)
File "C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\pyglet\window_init
.py", line 571, in init
self.create()
File "C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\pyglet\window\win32_init
.py", line 271, in create
self.switch_to()
File "C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\pyglet\window\win32_init
.py", line 317, in switch_to
self.context.set_current()
File “C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\pyglet\gl\win32.py”, line 216, in set_current
wgl.wglMakeCurrent(self.canvas.hdc, self._context)
WindowsError: exception: access violation reading 0x00000028
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File “C:\Program Files (x86)\PsychoPy3_PY2\lib\atexit.py”, line 24, in _run_exitfuncs
func(*targs, **kargs)
wxAssertionError: C++ assertion “GetEventHandler() == this” failed at …\src\common\wincmn.cpp(478) in wxWindowBase::~wxWindowBase(): any pushed event handlers must have been removed
Error in sys.exitfunc:
Traceback (most recent call last):
File “C:\Program Files (x86)\PsychoPy3_PY2\lib\atexit.py”, line 24, in _run_exitfuncs
func(*targs, **kargs)
wx._core.wxAssertionError: C++ assertion “GetEventHandler() == this” failed at …\src\common\wincmn.cpp(478) in wxWindowBase::~wxWindowBase(): any pushed event handlers must have been removed

Still stuck :slight_smile: - Any help appreciated very much

You could try 2020.2 which is now available to download.

Thanks a lot for the hint yet unfortunately 2020.2 also produces a crash error upon opening. Here is the output from the cmd window

C:\Users\pichons>“C:\Program Files\PsychoPy3\python.exe” -m psychopy.app.psychopyApp

pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\site-packages\pyglet_init_.py”, line 378, in getattr return getattr(self._module, name)
AttributeError: ‘NoneType’ object has no attribute ‘get_platform’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\runpy.py”, line 193, in run_module_as_main “main”, mod_spec)
File “C:\Program Files\PsychoPy3\lib\runpy.py”, line 85, in run_code exec(code, run_globals)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\psychopyApp.py”, line 104, in main()
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\psychopyApp.py”, line 100, in main start_app()
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\psychopyApp.py”, line 22, in start_app from psychopy.app.psychopyApp import PsychoPyApp
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app_psychopyApp.py”, line 23, in from . import themes
File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\themes_init
.py", line 1, in from .themes import ThemeMixin, IconCache
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\themes_themes.py”, line 30, in allCompons = components.getAllComponents() # ensures that the icons get checked
File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment\components_init
.py", line 59, in getAllComponents components = getComponents(fetchIcons=fetchIcons) # get the built-ins
File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment\components_init
.py", line 154, in getComponents module = import_module(explicit_rel_path, package=pkg)
File "C:\Program Files\PsychoPy3\lib\importlib_init
.py", line 126, in import_module return bootstrap.gcd_import(name[level:], package, level)
File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment\components\form_init
.py", line 12, in from psychopy.visual import form
File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\visual_init
.py", line 28, in from .button import ButtonStim
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\visual\button.py”, line 12, in from psychopy import event
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\event.py”, line 59, in default_display = pyglet.window.get_platform().get_default_display()
File “C:\Program Files\PsychoPy3\lib\site-packages\pyglet_init_.py”, line 384, in getattr import(import_name)
File “C:\Program Files\PsychoPy3\lib\site-packages\pyglet\window_init_.py”, line 1896, in gl.create_shadow_window()
File "C:\Program Files\PsychoPy3\lib\site-packages\pyglet\gl_init
.py", line 208, in create_shadow_window shadow_window = Window(width=1, height=1, visible=False)
File "C:\Program Files\PsychoPy3\lib\site-packages\pyglet\window\win32_init
.py", line 134, in init super(Win32Window, self).init(*args, **kwargs)
File "C:\Program Files\PsychoPy3\lib\site-packages\pyglet\window_init
.py", line 571, in init self.create()
File "C:\Program Files\PsychoPy3\lib\site-packages\pyglet\window\win32_init
.py", line 271, in create self.switch_to()
File "C:\Program Files\PsychoPy3\lib\site-packages\pyglet\window\win32_init
.py", line 317, in switch_to self.context.set_current()
File “C:\Program Files\PsychoPy3\lib\site-packages\pyglet\gl\win32.py”, line 216, in set_current wgl.wglMakeCurrent(self.canvas.hdc, self._context)
OSError: exception: access violation reading 0x0000000000000028

Swann,

Did this get resolved? I have a study participant who cant run the online experiment off their Windows 10 Dell PC, my study has a mp4 video, and I was wondering if this might be because of the same problem.

Kind Regards,

Unfortunately it has not been resolved yet to my knowledge in the standalone version of psychopy3.

Now I was not aware that this problem could also impact experiment ran online, which seems problematic …

Hi there,
I was just wondering if there is any update on this issue. This is the latest conversation reporting problem to run Psychopy version 3 on Windows7.
It is possible that this conversation moved somewhere else and I miss it?

The error above looks like it will occur due to poor graphics card drivers. It mentions failing while trying to create the Pyglet “shadow window”. Obviously we don’t want the PsychoPy app to crash as a result, so that’s something we need to look into at our end, but updating graphics card drivers (so as not to use Windows’ own drivers with very poor OpenGL support) should fix it.

I don’t believe this problem could have any impact on online studies. @darcyen I’m sure your issue is entirely unrelated

@swann_pichon you mentioned “graphic card intel HD 520, drivers up to date” but did you install the driver from Intel or do you just mean the Windows drivers are up to date? There is a long-standing issue Microsoft often provides its own drivers but with poor OpenGL (they have a microsoft-only alternative to OpenGL called DirectX and you might think they aren’t keen to support OpenGL too heavily). Make sure you have the drivers from the card manufacturer instead

Dear Jon, I moved my laptop from W7 to W10 and this solved the issue. Psychopy 2021.1.2 runs fine now =) To answer your question, updating my former W7 configuration with the latest DELL driver for my DELL manufactured intel 520 graphic card had not solve the issue with Psychopy 2020.1.3. Thanks for the great work you do