Mystery Shader linking error

Reported by bonzairob on 2012-02-18
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
PyGL3Display
Undecided
Unassigned

Bug Description

Here's the traceback:

C:\Documents and Settings\Administrator\My Documents\Downloads\PyGL3Display1.9-alpha3\examples>python2.6 criticalMass.py
Traceback (most recent call last):
  File "criticalMass.py", line 169, in <module>
    main()
  File "criticalMass.py", line 151, in main
    x = Level(10, (400,400))
  File "criticalMass.py", line 123, in __init__
    self.ballImg = LoadImage('ball.png')
  File "..\PyGL3Display\pygamesprites.py", line 71, in LoadImage
    return cls.Surfaceify(pygame.image.load(*args, **kwargs))
  File "..\PyGL3Display\pygamesprites.py", line 78, in Surfaceify
    Surface.__init__(ret, pygameSurface.get_size())
  File "..\PyGL3Display\twodimages.py", line 40, in __init__
    manager = SpriteCommon.defaultManager if manager is None else manager
  File "..\PyGL3Display\twodspriteinfrastructure.py", line 80, in __getattr__
    shader=cls.defaultShader)
  File "..\PyGL3Display\twodspriteinfrastructure.py", line 83, in __getattr__
    cls.makeDefaultShader()
  File "..\PyGL3Display\twodspriteinfrastructure.py", line 149, in MakeDefaultShader
    cls.defaultShader = SpriteShader(cls.defaultVertexArrays)
  File "..\PyGL3Display\twodspriteinfrastructure.py", line 213, in __init__
    fragmentProgs=[fragmentProg])
  File "..\PyGL3Display\twodshaders.py", line 157, in __init__
    super(TwoDTexturedShader, self).__init__(**kwargs)
  File "..\PyGL3Display\twodshaders.py", line 115, in __init__
    **kwargs)
  File "..\PyGL3Display\sharedinfrastructure.py", line 417, in __init__
    self.setup()
  File "..\PyGL3Display\sharedinfrastructure.py", line 439, in setup
    GLCommon.useProgram(self)
  File "..\PyGL3Display\sharedinfrastructure.py", line 538, in useProgram
    glUseProgram(program.shaderProgram)
  File "C:\Python26\lib\site-packages\OpenGL\platform\baseplatform.py", line 335, in __call__
    return self( *args, **named )
  File "C:\Python26\lib\site-packages\OpenGL\error.py", line 208, in glCheckError
    baseOperation = baseOperation,
OpenGL.error.GLError: GLError(
        err = 1282,
        description = 'invalid operation',
        baseOperation = glUseProgram,
        cArguments = (5L,)
)
Exception AttributeError: "'PygameSurface' object has no attribute 'atlas'" in <bound method PygameSurface.__del__ of <PyGL3Display.pygamesprites.PygameSurfaceobject at 0x01AFA650>> ignored

All of the demos seem to have the same issue for me :(
Windows XP, Python2.6, Pygame 1.9, PyOpenGL 3.0.1
ATi Radeon X800 PRO/GTO
Catalyst version 10.2

Thanks!

description: updated
David Griffin (habilain) on 2012-02-18
summary: - GLError and Pygame Surface AttributeError
+ GLError and PygameSurface AttributeError
summary: - GLError and PygameSurface AttributeError
+ Mystery GLError

OK, the second of the errors is irrelevant; the error is happening during an init, preventing all of the attributes of that object from being instantiated. Then the GLError causes the program to crash and call the __del__ method, which is assuming init completed.

I'm not entirely certain what's going on. At a guess (and it really is a guess), I suspect that the shader isn't linking properly - but this should raise an error. Or at least that's what I thought...

Anyways, I've got a fair bit on my plate at the moment, but when I get a chance I'll see if I can upload something which will specifically detect if this is the case.

David Griffin (habilain) wrote :

Right. I've implemented a specific check for linker errors and it's currently in the trunk (revision 63). I'm not going to be releasing another build yet (the work I've done towards the next batch of new features is strictly backend stuff), so if you could check out and try running an example from the trunk, *hopefully* the error message will change and I'll be able to find out exactly what's going on.

