[visionegg] Re: muti-stim error

  • From: Andrew Straw <astraw@xxxxxxxxxxx>
  • To: visionegg@xxxxxxxxxxxxx
  • Date: Mon, 02 Feb 2009 15:18:49 -0800

John Christie wrote:
> That's great Andrew.  Scripts of my own that I've tested so far work
> fine so it's not an issue for me yet.  However, "moving on" for some
> won't be possible because there does not seem to be a version of
> pyopengl for Mac OS X and Python 2.5 for which this bug does not crop up.

Well, hopefully I'll be able to get to the bottom of this... It look
potentially related to the rather obscure GL_UNSIGNED_INT_8_8_8_8_REV
data type, so I guess this won't affect too many people.

> It's been present in all of the versions of 3.0.0b I've tried and I
> can't seem to find a 3.0.0a (which seemed to work fine).

I just checked with 3.0.0a6, and it has this issue, too. You can try for
yourself with
http://archive.ubuntu.com/ubuntu/pool/universe/p/pyopengl/pyopengl_3.0.0~a6.orig.tar.gz
(Ubuntu and Debian always make available the source code of the packages
their binaries were built with, together with the patches they used to
build them. This can be handy even if you're not using Ubuntu or Debian.
FYI, I found this using the packages.ubuntu.com search engine.)

> 
> On Feb 2, 2009, at 5:54 PM, Andrew Straw wrote:
> 
>> Hi John,
>>
>> Thanks for the bug report. On Ubuntu 8.04, I can reproduce this with
>> PyOpenGL 3.0.0b6, but it is not present with PyOpenGL 2.0.1.09. I can
>> workaround it by changing VisionEgg/Core.py line 475 to "if 0:" (from
>> "if gl_version >= '1.2' and hasattr(gl,'GL_BGRA'):").
>>
>> I'm going to dig deeper and determine if this is a bug with PyOpenGL or
>> the VE, but in the meantime, that's hopefully enough for you to move on.
>> I'll report it if it's a bug with PyOpenGL and fix it if it's a bug with
>> the VE.
>>
>> -Andrew
>>
>> John Christie wrote:
>>> HI,
>>>
>>> I think I've tried all the other demos but multi_stim.
>>>
>>> visionegg 1.1.2
>>> numpy 1.2.1
>>> pyopengl 3.0.0b8
>>>
>>> Mac OS X 10.5.6
>>>
>>>
>>> DC397:visionegg-1.1.2 demos jc$ python multi_stim.py
>>> 2009-02-02 16:39:01,190 (12012) INFO: Script multi_stim.py started
>>> Vision Egg 1.1.2 with process id 12012.
>>> 2009-02-02 16:39:06,581 (12012) INFO: Requesting window 640 x 480 32 bpp
>>> (8 8 8 0 RGBA).
>>> 2009-02-02 16:39:06,678 (12012) INFO: OpenGL 1.2 APPLE-1.5.36, Intel GMA
>>> X3100 OpenGL Engine, Intel Inc. (PyOpenGL 3.0.0b8)
>>> 2009-02-02 16:39:06,678 (12012) INFO: Video system reports 32 bpp (8 8 8
>>> 8 RGBA).
>>> 2009-02-02 16:39:07,446 (12012) CRITICAL: Traceback (most recent call
>>> last):
>>>  File "multi_stim.py", line 216, in <module>
>>>    framebuffer_copy_texture = Texture(
>>> texels=screen.get_framebuffer_as_image(format=gl.GL_RGBA) )
>>>  File
>>> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/visionegg-1.1.2-py2.5-macosx-10.3-fat.egg/VisionEgg/Core.py",
>>>
>>> line 441, in get_framebuffer_as_image
>>>    size=size,
>>>  File
>>> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/visionegg-1.1.2-py2.5-macosx-10.3-fat.egg/VisionEgg/Core.py",
>>>
>>> line 488, in get_framebuffer_as_array
>>>    fb_array = Numeric.reshape(fb_array,(size[1],size[0],4))
>>>  File
>>> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy-1.2.1-py2.5-macosx-10.3-fat.egg/numpy/oldnumeric/functions.py",
>>>
>>> line 97, in reshape
>>>    return np.reshape(a, shape)
>>>  File
>>> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy-1.2.1-py2.5-macosx-10.3-fat.egg/numpy/core/fromnumeric.py",
>>>
>>> line 145, in reshape
>>>    return reshape(newshape, order=order)
>>> ValueError: total size of new array must be unchanged
>>>
>>> Traceback (most recent call last):
>>>  File "multi_stim.py", line 216, in <module>
>>>    framebuffer_copy_texture = Texture(
>>> texels=screen.get_framebuffer_as_image(format=gl.GL_RGBA) )
>>>  File
>>> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/visionegg-1.1.2-py2.5-macosx-10.3-fat.egg/VisionEgg/Core.py",
>>>
>>> line 441, in get_framebuffer_as_image
>>>    size=size,
>>>  File
>>> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/visionegg-1.1.2-py2.5-macosx-10.3-fat.egg/VisionEgg/Core.py",
>>>
>>> line 488, in get_framebuffer_as_array
>>>    fb_array = Numeric.reshape(fb_array,(size[1],size[0],4))
>>>  File
>>> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy-1.2.1-py2.5-macosx-10.3-fat.egg/numpy/oldnumeric/functions.py",
>>>
>>> line 97, in reshape
>>>    return np.reshape(a, shape)
>>>  File
>>> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy-1.2.1-py2.5-macosx-10.3-fat.egg/numpy/core/fromnumeric.py",
>>>
>>> line 145, in reshape
>>>    return reshape(newshape, order=order)
>>> ValueError: total size of new array must be unchanged
>>> DC397:visionegg-1.1.2 demos jc$
>>>
>>>
>>> ======================================
>>> The Vision Egg mailing list
>>> Archives: //www.freelists.org/archives/visionegg
>>> Website: http://www.visionegg.org/mailinglist.html
>>
>>
>> -- 
>> Dr. Andrew D. Straw
>> California Institute of Technology
>> http://www.its.caltech.edu/~astraw/
>> ======================================
>> The Vision Egg mailing list
>> Archives: //www.freelists.org/archives/visionegg
>> Website: http://www.visionegg.org/mailinglist.html
> 
> ======================================
> The Vision Egg mailing list
> Archives: //www.freelists.org/archives/visionegg
> Website: http://www.visionegg.org/mailinglist.html


-- 
Dr. Andrew D. Straw
California Institute of Technology
http://www.its.caltech.edu/~astraw/
======================================
The Vision Egg mailing list
Archives: //www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html

Other related posts: