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: 4637338
Votes 4
Synopsis MultiFrame problem and the default configuration and grayscale displays
Category java:classes_2d
Reported Against 1.4 , 1.4.2
Release Fixed 1.5(tiger-b36), 1.4.2_04(Bug ID:2117754)
State 10-Fix Delivered, bug
Priority: 3-Medium
Related Bugs 4959760
Submit Date 13-FEB-2002
Description
We did some testing with the new JDK 1.4 and had some problems. We tested the following:

We made a program to draw a frame and used GraphicsConfiguration to get the default configuration of the screen device and then drew the frame on the device.

We tried the following configurations:
We used a windows 2000 pc with 2 grayscale monitors and one vga color monitor. The grayscales are connected to a  xxxxx  2MP2H Dualhead card and set to 'User defined palette'. We set the vga monitor as primary display using true color (32-bit) settings. Restart the machine after setting these settings and run the test program. If everthing works you should see 2 frames. One on the grayscales and one on the vga monitor.

compiled        runned      result^M
    
    1.4rc           1.4rc       The frame on the grayscale barco monitors was 

black, the frame on the vga monitor is drawn fine
     
    1.4rc           1.4b3       The frame on the grayscale barco monitors was 

black, the frame on the vga monitor is drawn fine
    
    1.4rc           1.3.1_01    The frame on the grayscale barco monitors was 

black, the frame on the vga monitor is drawn fine

The program is included in this zip file. There's also a .bat file start the test. Be sure to change the directory in the bat file to point to the java.exe

What I think that is happening, is following:
- The application takes the color model of the primary display, which is a
true color model.  Then it wants to apply this also to the frame on the
grayscale display, but of course this does not work.

It evens works if you set the color VGA to 256 colors (and not to true
color), because then both boards use the same color model: indexed.

Tried problem 1.3.1

The same problem occurs, and here is some additional information, also when
you drag a from from one screen to the other.

	compiled		runned

	1.3.1_02		1.3.1_02

The frame on the grayscale barco monitors was black, the frame on the vga monitor is drawn fine. Dragging the frame from the vga monitor to the grayscales does nothing. The frame keeps getting properly painted. Also dragging the frame on the grayscales to the vga monitor does nothing. The frame remains completely black.

	1.3.1_02		1.4rc

The frame on the grayscale barco monitors was black, the frame on the vga monitor is drawn fine. If you drag the frame from the vga monitor to the grayscales, half of it becomes black. Dragging The frame from the grayscales to the vga shows the 2 bmp's

	1.4rc			1.4b3

The frame on the grayscale barco monitors was black, the frame on the vga monitor is drawn fine

	1.4rc			1.3.1_0

The frame on the grayscale barco monitors was black, the frame on the vga monitor is drawn fine

	1.4rc			1.3.1_02

The frame on the grayscale barco monitors was black, the frame on the vga monitor is drawn fine. Dragging the frame from the vga monitor to the grayscales does nothing. The frame keeps getting properly painted. Also dragging the frame on the grayscales to the vga monitor does nothing. The frame remains completely black.

As we have a 2MP2 in DTS support I asked about using the video card.

The 2MP2H has 10 bit look up tables, the 2MP2 not.
Since this is only used native, this can not have an influence on the tests.

So the configuration is:
Windows 2000 Professional PC
1 2MP2(H) board, this is a dual head, so attach 2 displays to this board.
1 VGA board (with possibility to support 24 bit color or more), also attach
a display here.

Then follow the primary setup as defined in the readme file you already
received.

I did following tests here today:

Installed a 2MP2 board and indeed, they are shown as seperate heads.
The FORCEGRAY flag HAS an influence:

HOW TO SET THE FORCEGRAY FLAG:
  Go to My Computer ... Properties and click Advanced
  Select Environment Variables and the System variables.
  Make a New variable with the name "FORCEGRAY" and the value "TRUE" (case
sensitive).

HOW TO RESET THE FORCEGRAY FLAG:
  Same as above, but remove this variable (do not set it to false !)

TEST RESULTS:
[dithering and direct draw is always enabled]
[2 grayscale displays and 1 color display, the color display is set to true
color AND primary display]

Now the results:
FORCEGRAY ON:
-> Set Palette to User Modifiable of BOTH grayscales and restart, then run
multiframe => you see 1 black, empty frame on every grayscale display.
-> Set Palette to Static Gray including sys. colors and restart, then run
multiframe => you see 1 black, empty frame on every grayscale display.
-> Set Palette to Static Gray without sys colors and restart, then run
multiframe => all 3 frames are shown correctly.

