Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6603312
Votes 0
Synopsis Segmentation fault running java -jar SwingSet2.jar in 256 color mode
Category java:classes_awt
Reported Against
Release Fixed 7(b27)
State 10-Fix Delivered, bug
Priority: 3-Medium
Related Bugs 6603311 , 6684361 , 6685121
Submit Date 11-SEP-2007
Description
OPERATING SYSTEM(S):
--------------------
Linux AMD64

FULL JDK VERSION(S):
-------------------
java version "1.6.0_02"
Java(TM) SE Runtime Environment (build 1.6.0_02-b05)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_02-b05, mixed mode)


STEPS TO REPRODUCE
--------------------
- set the display settings of graphics card to 256 color mode
- run java -jar Swingset2.jar and you will see segmentation fault.
Posted Date : 2007-09-11 16:34:15.0
Work Around
N/A
Evaluation
According to the initial investigation it's very likely the problem is in splash screen in 256 color mode. If SwingSet2 is run without splash screen all work fine - without segmentation faults.
Posted Date : 2007-10-15 11:57:25.0

This is unlikely to be a problem with amd64. Experiments show that the problem can easily be reproduced while running on linux-i586. Probably this problem is related to manipulating the X11 visuals when operating on 256-color displays.
Posted Date : 2007-10-15 12:29:09.0

The segmentation fault happens at the initColorCube() function (src/share/native/sun/awt/splashscreen/splashscreen_gfx_impl.c) at line pColorMap[colorIndex[n++]] = ... . This happens because the colorIndex[n++] has a big numerical value, and is out of bounds of the pColorMap[] array.

The colorIndex[] is the splash->colorIndex field, which gets initialized at SplashInitPlatform() at src/solaris/native/sun/awt/splashscreen/splashscreen_sys.c. Which in turn invokes the AllocColors() function. This function uses the XAllocColorCells() X11 function. And the call returns the status of zero, which indicates a failure according to the documentation. 

Finally, the splash->colorIndex does not get initialized properly. That may be the reason it contains some undefined data.
Posted Date : 2008-03-24 15:38:18.0

The reason the XAllocColorCells() function fails is the fact that the X server has its available color cells exhausted.
Probably we need to force hiding the splash screen if the code cannot allocate any reasonable number of colors on PseudoColor displays.
Posted Date : 2008-03-25 10:10:31.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang