[Pyrex] Bug? SystemError: error return without exception set

Charles Moad cmoad at indiana.edu
Mon Dec 13 17:20:22 CET 2004


The subject is the same as one already in the list with the same
problem.  Someone posted a patch, but it appears the correction has been
made in the latest version of pyrex.  I am getting the error:

Traceback (most recent call last):
  File "./test.py", line 140, in ?
    initShader('mandelbrot.frag')
  File "./test.py", line 104, in initShader
    print glGetActiveUniformARB(shaderProgram, 1)
SystemError: error return without exception set

And the c code has appearance of returning 0:

 __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_programObj);
  Py_DECREF(__pyx_v_index);
  return __pyx_r;
}

Here is the pyrex code generating the error:

cdef extern c_glGetActiveUniformARB "glGetActiveUniformARB"(GLhandleARB
programObj, GLuint index, GLsizei maxLength, GLsizei* length, GLint
*size, GLenum *type, GLcharARB *name)
def glGetActiveUniformARB(programObj, index):
   cdef GLsizei maxLength
   cdef GLint size
   cdef GLenum type
   cdef GLcharARB *name

   c_glGetObjectParameterivARB(programObj,
GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB, &maxLength)
   name = <GLcharARB*>PyMem_Malloc(maxLength+1)
   c_glGetActiveUniformARB(programObj, index, maxLength, NULL, &size,
&type, name)

   return (size, type, name)


Any help would be greatly appreciated!

-- 
Charles Moad <cmoad at indiana.edu>




More information about the Pyrex mailing list