Using current pymol svn at r4042 built on darwin12 using the clang compilers, when pymol is started with '-v' passed to python2.7 such as…
PYMOL_PATH=/sw/lib/python2.7/site-packages/pymol
export PYMOL_PATH
exec /sw/bin/python2.7 -v /sw/lib/python2.7/site-packages/pymol/init.py
this causes python2.7 to segfault. Removing the '-v' in the startup command for pymol 1.6.0 makes the crash go latent again. This issue doesn't exist in the pymol 1.5.x releases.
This backtraces with…
$ gdb /sw/bin/python2.7
$ (gdb) r -v /sw/lib/python2.7/site-packages/pymol/init.py
as
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
0x000000010115bcb2 in CGORenderGL ()
(gdb) bt
0 0x000000010115bcb2 in CGORenderGL ()
1 0x000000010117d75e in OrthoRenderCGO ()
2 0x000000010117d670 in OrthoDoDraw ()
3 0x00000001012d9ca7 in ExecutiveDrawNow ()
4 0x000000010133ef65 in PyMOL_DrawWithoutLock ()
5 0x000000010132d714 in MainDrawLocked ()
6 0x000000010132e877 in MainDraw ()
7 0x0000000101a80729 in fghcbDisplayWindow ()
8 0x0000000101a83d41 in fgEnumWindows ()
9 0x0000000101a800bc in glutMainLoopEvent ()
10 0x0000000101a80325 in glutMainLoop ()
11 0x000000010132decc in main_common ()
12 0x000000010132e00c in main_shared ()
13 0x0000000101322f87 in CmdRunPyMOL ()
14 0x00000001000a3157 in PyEval_EvalFrameEx ()
15 0x00000001000a11d6 in PyEval_EvalCodeEx ()
16 0x00000001000a7fa6 in fast_function ()
17 0x00000001000a437f in PyEval_EvalFrameEx ()
18 0x00000001000a11d6 in PyEval_EvalCodeEx ()
19 0x00000001000a0b06 in PyEval_EvalCode ()
20 0x00000001000c81f1 in PyRun_FileExFlags ()
21 0x00000001000c7d3e in PyRun_SimpleFileExFlags ()
22 0x00000001000d9e00 in Py_Main ()
23 0x00007fff93a907e1 in start ()
(gdb)
Backtrace with object files for -g build of pymol r4042 present
Using the static analyzer in clang on layer1/CGO.c as…
reveals…
layer1/CGO.c:487:3: warning: Dereference of null pointer
VLACheck(I->op, float, I->c + c);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
layer1/CGO.c:1220:17: warning: Dereference of null pointer
(pc++) = (n1++); / normals @ +14 /
^~~~~~~
layer1/CGO.c:1476:11: warning: Assigned value is garbage or undefined
(pc++) = (v++);
^ ~~~~~~
layer1/CGO.c:1749:10: warning: Dereference of null pointer
(nc++) = (pc - 1);
~~~~~~~~^~~~~~~~~~~
layer1/CGO.c:1763:10: warning: Dereference of null pointer
(nc++) = (pc - 1);
~~~~~~~~^~~~~~~~~~~
layer1/CGO.c:1775:10: warning: Dereference of null pointer
(nc++) = (pc - 1);
~~~~~~~~^~~~~~~~~~~
layer1/CGO.c:1787:10: warning: Dereference of null pointer
(nc++) = (pc - 1);
~~~~~~~~^~~~~~~~~~~
layer1/CGO.c:1799:10: warning: Dereference of null pointer
(nc++) = (pc - 1);
~~~~~~~~^~~~~~~~~~~
layer1/CGO.c:1809:15: warning: Dereference of null pointer
(nc++) = (pc - 1);
~~~~~~~~^~~~~~~~~~~
layer1/CGO.c:1946:23: warning: Dereference of undefined pointer value
normalVals[pl] = pc[0]; normalVals[pl+1] = pc[1]; normalVals[pl+2] = pc[2];
~~~~~~~~~~~~~~~^~~~~~~
layer1/CGO.c:1950:23: warning: Array access (from variable 'colorVals') results in a null pointer dereference
colorVals[plc] = pc[0]; colorVals[plc+1] = pc[1]; colorVals[plc+2] = pc[2]; colorVals[plc+3] = I->alpha;
~~~~~~~~~ ^
layer1/CGO.c:1955:8: warning: Dereference of null pointer
CGO_put_int(&pickColorVals[pla * 2], CGO_get_int(pc));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
layer1/CGO.c:2577:8: warning: Function call argument is an uninitialized value
SetVertexValuesForVBO(I->G, cgo, arrays, pl, plc, cnt, incr++,
^
layer1/CGO.c:2887:8: warning: Function call argument is an uninitialized value
SetVertexValuesForVBO(G, cgo, arrays, pl, plc, 0, incr++,
^
layer1/CGO.c:4395:13: warning: Branch condition evaluates to a garbage value
FreeP(org_colorVals);
^~~~~~~~~~~~~
layer1/CGO.c:4558:10: warning: Dereference of null pointer
(nc++) = (npc - 1);
~~~~~~~~^~~~~~~~~~~~
layer1/CGO.c:5167:23: warning: Array access (from variable 'colorVals') results in a null pointer dereference
colorVals[plc] = pc[0]; colorVals[plc+1] = pc[1];
~~~~~~~~~ ^
layer1/CGO.c:5187:3: warning: Dereference of null pointer
CGO_put_int(pickColorVals + pla * 2, cgo->current_pick_color_index);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
layer1/CGO.c:6209:8: warning: Branch condition evaluates to a garbage value
if (vertexVals){
^~~~~~~~~~
layer1/CGO.c:6522:11: warning: Branch condition evaluates to a garbage value
if (vertexVals){
^~~~~~~~~~
layer1/CGO.c:7980:13: warning: Branch condition evaluates to a garbage value
if (normalVals_tmp){
^~~~~~~~~~~~~~
layer1/CGO.c:8008:11: warning: Branch condition evaluates to a garbage value
if (normalVals_tmp){
^~~~~~~~~~~~~~
layer1/CGO.c:8047:11: warning: Branch condition evaluates to a garbage value
if (normalVals_tmp){
^~~~~~~~~~~~~~
layer1/CGO.c:9429:16: warning: Dereference of null pointer
(nc++) = (pc - 1);
~~~~~~~~^~~~~~~~~~~
layer1/CGO.c:9449:15: warning: Dereference of null pointer
(nc++) = (pc - 1);
~~~~~~~~^~~~~~~~~~~
layer1/CGO.c:9465:12: warning: Memory is never released; potential leak of memory pointed to by 'cgo'
return NULL;
^~~~