FORCEGRAY OFF:
-> Set Palette to User Modifiable of BOTH grayscales and restart, then run
multiframe => you see a totally dithered frame on every grayscale display
(see bitmap in attachment).
-> Set Palette to Static Gray including sys. colors and restart, then run
multiframe => you see 1 black, empty frame on every grayscale display.
-> Set Palette to Static Gray without sys colors and restart, then run
multiframe => all 3 frames are shown correctly.

These tests were done with classes compiled with 1.3.1_01 and ran with
1.3.1_01.
-------------------------------

Tests using 1.3.1_02


DK 1.3.1_02
User Defined pallete
ForceGray off

--> Gradient has 17 bands on the greyscales, color display gradient looks ok
    Nothing is black


JDK 1.4rc
User Defined pallete
ForceGray off

--> Gradient has only 4 bands on the greyscales, color display gradient looks ok
    Nothing is black

JDK 1.3.1_02
User Defined pallete
ForceGray ON

--> Frames on the grayscales are completely black and stay that way 
	even when dragging to the colour display. The frame on the colour display is ok.

JDK 1.4rc
User Defined pallete
ForceGray ON

--> Frames on the grayscales are completely black. If you drag them to the colour display, 
	the bmp's become visible partially. The frame on the colour display is ok, but dragging
	it to the grayscales makes it black.

==============
JDK 1.3.1_02
Static gray with system colours
ForceGray off

--> Frames on the grayscales are completely black and stay that way 
	even when dragging to the colour display. The frame on the colour display is ok.


JDK 1.4rc
Static gray with system colours
ForceGray off

--> Test program crashes:

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D00FBAB
Function=Java_sun_java2d_loops_MaskFill_MaskFill+0xB77B
Library=C:\multiframe\classes14rc\jre\bin\awt.dll

Current Java thread:
        at sun.java2d.loops.Blit.Blit(Native Method)
        at sun.java2d.pipe.DrawImage.blitSurfaceData(DrawImage.java:627)
        at sun.java2d.pipe.DrawImage.renderSurfaceData(DrawImage.java:355)
        at sun.java2d.pipe.DrawImage.clipAndRenderSurfaceData(DrawImage.java:333)
        at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:64)
        at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:48)
        at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:715)
        at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:2782)
        at sun.awt.image.ImageRepresentation.drawToBufImage(ImageRepresentation.java:726)
        at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:722)
        at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:2782)
        at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:2772)
        at GradientTesterFrame.paint(GradientTesterFrame.java:149)
        at sun.awt.RepaintArea.paint(RepaintArea.java:180)
        at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:260)
        at java.awt.Component.dispatchEventImpl(Component.java:3586)
        at java.awt.Container.dispatchEventImpl(Container.java:1437)
        at java.awt.Window.dispatchEventImpl(Window.java:1566)
        at java.awt.Component.dispatchEvent(Component.java:3367)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:190)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:144)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)

Dynamic libraries:
0x00400000 - 0x00406000         C:\multiframe\classes14rc\jre\bin\java.exe
0x77F80000 - 0x77FF9000         C:\WINNT\System32\ntdll.dll
0x77DB0000 - 0x77E0A000         C:\WINNT\system32\ADVAPI32.dll
0x77E80000 - 0x77F36000         C:\WINNT\system32\KERNEL32.DLL
0x77D40000 - 0x77DAF000         C:\WINNT\system32\RPCRT4.DLL
0x78000000 - 0x78046000         C:\WINNT\system32\MSVCRT.dll
0x6D330000 - 0x6D442000         C:\multiframe\classes14rc\jre\bin\client\jvm.dll
0x77E10000 - 0x77E75000         C:\WINNT\system32\USER32.dll
0x77F40000 - 0x77F7C000         C:\WINNT\system32\GDI32.DLL
0x77570000 - 0x775A0000         C:\WINNT\System32\WINMM.dll
0x6D1D0000 - 0x6D1D7000         C:\multiframe\classes14rc\jre\bin\hpi.dll
0x6D300000 - 0x6D30D000         C:\multiframe\classes14rc\jre\bin\verify.dll
0x6D210000 - 0x6D228000         C:\multiframe\classes14rc\jre\bin\java.dll
0x6D320000 - 0x6D32D000         C:\multiframe\classes14rc\jre\bin\zip.dll
0x6D000000 - 0x6D0F6000         C:\multiframe\classes14rc\jre\bin\awt.dll
0x77800000 - 0x7781D000         C:\WINNT\System32\WINSPOOL.DRV
0x75E60000 - 0x75E7A000         C:\WINNT\System32\IMM32.dll
0x77A50000 - 0x77B45000         C:\WINNT\system32\ole32.dll
0x6D180000 - 0x6D1D0000         C:\multiframe\classes14rc\jre\bin\fontmanager.dll
0x11C00000 - 0x11C36000         C:\Program Files\Network Associates\VirusScan\Wbhook32.dll
0x77820000 - 0x77827000         C:\WINNT\system32\VERSION.dll
0x759B0000 - 0x759B6000         C:\WINNT\system32\LZ32.DLL
0x77920000 - 0x77942000         C:\WINNT\system32\imagehlp.dll
0x72A00000 - 0x72A2D000         C:\WINNT\system32\DBGHELP.dll
0x690A0000 - 0x690AB000         C:\WINNT\System32\PSAPI.DLL

