Using pymol svn rev 4111, built with msvc9, icl 14.0.5, Python-2.7.9, freeglut-3.0.0, glew-1.12.0, libpng-1.6.16, freetype-2.5.5, and numpy-1.9.2.
python.exe -m pymol.__init__ crashes with "Unhandled exception at 0x00000000" when calling glCreateProgram() at http://sourceforge.net/p/pymol/code/HEAD/tree/trunk/pymol/layer0/ShaderMgr.cpp#l1299
The crash occurs with 32 and 64 bit binaries tested on three different computer running Windows 7 or 8.1, 64 bit, with two different NVidia cards (347.88 drivers) and a ATI card.
The crash does not occur when running via remote desktop or when disabling shaders at http://sourceforge.net/p/pymol/code/HEAD/tree/trunk/pymol/layer0/ShaderMgr.cpp#l755
The crash does not occur with svn rev 4088, built with the same compiler and libraries. Shaders do work.
The application error is:
Faulting application name: python.exe, version: 0.0.0.0, time stamp: 0x5488acd7
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0xc0000005
Fault offset: 0x0000000000000000
Faulting process id: 0x63d70
Faulting application start time: 0x01d061c9ae5a2460
Faulting application path: X:\Python27-x64\python.exe
Faulting module path: unknown
The call stack is:
_cmd.pyd!CShaderPrg_New(_PyMOLGlobals * G=0x0000000006b62df0, const char * name=0x0000000007d2e4ac, const char * v=0x000000000a464cc8, const char * f=0x0000000006c4d958) Line 1299 C++
_cmd.pyd!ShaderMgrConfig(_PyMOLGlobals * G=0x0000000006b62df0) Line 781 + 0xa4 bytes C++
_cmd.pyd!PyMOL_ConfigureShadersGL_WithoutLock(_CPyMOL * I=0x0000000006b5ebd0) Line 2179 C++
_cmd.pyd!PyMOL_ConfigureShadersGL(_CPyMOL * I=0x0000000006b5ebd0) Line 2187 C++
_cmd.pyd!MainInit(_PyMOLGlobals * G=0x0000000006b62df0) Line 1041 C++
_cmd.pyd!launch(_CPyMOLOptions * options=0x0000000006b62940, int own_the_options=1) Line 1634 C++
_cmd.pyd!main_common() Line 1736 C++
_cmd.pyd!main_shared(int block_input_hook=1) Line 1718 + 0x5 bytes C++
_cmd.pyd!CmdRunPyMOL(_object * self=0x0000000001d451e8, _object * args=0x0000000006b105c8) Line 4553 + 0xa bytes C++
python27.dll!000000001e0c3d09()
[Frames below may be incorrect and/or missing, no symbols loaded for python27.dll]
python27.dll!000000001e1145d4()
...
msvcr90.dll!000000006dc32fdf()
msvcr90.dll!000000006dc33080()
kernel32.dll!00007ffee2e013d2()
ntdll.dll!00007ffee36de954()
The program output before the crash is:
PyMOL(TM) Molecular Graphics System, Version 1.7.5.0.
Copyright (c) Schrodinger, LLC.
All Rights Reserved.
Created by Warren L. DeLano, Ph.D.
PyMOL is user-supported open-source software. Although some versions
are freely available, PyMOL is not in the public domain.
If PyMOL is helpful in your work or study, then please volunteer
support for our ongoing efforts to create open and affordable scientific
software by purchasing a PyMOL Maintenance and/or Support subscription.
More information can be found at "http://www.pymol.org".
Enter "help" for a list of commands.
Enter "help <command-name>" for information on a specific command.
Hit ESC anytime to toggle between text and graphics.
Detected OpenGL version 2.0 or greater. Shaders available.
could this be a glew linking problem?
http://www.gamedev.net/topic/640668-resolved-called-glewinit-but-glcreateprogram-still-crashes-my-application/#entry5046407
svn rev 4113 removes some obsolete code that could have affected glew header import if you didn't define _PYMOL_OPENGL_SHADERS
Thank you Thomas. I already checked that the correct GLEW headers, libraries and defines are used. Anyway, I could track the segfault to the following static declarations in ShaderMgr.h. This patch works for me with rev 4113:
thanks for the patch. Patch applied to svn rev 4114 (with modifications).