-
Bug
-
Resolution: Fixed
-
P4
-
6
-
b43
-
x86
-
linux
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2169415 | 6u12 | Jennifer Godinez | P4 | Resolved | Fixed | b02 |
FULL PRODUCT VERSION :
java version "1.6.0_04"
Java(TM) SE Runtime Environment (build 1.6.0_04-b12)
Java HotSpot(TM) Server VM (build 10.0-b19, mixed mode)
java version "1.5.0_14"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03)
Java HotSpot(TM) Server VM (build 1.5.0_14-b03, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Suse Linus Enterprice Server 10
output of uname -a:
Linux <hostname> 2.6.16.21-0.8-bigsmp #1 SMP Mon Jul 3 18:25:39 UTC 2006 i686 i686 i386 GNU/Linux
EXTRA RELEVANT SYSTEM CONFIGURATION :
CUPS version 1.1.23
A DESCRIPTION OF THE PROBLEM :
Today I found yet another bug in the sun.print.CUPSPrinter class, which as well is responsible for the following NullPointerException (especially in a multi threaded application, see as well Bug ID 6390756):
java.lang.NullPointerException
at sun.print.IPPPrintService.findCustomMedia(IPPPrintService.java:845)
at sun.print.UnixPrintJob.print(UnixPrintJob.java:328)
...
In the source of class sun.print.CUPSPrinter, I saw that the variable "initialized" was on the one hand a static variable and on the other hand used to control the initialization of instance variables (im particular the array cupsCustomMediaSNames) in method initMedia(). This of cource causes trouble when more than one CUPSPrinter instances are created, without calling initMedia() immediately after instantiation (to be precise: before the next CUPSPrinter instance is created).
REPRODUCIBILITY :
This bug can be reproduced often.
java version "1.6.0_04"
Java(TM) SE Runtime Environment (build 1.6.0_04-b12)
Java HotSpot(TM) Server VM (build 10.0-b19, mixed mode)
java version "1.5.0_14"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03)
Java HotSpot(TM) Server VM (build 1.5.0_14-b03, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Suse Linus Enterprice Server 10
output of uname -a:
Linux <hostname> 2.6.16.21-0.8-bigsmp #1 SMP Mon Jul 3 18:25:39 UTC 2006 i686 i686 i386 GNU/Linux
EXTRA RELEVANT SYSTEM CONFIGURATION :
CUPS version 1.1.23
A DESCRIPTION OF THE PROBLEM :
Today I found yet another bug in the sun.print.CUPSPrinter class, which as well is responsible for the following NullPointerException (especially in a multi threaded application, see as well Bug ID 6390756):
java.lang.NullPointerException
at sun.print.IPPPrintService.findCustomMedia(IPPPrintService.java:845)
at sun.print.UnixPrintJob.print(UnixPrintJob.java:328)
...
In the source of class sun.print.CUPSPrinter, I saw that the variable "initialized" was on the one hand a static variable and on the other hand used to control the initialization of instance variables (im particular the array cupsCustomMediaSNames) in method initMedia(). This of cource causes trouble when more than one CUPSPrinter instances are created, without calling initMedia() immediately after instantiation (to be precise: before the next CUPSPrinter instance is created).
REPRODUCIBILITY :
This bug can be reproduced often.
- backported by
-
JDK-2169415 Variable "initialized" in class CUPSPrinter is static by mistake
- Resolved
- duplicates
-
JDK-6495924 getSupportedAttributeValues fails when called from multiple threads
- Closed
-
JDK-6658736 NullPointerException in IPPPrintService.findCustomMedia()
- Closed
- relates to
-
JDK-6390756 Printing from multiple threads throws incorrect exception on Linux-AMD64
- Closed