Wednesday, May 6, 2009

wxpython with python 2.6 crashes in Windows Vista

Solution found in: http://www.python-forum.org/pythonforum/viewtopic.php?f=4&t=11331#p54621

To fix this, do the following:

* Make a copy of python.exe
* Use that copy(!) to run 'update_manifest.py' that wxPython installed in you python folder

The problem is that by default a wrong DLL version is loaded, this causes crashes in the wxWidget C++ code. In Python 2.5 and earlier the presence of the python.exe.manifest (installed by wxPython) was enough to fix this, but Python 2.6 is compiled with internal manifests, so external manifest don't work. The script will update the internal manifest so the right DLL is loaded.

You need to use a copy of python.exe to execute the script, because otherwise the program is in use and cannot be updated. After updating the manifest the program should no longer crash on mouse-events (worked for me).

No comments: