United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-5059471 : REG:exception thows from jconsole when run any GUI which works fine with jdk1.4.

Details
Type:
Bug
Submit Date:
2004-06-07
Status:
Resolved
Updated Date:
2004-08-17
Project Name:
JDK
Resolved Date:
2004-06-21
Component:
client-libs
OS:
solaris
Sub-Component:
2d
CPU:
sparc
Priority:
P3
Resolution:
Fixed
Affected Versions:
5.0
Fixed Versions:
1.4.2_06 (06)

Related Reports
Backport:

Sub Tasks

Description
###@###.### 2004-06-07

J2SE Version (please include all output from java -version flag):
  java version "1.5.0-beta2"
  Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b50)
  Java HotSpot(TM) Server VM (build 1.5.0-beta2-b50, mixed mode)

Does this problem occur on J2SE 1.3.x or 1.4.x?  Yes / No (pick one)
  No


Operating System Configuration Information (be specific):
  SunOS devenv3 5.8 Generic_108528-27 sun4us sparc FJSV,GPUZC-L


Hardware Configuration Information (be specific):
  Mem: 65gb
  CPU: 16

psrinfo -v:
Status of processor 0 as of: 06/07/04 07:28:00
  Processor has been on-line since 06/05/04 11:19:42.
  The sparcv9 processor operates at 1349 MHz,
        and has a sparcv9 floating point processor.
Status of processor 1 as of: 06/07/04 07:28:00
  Processor has been on-line since 06/05/04 11:19:42.
  The sparcv9 processor operates at 1349 MHz,
        and has a sparcv9 floating point processor.
Status of processor 2 as of: 06/07/04 07:28:00
  Processor has been on-line since 06/05/04 11:19:43.
  The sparcv9 processor operates at 1349 MHz,
        and has a sparcv9 floating point processor.
Status of processor 3 as of: 06/07/04 07:28:00
  Processor has been on-line since 06/05/04 11:19:43.
  The sparcv9 processor operates at 1349 MHz,
        and has a sparcv9 floating point processor.
Status of processor 4 as of: 06/07/04 07:28:00
  Processor has been on-line since 06/05/04 11:19:43.
  The sparcv9 processor operates at 1349 MHz,
        and has a sparcv9 floating point processor.
Status of processor 5 as of: 06/07/04 07:28:00
  Processor has been on-line since 06/05/04 11:19:43.
  The sparcv9 processor operates at 1349 MHz,
        and has a sparcv9 floating point processor.
Status of processor 6 as of: 06/07/04 07:28:00
  Processor has been on-line since 06/05/04 11:19:43.
  The sparcv9 processor operates at 1349 MHz,
        and has a sparcv9 floating point processor.
Status of processor 7 as of: 06/07/04 07:28:00
  Processor has been on-line since 06/05/04 11:19:43.
  The sparcv9 processor operates at 1349 MHz,
        and has a sparcv9 floating point processor.
Status of processor 8 as of: 06/07/04 07:28:00
  Processor has been on-line since 06/05/04 11:19:43.
  The sparcv9 processor operates at 1349 MHz,
        and has a sparcv9 floating point processor.
Status of processor 9 as of: 06/07/04 07:28:00
  Processor has been on-line since 06/05/04 11:19:43.
  The sparcv9 processor operates at 1349 MHz,
        and has a sparcv9 floating point processor.
Status of processor 10 as of: 06/07/04 07:28:00
  Processor has been on-line since 06/05/04 11:19:43.
  The sparcv9 processor operates at 1349 MHz,
        and has a sparcv9 floating point processor.
Status of processor 11 as of: 06/07/04 07:28:00
  Processor has been on-line since 06/05/04 11:19:43.
  The sparcv9 processor operates at 1349 MHz,
        and has a sparcv9 floating point processor.
Status of processor 12 as of: 06/07/04 07:28:00
  Processor has been on-line since 06/05/04 11:19:43.
  The sparcv9 processor operates at 1349 MHz,
        and has a sparcv9 floating point processor.
Status of processor 13 as of: 06/07/04 07:28:00
  Processor has been on-line since 06/05/04 11:19:43.
  The sparcv9 processor operates at 1349 MHz,
        and has a sparcv9 floating point processor.
