Bug 694 - BufferUnderflowException in gluScaleImage
Summary: BufferUnderflowException in gluScaleImage
Status: RESOLVED INVALID
Alias: None
Product: Jogl
Classification: JogAmp
Component: opengl (show other bugs)
Version: 2
Hardware: All all
: --- normal
Assignee: Sven Gothel
URL:
Depends on:
Blocks:
 
Reported: 2013-02-24 17:23 CET by Julien Gouesse
Modified: 2013-03-09 03:44 CET (History)
0 users

See Also:
Type: ---
SCM Refs:
b29f221c903aefdf99af8e8a8544b2223036454f
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.