David Griffin (habilain) wrote :

Marked as incomplete until there is more information on this.

Changed in pygl3display:
status: New → Incomplete
Alan Bourke (alanpbourke) wrote :

I'm getting this too, on the latest trunk as of today (68). A couple of samples like the 'lines' one run OK but criticalMass, for example, throws a similar error to the above.

Ubuntu 12.04 in a Virtualbox VM.

Traceback:

OpenGL Warning: vboxCall failed with VBox status code -54

OpenGL Warning: SHCRGL_GUEST_FN_WRITE_READ (67108924) failed with 0 fffffffe

OpenGL Warning: vboxCall failed with VBox status code -54

OpenGL Warning: SHCRGL_GUEST_FN_WRITE_READ (67108924) failed with 0 fffffffe

Traceback (most recent call last):
  File "/home/alanb/Aptana Studio 3 Workspace/PyGL3Display/examples/criticalMass.py", line 169, in <module>
    main()
  File "/home/alanb/Aptana Studio 3 Workspace/PyGL3Display/examples/criticalMass.py", line 151, in main
    x = Level(10, (400,400))
  File "/home/alanb/Aptana Studio 3 Workspace/PyGL3Display/examples/criticalMass.py", line 123, in __init__
    self.ballImg = loadImage('ball.png')
  File "../PyGL3Display/pygameimages.py", line 80, in loadImage
    return cls.surfaceify(pygame.image.load(*args, **kwargs))
  File "../PyGL3Display/pygameimages.py", line 89, in surfaceify
    ret.upload(pygameSurface)
  File "../PyGL3Display/pygameimages.py", line 75, in upload
    Image.upload(self, self.rawimage)
  File "../PyGL3Display/twodspriteinfrastructure.py", line 468, in upload
    self.atlas.uploadToBox(image, self.redrawData)
  File "../PyGL3Display/twodspriteinfrastructure.py", line 428, in uploadToBox
    GL_RGBA, GL_UNSIGNED_BYTE, data)
  File "/usr/lib/pymodules/python2.7/OpenGL/latebind.py", line 45, in __call__
    return self._finalCall( *args, **named )
  File "/usr/lib/pymodules/python2.7/OpenGL/wrapper.py", line 791, in wrapperCall
    raise err
OpenGL.error.GLError: GLError(
 err = 1282,
 description = 'invalid operation',
 baseOperation = glTexSubImage2D,
 pyArgs = (
  GL_TEXTURE_2D,
  0,
  0,
  0,
  100,
  100,
  GL_RGBA,
  GL_UNSIGNED_BYTE,
  '\xff\xff\xff\x00\xff\xff\xff\x00\xff...,
 ),
 cArgs = (
  GL_TEXTURE_2D,
  0,
  0,
  0,
  100,
  100,
  GL_RGBA,
  GL_UNSIGNED_BYTE,
  '\xff\xff\xff\x00\xff\xff\xff\x00\xff...,
 ),
 cArguments = (
  GL_TEXTURE_2D,
  0,
  0,
  0,
  100,
  100,
  GL_RGBA,
  GL_UNSIGNED_BYTE,
  '\xff\xff\xff\x00\xff\xff\xff\x00\xff...,
 )
)

David Griffin (habilain) on 2012-04-30
summary: - Mystery GLError
+ Mystery Shader not linking error
summary: - Mystery Shader not linking error
+ Mystery Shader linking error
David Griffin (habilain) wrote :

That's a completely different error. I've created a new bug for it: https://bugs.launchpad.net/pygl3display/+bug/991959 and changed the title of this bug to be less confusing.

David Griffin (habilain) wrote :

Marked this bug as invalid, as no information has been given on it, and it hasn't been reproduced.

Changed in pygl3display:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers