-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P2
-
Affects Version/s: jai_1.1
-
Component/s: client-libs
-
None
-
rc2
-
generic
-
generic
-
Verified
The email below from a customer points out a new bug introduced bu
a change to JDK1.3 which showed up in RC1.
The DataBuffer class will no longer allow negative offsets to be used
for the data arrays. The implementation of LookupTableJAI made
use of negative offsets as a way of creating Lookup tables with a limited range.
Since this is now not possible, a different approach must be found.
==================================================================
Content-return: allowed
Date: Tue, 01 Feb 2000 14:01:49 -0500
From: "Feinberg, Jeff A (UNKNOWN)" <###@###.###>
Subject: ExceptionInInitializerError encounted using JDK 1.3.0 rc1
To: "'###@###.###'" <###@###.###>
Cc: "Thompson, Joe" <###@###.###>, "Crehan, Don" <###@###.###>, "Overby, Tom" <###@###.###>, "Stamboulis, Peter (UNKNOWN)" <###@###.###>
The following exception was encountered while trying to run our JAI
application under JDK 1.3.0 rc1 which was made available for Early Access on
the Developer Connection on January 28, 2000. This exception does not occur
when running under JDK 1.2.2 or the previous Early Access version of JDK
1.3. I am using JAI 1.0.2 and running under Windows NT.
Exception in thread "main" java.lang.ExceptionInInitializerError:
java.lang.Ille
galArgumentException: Data offset(s) must be positive integer(s)
at java.awt.image.DataBuffer.<init>(Unknown Source)
at java.awt.image.DataBufferByte.<init>(Unknown Source)
at javax.media.jai.LookupTableJAI.<init>(LookupTableJAI.java:115)
at javax.media.jai.ColorCube.<init>(ColorCube.java:612)
at javax.media.jai.ColorCube.createColorCubeByte(ColorCube.java:170)
at javax.media.jai.ColorCube.createColorCube(ColorCube.java:117)
at javax.media.jai.ColorCube.<clinit>(ColorCube.java:46)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at
javax.media.jai.operator.OrderedDitherDescriptor.class$(OrderedDither
Descriptor.java:81)
at
javax.media.jai.operator.OrderedDitherDescriptor.<clinit>(OrderedDith
erDescriptor.java:105)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at
javax.media.jai.OperationRegistry.loadDescriptors(OperationRegistry.j
ava:567)
at
javax.media.jai.OperationRegistry.initializeRegistry(OperationRegistr
y.java:217)
at javax.media.jai.JAI.<clinit>(JAI.java:173)
at com.lmco.imaging.ipc.ImageFile.<init>(ImageFile.java:79)
at com.lmco.imaging.ipc.IPChain.<init>(IPChain.java:166)
at com.lmco.imaging.gui.MainWindow.<init>(MainWindow.java:67)
at PiP.<init>(PiP.java:64)
at PiP.main(PiP.java:90)
The problem appears to be in some static initialization code kicked off when
trying to access the following static member of the JAI class:
// line 79 of ImageFile.java
myReadCache = JAI.createTileCache( 300, cacheSize );
Let me know if you need any more information to help debug the problem.
Regards,
Jeff Fienberg
Senior Software Engineer
Science Applications International Corp.
for Lockheed Martin
lincoln.perry@Eng 2000-02-02
The bug is triggered when a ColorCube is created in OrderedDitherDescriptor.
This is called before any application code even runs. Thus its completely
preventingh the use of JAI with JDK1.3RC1.
a change to JDK1.3 which showed up in RC1.
The DataBuffer class will no longer allow negative offsets to be used
for the data arrays. The implementation of LookupTableJAI made
use of negative offsets as a way of creating Lookup tables with a limited range.
Since this is now not possible, a different approach must be found.
==================================================================
Content-return: allowed
Date: Tue, 01 Feb 2000 14:01:49 -0500
From: "Feinberg, Jeff A (UNKNOWN)" <###@###.###>
Subject: ExceptionInInitializerError encounted using JDK 1.3.0 rc1
To: "'###@###.###'" <###@###.###>
Cc: "Thompson, Joe" <###@###.###>, "Crehan, Don" <###@###.###>, "Overby, Tom" <###@###.###>, "Stamboulis, Peter (UNKNOWN)" <###@###.###>
The following exception was encountered while trying to run our JAI
application under JDK 1.3.0 rc1 which was made available for Early Access on
the Developer Connection on January 28, 2000. This exception does not occur
when running under JDK 1.2.2 or the previous Early Access version of JDK
1.3. I am using JAI 1.0.2 and running under Windows NT.
Exception in thread "main" java.lang.ExceptionInInitializerError:
java.lang.Ille
galArgumentException: Data offset(s) must be positive integer(s)
at java.awt.image.DataBuffer.<init>(Unknown Source)
at java.awt.image.DataBufferByte.<init>(Unknown Source)
at javax.media.jai.LookupTableJAI.<init>(LookupTableJAI.java:115)
at javax.media.jai.ColorCube.<init>(ColorCube.java:612)
at javax.media.jai.ColorCube.createColorCubeByte(ColorCube.java:170)
at javax.media.jai.ColorCube.createColorCube(ColorCube.java:117)
at javax.media.jai.ColorCube.<clinit>(ColorCube.java:46)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at
javax.media.jai.operator.OrderedDitherDescriptor.class$(OrderedDither
Descriptor.java:81)
at
javax.media.jai.operator.OrderedDitherDescriptor.<clinit>(OrderedDith
erDescriptor.java:105)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at
javax.media.jai.OperationRegistry.loadDescriptors(OperationRegistry.j
ava:567)
at
javax.media.jai.OperationRegistry.initializeRegistry(OperationRegistr
y.java:217)
at javax.media.jai.JAI.<clinit>(JAI.java:173)
at com.lmco.imaging.ipc.ImageFile.<init>(ImageFile.java:79)
at com.lmco.imaging.ipc.IPChain.<init>(IPChain.java:166)
at com.lmco.imaging.gui.MainWindow.<init>(MainWindow.java:67)
at PiP.<init>(PiP.java:64)
at PiP.main(PiP.java:90)
The problem appears to be in some static initialization code kicked off when
trying to access the following static member of the JAI class:
// line 79 of ImageFile.java
myReadCache = JAI.createTileCache( 300, cacheSize );
Let me know if you need any more information to help debug the problem.
Regards,
Jeff Fienberg
Senior Software Engineer
Science Applications International Corp.
for Lockheed Martin
lincoln.perry@Eng 2000-02-02
The bug is triggered when a ColorCube is created in OrderedDitherDescriptor.
This is called before any application code even runs. Thus its completely
preventingh the use of JAI with JDK1.3RC1.