Bug 694

Summary: BufferUnderflowException in gluScaleImage
Product: [JogAmp] Jogl Reporter: Julien Gouesse <gouessej>
Component: openglAssignee: Sven Gothel <sgothel>
Status: RESOLVED INVALID    
Severity: normal    
Priority: ---    
Version: 2   
Hardware: All   
OS: all   
Type: --- SCM Refs:
b29f221c903aefdf99af8e8a8544b2223036454f
Workaround: ---

Description Julien Gouesse 2013-02-24 17:23:08 CET
GLUgl2.gluScaleImage(GL.GL_LUMINANCE,213,213,GL.GL_UNSIGNED_BYTE,inBuf, 256,256,GL.GL_UNSIGNED_BYTE,outBuf) throws an exception (inBuf has a capacity of 45369 bytes and outBuf has a capacity of 66560 bytes) when using the default Java implementation of GLU.

My graphics card is an ATI Radeon 9250 Pro, I'm under Mageia Linux 2. I use OpenJDK 1.7 update 6.

Display Vendor: Tungsten Graphics, Inc.
Display Renderer: Mesa DRI R200 (RV280 5C61) x86/MMX+/3DNow!+/SSE TCL DRI2
Display Version: 1.3 Mesa 8.0.4

I'll commit a unit test very soon.
Comment 1 Julien Gouesse 2013-02-24 17:29:19 CET
The unit test is this pull request:
https://github.com/sgothel/jogl/pull/59
Comment 2 Sven Gothel 2013-03-09 03:44:52 CET
http://jogamp.org/git/?p=jogl.git;a=commit;h=b29f221c903aefdf99af8e8a8544b2223036454f

The unpack alignment has to be considered, see fixed unit test.

Wade's test you used as a boiler plate worked, since he used a multiple of 4,
which is the default unpack alignment.