Local Time = Tue Feb 13 10:17:36 2001
Elapsed Time = 3
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.0-rc-b91 mixed mode)
#
# An error report file has been saved as hs_err_pid1156.log.
# Please refer to the file for further information.
#
Press any key to continue . . .

JDK 1.3.1_02
Static gray with system colours
ForceGray ON

--> Frames on the grayscales are completely black and stay that way 
	even when dragging to the colour display. The frame on the colour display is ok.


JDK 1.4rc
Static gray with system colours
ForceGray ON

--> Frames on the grayscales are completely black. If you drag them to the colour display, 
	the bmp's become visible partially. The frame on the colour display is ok, but dragging
	it to the grayscales makes it black.

=====================

JDK 1.3.1_02
Static gray without system colours
ForceGray off

--> Gradient looks  customer  on all displays, everthing is drawn. But on the greyscales there are
	2 lines in the gradient, a white and a gray one. If you drag the frame to the colour displa
	these become black. If you drag the colour display frame to the grayscales, the gradient
	gets in bands (32 if I counted correctly).

JDK 1.4rc
Static gray without system colours
ForceGray off

--> Test program crashes:
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D00FBAB
Function=Java_sun_java2d_loops_MaskFill_MaskFill+0xB77B
Library=C:\multiframe\classes14rc\jre\bin\awt.dll

Current Java thread:
        at sun.java2d.loops.Blit.Blit(Native Method)
        at sun.java2d.pipe.DrawImage.blitSurfaceData(DrawImage.java:627)
        at sun.java2d.pipe.DrawImage.renderSurfaceData(DrawImage.java:355)
        at sun.java2d.pipe.DrawImage.clipAndRenderSurfaceData(DrawImage.java:333)
        at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:64)
        at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:48)
        at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:715)
        at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:2782)
        at sun.awt.image.ImageRepresentation.drawToBufImage(ImageRepresentation.java:726)
        at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:722)
        at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:2782)
        at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:2772)
        at GradientTesterFrame.paint(GradientTesterFrame.java:149)
        at sun.awt.RepaintArea.paint(RepaintArea.java:180)
        at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:260)
        at java.awt.Component.dispatchEventImpl(Component.java:3586)
        at java.awt.Container.dispatchEventImpl(Container.java:1437)
        at java.awt.Window.dispatchEventImpl(Window.java:1566)
        at java.awt.Component.dispatchEvent(Component.java:3367)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:190)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:144)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)

