Menu

#165 Pymol r4111 crashes on Windows

v1.6.2.0
closed-fixed
None
5
2015-04-03
2015-03-18
No

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.

Discussion

  • Thomas Holder

    Thomas Holder - 2015-03-23

    svn rev 4113 removes some obsolete code that could have affected glew header import if you didn't define _PYMOL_OPENGL_SHADERS

     
  • Christoph Gohlke

    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:

    Index: pymol/layer0/ShaderMgr.h
    ===================================================================
    --- pymol/layer0/ShaderMgr.h    (revision 4113)
    +++ pymol/layer0/ShaderMgr.h    (working copy)
    @@ -26,30 +26,6 @@
     #ifdef WIN32
     PFNGLTEXIMAGE3DPROC getTexImage3D();
     PFNGLACTIVETEXTUREPROC getActiveTexture();
    -static PFNGLTEXIMAGE3DPROC glTexImage3D;
    -static PFNGLACTIVETEXTUREPROC glActiveTexture;
    -static PFNGLGENPROGRAMSARBPROC glGenProgramsARB;
    -static PFNGLBINDPROGRAMARBPROC glBindProgramARB;
    -static PFNGLDELETEPROGRAMSARBPROC glDeleteProgramsARB;
    -static PFNGLPROGRAMSTRINGARBPROC glProgramStringARB;
    -static PFNGLPROGRAMENVPARAMETER4FARBPROC glProgramEnvParameter4fARB;
    -static PFNGLGETPROGRAMIVARBPROC glGetProgramivARB;
    -static PFNGLGETPROGRAMIVARBPROC glGetProgramiv;
    -static PFNGLATTACHSHADERPROC glAttachShader;
    -static PFNGLGETSHADERINFOLOGPROC glGetShaderInfoLog;
    -static PFNGLGETSHADERIVPROC glGetShaderiv;
    -static PFNGLCOMPILESHADERPROC glCompileShader;
    -static PFNGLSHADERSOURCEPROC glShaderSource;
    -static PFNGLCREATESHADERPROC glCreateShader;
    -static PFNGLCREATEPROGRAMPROC glCreateProgram;
    -static PFNGLDELETEPROGRAMPROC glDeleteProgram;
    -static PFNGLDELETESHADERPROC glDeleteShader;
    -static PFNGLUSEPROGRAMPROC glUseProgram;
    -static PFNGLGETPROGRAMINFOLOGPROC glGetProgramInfoLog;
    -static PFNGLLINKPROGRAMPROC glLinkProgram;
    -static PFNGLUNIFORM1IPROC glUniform1i;
    -static PFNGLUNIFORM1FPROC glUniform1f;
    -static PFNGLGETUNIFORMLOCATIONPROC glGetUniformLocation;
     #endif
    
     /* END PROPRIETARY CODE SEGMENT */
    
     
  • Thomas Holder

    Thomas Holder - 2015-04-03

    thanks for the patch. Patch applied to svn rev 4114 (with modifications).

     
  • Thomas Holder

    Thomas Holder - 2015-04-03
    • status: open --> closed-fixed
    • assigned_to: Thomas Holder
     

Log in to post a comment.