Status of processor 14 as of: 06/07/04 07:28:00
  Processor has been on-line since 06/05/04 11:19:43.
  The sparcv9 processor operates at 1349 MHz,
        and has a sparcv9 floating point processor.
Status of processor 15 as of: 06/07/04 07:28:00
  Processor has been on-line since 06/05/04 11:19:43.
  The sparcv9 processor operates at 1349 MHz,
        and has a sparcv9 floating point processor.


Bug Description:
  When running a GUI on Solaris, an exception throws from jconsole is 
  printed out like the following:

Exception in thread "main" java.lang.InternalError: Can't find supported visual
        at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
        at sun.awt.X11GraphicsEnvironment.access$000(X11GraphicsEnvironment.java:53)
        at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:142)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:131)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:159)
        at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)
        at sun.awt.motif.MToolkit.<clinit>(MToolkit.java:93)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:159)
        at java.awt.Toolkit$2.run(Toolkit.java:818)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:801)
        at java.awt.Toolkit.getEventQueue(Toolkit.java:1589)
        at java.awt.EventQueue.invokeLater(EventQueue.java:808)
        at javax.swing.SwingUtilities.invokeLater(SwingUtilities.java:1199)
        at sun.tools.jconsole.JConsole.mainInit(JConsole.java:522)
        at sun.tools.jconsole.JConsole.main(JConsole.java:635)


Steps to Reproduce (be specific):
Run any GUI.  The above stack trace is from running "jconsole".
GUI works fine under JDK1.4.x











                                    

Comments
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
1.4.2_06
generic
tiger-rc

FIXED IN:
1.4.2_06
tiger-rc

INTEGRATED IN:
1.4.2_06
tiger-b57
tiger-rc


                                     
2004-09-17
WORK AROUND

Display the app remotely to a display with depth other than 15.
Or, start a vncserver (www.realvnc.org) with depth 16 or 14, and display to it.

###@###.### 2004-06-09
                                     
2004-06-09
EVALUATION



Name: osR10079			Date: 06/09/2004

The exceprtion occurs in makeDefaultConfig() fucntion (awt_GraphicsEnv.c).
So, I reassign to the 2D team as this functoinality is under their responsibility.
###@###.### 2004-06-09
======================================================================

Regression is caused by the fix for bug 
  4639878: Java2D does not support 12 bit depth visuals

The likely cause is this change in X11Color.c:awt_allocate_colors:406
    if ((bpp == 32 || bpp == 16) && pVI->class == TrueColor && depth >= 16) {

We used to accept 15 bits depth here.

The solutions is probably to allow a 15 bit depth in this case.

###@###.### 2004-06-09

The suggested fix worked (I used vnc to emulate server running in
15-bit depth mode).

###@###.### 2004-06-09

Committing the bug to 1.4.2_06. Reason: Bug 4639878 is escalated for a customer
and this bug 5059471 is a side effect of 4639878.

###@###.### 2004-07-02
                                     
2004-06-09
SUGGESTED FIX

*** /tmp/geta10643	Wed Jun  9 10:52:42 2004
--- X11Color.c	Wed Jun  9 10:31:27 2004
***************
*** 403,409 ****
      awt_data->awtImage->clrdata.bitsperpixel = bpp;
      awt_data->awtImage->Depth = depth;
  
!     if ((bpp == 32 || bpp == 16) && pVI->class == TrueColor && depth >= 16) {
  	awt_data->AwtColorMatch = awt_color_matchTC;
  	awt_data->awtImage->clrdata.rOff = 0;
  	for (i = pVI->red_mask; (i & 1) == 0; i >>= 1) {
--- 403,409 ----
      awt_data->awtImage->clrdata.bitsperpixel = bpp;
      awt_data->awtImage->Depth = depth;
  
!     if ((bpp == 32 || bpp == 16) && pVI->class == TrueColor && depth > 12) {
  	awt_data->AwtColorMatch = awt_color_matchTC;
  	awt_data->awtImage->clrdata.rOff = 0;
  	for (i = pVI->red_mask; (i & 1) == 0; i >>= 1) {

###@###.### 2004-06-09
                                     
2004-06-09



Hardware and Software, Engineered to Work Together