Dynamic libraries:
0x00400000 - 0x00406000         C:\multiframe\classes14rc\jre\bin\java.exe
0x77F80000 - 0x77FF9000         C:\WINNT\System32\ntdll.dll
0x77DB0000 - 0x77E0A000         C:\WINNT\system32\ADVAPI32.dll
0x77E80000 - 0x77F36000         C:\WINNT\system32\KERNEL32.DLL
0x77D40000 - 0x77DAF000         C:\WINNT\system32\RPCRT4.DLL
0x78000000 - 0x78046000         C:\WINNT\system32\MSVCRT.dll
0x6D330000 - 0x6D442000         C:\multiframe\classes14rc\jre\bin\client\jvm.dll
0x77E10000 - 0x77E75000         C:\WINNT\system32\USER32.dll
0x77F40000 - 0x77F7C000         C:\WINNT\system32\GDI32.DLL
0x77570000 - 0x775A0000         C:\WINNT\System32\WINMM.dll
0x6D1D0000 - 0x6D1D7000         C:\multiframe\classes14rc\jre\bin\hpi.dll
0x6D300000 - 0x6D30D000         C:\multiframe\classes14rc\jre\bin\verify.dll
0x6D210000 - 0x6D228000         C:\multiframe\classes14rc\jre\bin\java.dll
0x6D320000 - 0x6D32D000         C:\multiframe\classes14rc\jre\bin\zip.dll
0x6D000000 - 0x6D0F6000         C:\multiframe\classes14rc\jre\bin\awt.dll
0x77800000 - 0x7781D000         C:\WINNT\System32\WINSPOOL.DRV
0x75E60000 - 0x75E7A000         C:\WINNT\System32\IMM32.dll
0x77A50000 - 0x77B45000         C:\WINNT\system32\ole32.dll
0x6D180000 - 0x6D1D0000         C:\multiframe\classes14rc\jre\bin\fontmanager.dll
0x77920000 - 0x77942000         C:\WINNT\system32\imagehlp.dll
0x72A00000 - 0x72A2D000         C:\WINNT\system32\DBGHELP.dll
0x11C00000 - 0x11C36000         C:\Program Files\Network Associates\VirusScan\W
bhook32.dll
0x77820000 - 0x77827000         C:\WINNT\system32\VERSION.dll
0x759B0000 - 0x759B6000         C:\WINNT\system32\LZ32.DLL
0x690A0000 - 0x690AB000         C:\WINNT\System32\PSAPI.DLL

Local Time = Tue Feb 13 10:25:02 2001
Elapsed Time = 4
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.0-rc-b91 mixed mode)
#
# An error report file has been saved as hs_err_pid1312.log.
# Please refer to the file for further information.
#
Press any key to continue . . .

JDK 1.3.1_02
Static gray without system colours
ForceGray ON

--> Gradient looks good on all displays, everthing is drawn. But on the greyscales there are
	2 lines in the gradient, a white and a gray one. If you drag the frame to the colour displa
	these become black. If you drag the colour display frame to the grayscales, the gradient
	gets in bands (32 if I counted correctly).

JDK 1.4rc
Static gray without system colours
ForceGray ON

--> Frames on the grayscales are completely black. If you drag them to the colour display, the bmp's become visible partially. The frame on the colour display is ok, but dragging it to the grayscales makes it black.

-------

I have included an excel file with 2 extra sheets, one with the expected
result description and one with FORCEGRAY information.
The results in red are now also indicating they are not right.

Files attached
Posted Date : 2005-07-22 03:26:23.0
Work Around
N/A
Evaluation
  The configuration mentioned in this bugreport is
  some VGA board running 16+ bit set as primary and barco boards set
  to "user modifyable palette" as secondary.

  I'm wondering if this is a supported configuration.
  For example, the documentation for Dome grayscale boards
  specifically mentions that configuration like this shouldn't be
  used.

  I've contacted Barco regarding this issue to find out
  if this is the case for Barco boards.

  We sholdn't be crashing in any case, of course, 
  so this is still a valid bug, but the priority 
  can change depending on Barco's answer to my 
  questions.


  xxxxx@xxxxx   2002-02-13

I've added Barco's reply to my questions to the comments section. According to 
the reply the configuration described in the bugreport is indeed supported
(at least by Barco) and is becoming used more and more.

  xxxxx@xxxxx   2002-02-14

The test crashes on 1.5 b26 if the primary screen is not palettized,
and the frame is shown on an 8-bit screen:

