Skip to main content

[JAVA3D-INTEREST] ImageComponent2D.setSubImage() issue

1 reply [Last post]
Anonymous

I was using ImageComponent2D.setSubImage() today, and discovered that,
in some cases, it incorrectly assumes that the source image size is
the same as the ImageComponent2Ds image. At the very least, this
happens in the parameter validation in setSubImage() and in
ImageComponentRetained.copyImage() in a format-converting copy.

I found the problem initially by feeding a 800x600
BufferedImage.TYPE_INT_RGB image into a 1024x1024
ImageComponent2D.FORMAT_RGB image component. The relevant portion of
the stack trace reads:

java.lang.ArrayIndexOutOfBoundsException: 480000
at javax.media.j3d.ImageComponentRetained.copyImage(Unknown Source)
at javax.media.j3d.ImageComponentRetained.copyImage(Unknown Source)
at javax.media.j3d.ImageComponent2DRetained.setSubImage(Unknown Source)
at javax.media.j3d.ImageComponent2D.setSubImage(Unknown Source)
at MyClass.myFunction(MyClass.java:999)
...

So, is this the correct place to report a bug? Or do I do that elsewhere?

By the way, I am current with CVS, my startup produces the line:

Java 3D [dev] 1.3.2-pre10-0412291503-experimental 29 Dec 2004 15:03:19 EST

My java is:
$ java -version
java version "1.4.2_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_06-b03)
Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode)
$

--David Garfield

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kcr
Offline
Joined: 2004-03-17

> So, is this the correct place to report a bug? Or do I do that elsewhere?

Please file the bug on java.net using the Issue tracker. See the following post for info on how to do this:

http://www.javadesktop.org/forums/thread.jspa?threadID=6406

-- Kevin