Stack: [0x01bd0000,0x01c10000),  sp=0x01ccf2f8,  free space=1020k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [awt_g.dll+0x167a4]
C  [awt_g.dll+0x1d68]
j  sun.java2d.loops.Blit.Blit(Lsun/java2d/SurfaceData;Lsun/java2d/SurfaceData;Ljava/awt/Composite;Lsun/java2d/pipe/Region;IIIIII)V+0
j  sun.java2d.pipe.DrawImage.blitSurfaceData(Lsun/java2d/SunGraphics2D;Lsun/java2d/SurfaceData;Lsun/java2d/SurfaceData;Lsun/java2d/loops/SurfaceType;Lsun/java2d/loops/SurfaceType;IIIIIILjava/awt/Color;)V+89
j  sun.java2d.pipe.DrawImage.renderSurfaceData(Lsun/java2d/SunGraphics2D;Lsun/java2d/SurfaceData;Ljava/awt/Color;IIIIII)V+40
j  sun.java2d.pipe.DrawImage.copyImage(Lsun/java2d/SunGraphics2D;Ljava/awt/Image;IIIIIILjava/awt/Color;)Z+58
j  sun.java2d.pipe.DrawImage.copyImage(Lsun/java2d/SunGraphics2D;Ljava/awt/Image;IILjava/awt/Color;)Z+30
j  sun.java2d.pipe.DrawImage.copyImage(Lsun/java2d/SunGraphics2D;Ljava/awt/Image;IILjava/awt/Color;Ljava/awt/image/ImageObserver;)Z+15
j  sun.java2d.SunGraphics2D.drawImage(Ljava/awt/Image;IILjava/awt/Color;Ljava/awt/image/ImageObserver;)Z+12
j  sun.awt.image.ImageRepresentation.drawToBufImage(Ljava/awt/Graphics;Lsun/awt/image/ToolkitImage;IILjava/awt/Color;Ljava/awt/image/ImageObserver;)Z+152
j  sun.java2d.pipe.DrawImage.copyImage(Lsun/java2d/SunGraphics2D;Ljava/awt/Image;IILjava/awt/Color;Ljava/awt/image/ImageObserver;)Z+57
j  sun.java2d.SunGraphics2D.drawImage(Ljava/awt/Image;IILjava/awt/Color;Ljava/awt/image/ImageObserver;)Z+12
j  sun.java2d.SunGraphics2D.drawImage(Ljava/awt/Image;IILjava/awt/image/ImageObserver;)Z+7
j  GradientTesterFrame.paint(Ljava/awt/Graphics;)V+482
j  sun.awt.RepaintArea.paintComponent(Ljava/awt/Component;Ljava/awt/Graphics;)V+6
j  sun.awt.RepaintArea.paint(Ljava/lang/Object;Z)V+326
j  sun.awt.windows.WComponentPeer.handleEvent(Ljava/awt/AWTEvent;)V+63
j  java.awt.Component.dispatchEventImpl(Ljava/awt/AWTEvent;)V+765
j  java.awt.Container.dispatchEventImpl(Ljava/awt/AWTEvent;)V+42
j  java.awt.Window.dispatchEventImpl(Ljava/awt/AWTEvent;)V+19
j  java.awt.Component.dispatchEvent(Ljava/awt/AWTEvent;)V+2
j  java.awt.EventQueue.dispatchEvent(Ljava/awt/AWTEvent;)V+46
j  java.awt.EventDispatchThread.pumpOneEventForHierarchy(ILjava/awt/Component;)Z+177
j  java.awt.EventDispatchThread.pumpEventsForHierarchy(ILjava/awt/Conditional;Ljava/awt/Component;)V+26
j  java.awt.EventDispatchThread.pumpEvents(ILjava/awt/Conditional;)V+4
j  java.awt.EventDispatchThread.pumpEvents(Ljava/awt/Conditional;)V+3
j  java.awt.EventDispatchThread.run()V+9

I've tested it on Win2K+AtiRage+Barco2MP system, but it's likely that the crash is
not specific to grayscale boards.

  xxxxx@xxxxx   2003-11-07

  The problem was that we were assuming that on all systems palette
  stuff doesn't work well if the primary screen is not palettized.

  It turns out that it's only true for Windows98/ME, and some
  particular drivers/video boards. Even there, the problems 
  (namely, distorted palette for images rendered on the secondary
  screen) can be worked around with -Dsun.java2d.noddraw=true flag.

  So we've decided to remove the workaround we had for a while
  which detected the case with non-palettized primary situation and 
  used primary DC for getting palette information.

  We've spent quite some time testing this fix on different
  OS-es, graphics boards etc. With the workaround removed it works
  perfectly on Win2k/XP, the configuration Barco guys wanted.

  Another minor fix in this changes is the use of getenv instead of
  GetEnvironmentVariable, which didn't work on Win98/ME after we
  started to use MSLU library to be unicode-complient. getenv works on
  all systems just fine.

  This fix also addressed the following bugs:
   4959760: VM crash Java_sun_java2d_loops_MaskFill_MaskFill: Dome grayscale board
   4934979: Issue with drawing images on a grayscale monitor under W2K

  xxxxx@xxxxx   2004-01-07
Comments
  
  Include a link with my name & email   

Submitted On 01-APR-2002
jimkski
I've experienced this same bug with a different video card 
and a vanilla video setting (ATI Radeon 8500 DV, 800x600, 
16bit color). 



PLEASE NOTE: JDK6 is formerly known as Project Mustang