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: 4835522
Votes 1
Synopsis MANUAL: 2 FullScreen/FlipStrategy/src/Manual/dualModeTest fail due to crash
Category java:classes_2d
Reported Against 1.4.1 , mantis-beta
Release Fixed 1.5(tiger)
State 10-Fix Delivered, Verified, bug
Priority: 3-Medium
Related Bugs
Submit Date 20-MAR-2003
Description
Filed By       : J2SE-SQA 
JDK            : JDK1.4.1fcs (b21), JDK1.4.2 b18
Platform[s]    : windows 2000 pro SP3
switch/Mode    : -cleint
test harness   : tonga 1.2 (52)
testbase       : /net/sqesvr/export/st2/suites/mantis/awt
Falling test[s]:
AWT_Mantis_WS/src/FullScreen/FlipStrategy/src/Manual/dualModeTest2
AWT_Mantis_WS/src/FullScreen/FlipStrategy/src/Manual/dualModeTest4

This 2 manual fullscreen testcases fail automatically due to crash.
They fail only in 32bit true color display setting.  (pass in 16bit color setting)
They pass on other sameOS/differentVideoCard machines.
The same crash log file can be seen on other sameOS/differentVideoCard machine (maia) with different testcase.


Failed Machine config:
=====================
1.
machine name: qavectra
Video Card: Plug and Play Monitor on ATI Technilogies, Inc 3D RAGE PRO AGP 2X
DirectX version: 7.0
Display Propertites setting Colors: True Color (32-bit)

output of /net/jano/export/disk06/java2d/win32utilities/PlatformInfo/Release/PlatformInfo.exe
Platform configuration:

CPU:
 customer  32bit
Single Processor
Processor Speed: 498 MHz

Operating System:
Windows 2000 (version 5.0 Service Pack 3 (Build 2195))

DirectX version: DirectX 7

DirectX display devices:
Device 0:
  Resolution (width x height x depth): 1024 x 768 x 32
  Device driver atidrab.dll version 5.0.2180.1

GDI display devices:
Primary: Name = \\.\DISPLAY1, Description = ATI Technologies Inc. 3D RAGE PRO AGP 2X

2.
machine name: maia
Display Propertites setting Colors: True Color (32-bit)
failed testcase: AWT_Mantis_WS/src/FullScreen/FlipStrategy/src/Manual/FullScrnFlipAllDMTest
Platform configuration:

CPU:
 customer  32bit
Number of Processors: 2
Processor Speed: 797 MHz

Operating System:
Windows 2000 (version 5.0 Service Pack 3 (Build 2195))

DirectX version: DirectX 7

DirectX display devices:
Device 0:
  Resolution (width x height x depth): 1024 x 768 x 32
  Device driver G400D.dll version 5.12.1.1120

GDI display devices:
Primary: Name = \\.\DISPLAY1, Description = Matrox Millennium G450 Dual Head - English


How to reproduce:
===================
dualModeTest2.tlog is attached.
1. Map Y: to /cady/export
2. modify dualModeTest2.tlog if any path need modification.
3. run "sh dualModeTest2.tlog"

Click ok after reading the test instructions.  The test will change between fullscreen mode and normal mode.  After a few mode changed, the test automatically fails due to creash.


Error messages:
==================
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x182DB2B6
Function=Java_sun_print_Win32PrintJob_endPrintRawData+0x5282
Library=Y:\jdk1.4.2\promoted\beta\b18\binaries\windows-i586\jre\bin\awt.dll

Current Java thread:
        at sun.java2d.DefaultDisposerRecord.invokeNativeDispose(Native Method)
        at sun.java2d.DefaultDisposerRecord.dispose(DefaultDisposerRecord.java:24)
        at sun.java2d.Disposer.run(Disposer.java:99)
        at java.lang.Thread.run(Thread.java:534)

Dynamic libraries:
0x00400000 - 0x00406000         Y:\jdk1.4.2\promoted\beta\b18\binaries\windows-i586\bin\java.exe
0x77F80000 - 0x77FFB000         C:\WINNT\System32\ntdll.dll
0x77DB0000 - 0x77E0D000         C:\WINNT\system32\ADVAPI32.dll
0x77E80000 - 0x77F36000         C:\WINNT\system32\KERNEL32.DLL
0x77D30000 - 0x77DA1000         C:\WINNT\system32\RPCRT4.DLL
0x78000000 - 0x78046000         C:\WINNT\system32\MSVCRT.dll
0x08000000 - 0x08136000         Y:\jdk1.4.2\promoted\beta\b18\binaries\windows-i586\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
0x10000000 - 0x10007000         Y:\jdk1.4.2\promoted\beta\b18\binaries\windows-i586\jre\bin\hpi.dll
0x007C0000 - 0x007CE000         Y:\jdk1.4.2\promoted\beta\b18\binaries\windows-i586\jre\bin\verify.dll
0x007D0000 - 0x007E8000         Y:\jdk1.4.2\promoted\beta\b18\binaries\windows-i586\jre\bin\java.dll
0x007F0000 - 0x007FD000         Y:\jdk1.4.2\promoted\beta\b18\binaries\windows-i586\jre\bin\zip.dll
0x18270000 - 0x1837A000         Y:\jdk1.4.2\promoted\beta\b18\binaries\windows-i586\jre\bin\awt.dll
0x77800000 - 0x7781E000         C:\WINNT\System32\WINSPOOL.DRV
0x76620000 - 0x76630000         C:\WINNT\system32\MPR.DLL
0x75E60000 - 0x75E7A000         C:\WINNT\System32\IMM32.dll
0x77A50000 - 0x77B45000         C:\WINNT\system32\ole32.dll
0x18380000 - 0x183D0000         Y:\jdk1.4.2\promoted\beta\b18\binaries\windows-i586\jre\bin\fontmanager.dl
l
0x72800000 - 0x72846000         C:\WINNT\System32\ddraw.dll
0x728A0000 - 0x728A6000         C:\WINNT\System32\DCIMAN32.dll
0x72CF0000 - 0x72D84000         C:\WINNT\System32\D3DIM700.DLL
0x18EC0000 - 0x18EDE000         Y:\jdk1.4.2\promoted\beta\b18\binaries\windows-i586\jre\bin\jpeg.dll
0x77920000 - 0x77943000         C:\WINNT\system32\imagehlp.dll
0x72A00000 - 0x72A2D000         C:\WINNT\system32\DBGHELP.dll
0x690A0000 - 0x690AB000         C:\WINNT\System32\PSAPI.DLL

Heap at VM Abort:
Heap
 def new generation   total 576K, used 3K [0x10010000, 0x100b0000, 0x104f0000)
  eden space 512K,   0% used [0x10010000, 0x10010d60, 0x10090000)
  from space 64K,   0% used [0x10090000, 0x10090000, 0x100a0000)
  to   space 64K,   0% used [0x100a0000, 0x100a0000, 0x100b0000)
 tenured generation   total 4380K, used 3829K [0x104f0000, 0x10937000, 0x14010000)
   the space 4380K,  87% used [0x104f0000, 0x108ad700, 0x108ad800, 0x10937000)
 compacting perm gen  total 4096K, used 2830K [0x14010000, 0x14410000, 0x18010000)
   the space 4096K,  69% used [0x14010000, 0x142d39b0, 0x142d3a00, 0x14410000)

Local Time = Thu Mar 20 14:12:26 2003
Elapsed Time = 36
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2-beta-b18 mixed mode)
#



dualModeTest2.tlog, InitTemplate.java, dualModeTest2.java, hs_err_pid908.log are attached.

su-  xxxxx@xxxxx   2003-03-20




FULL PRODUCT VERSION :
java version "1.4.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_02-b06)
Java HotSpot(TM) Client VM (build 1.4.1_02-b06, mixed mode)

FULL OS VERSION :
 customer  Windows XP [Version 5.1.2600]

A DESCRIPTION OF THE PROBLEM :
When switching in and out of full screen exclusive mode, the JVM will crash.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile and run FullScreenTest.java.
The JVM will crash.

EXPECTED VERSUS ACTUAL BEHAVIOR :
FullScreenTest should switch in and out of full screen exclusive mode indefinitely.
The JVM crashes after the second or third switch.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D069916
Function=Java_sun_print_Win32PrintJob_printRawData+0x4F26
Library=C:\Program Files\Java\j2re1.4.1_02\bin\awt.dll

Current Java thread:
        at sun.java2d.DefaultDisposerRecord.invokeNativeDispose(Native Method)
        at sun.java2d.DefaultDisposerRecord.dispose(DefaultDisposerRecord.java:2
4)
        at sun.java2d.Disposer.run(Disposer.java:99)
        at java.lang.Thread.run(Thread.java:536)

Dynamic libraries:
0x00400000 - 0x00406000         C:\WINDOWS\system32\java.exe
0x77F50000 - 0x77FF7000         C:\WINDOWS\System32\ntdll.dll
0x77E60000 - 0x77F46000         C:\WINDOWS\system32\kernel32.dll
0x77DD0000 - 0x77E5D000         C:\WINDOWS\system32\ADVAPI32.dll
0x78000000 - 0x78086000         C:\WINDOWS\system32\RPCRT4.dll
0x77C10000 - 0x77C63000         C:\WINDOWS\system32\MSVCRT.dll
0x6D340000 - 0x6D46A000         C:\Program Files\Java\j2re1.4.1_02\bin\client\jv
m.dll
0x77D40000 - 0x77DC6000         C:\WINDOWS\system32\USER32.dll
0x77C70000 - 0x77CB0000         C:\WINDOWS\system32\GDI32.dll
0x76B40000 - 0x76B6C000         C:\WINDOWS\system32\WINMM.dll
0x5CD70000 - 0x5CD77000         C:\WINDOWS\system32\serwvdrv.dll
0x5B0A0000 - 0x5B0A7000         C:\WINDOWS\system32\umdmxfrm.dll
0x6D1E0000 - 0x6D1E7000         C:\Program Files\Java\j2re1.4.1_02\bin\hpi.dll
0x6D310000 - 0x6D31E000         C:\Program Files\Java\j2re1.4.1_02\bin\verify.dl
l
0x6D220000 - 0x6D239000         C:\Program Files\Java\j2re1.4.1_02\bin\java.dll
0x6D330000 - 0x6D33D000         C:\Program Files\Java\j2re1.4.1_02\bin\zip.dll
0x6D000000 - 0x6D105000         C:\Program Files\Java\j2re1.4.1_02\bin\awt.dll
0x73000000 - 0x73023000         C:\WINDOWS\system32\WINSPOOL.DRV
0x76390000 - 0x763AC000         C:\WINDOWS\system32\IMM32.dll
0x771B0000 - 0x772D1000         C:\WINDOWS\system32\ole32.dll
0x5AD70000 - 0x5ADA4000         C:\WINDOWS\System32\uxtheme.dll
0x6D190000 - 0x6D1E0000         C:\Program Files\Java\j2re1.4.1_02\bin\fontmanag
er.dll
0x73760000 - 0x737A4000         C:\WINDOWS\system32\ddraw.dll
0x73BC0000 - 0x73BC6000         C:\WINDOWS\system32\DCIMAN32.dll
0x73940000 - 0x73A07000         C:\WINDOWS\system32\D3DIM700.DLL
0x63000000 - 0x63014000         C:\WINDOWS\System32\SynTPFcs.dll
0x77C00000 - 0x77C07000         C:\WINDOWS\system32\VERSION.dll
0x76C90000 - 0x76CB2000         C:\WINDOWS\system32\imagehlp.dll
0x6D510000 - 0x6D58D000         C:\WINDOWS\system32\DBGHELP.dll
0x76BF0000 - 0x76BFB000         C:\WINDOWS\system32\PSAPI.DLL

Local Time = Tue Mar 18 10:42:28 2003
Elapsed Time = 4
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.1_02-b06 mixed mode)
#
# An error report file has been saved as hs_err_pid2420.log.
# Please refer to the file for further information.
#

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
import javax.swing.*;

public class FullScreenTest extends JFrame {
  private GraphicsDevice device;
  private Thread         fullScreenThread;
  private Object         lock;
  private boolean        fullScreen = false;

  public FullScreenTest() {
    super("Full Screen Test");
    lock = new Object();
    setUndecorated(true);

    JPanel panel = new JPanel();
    panel.setPreferredSize(new Dimension(400, 200));
    getContentPane().add(panel);
    pack();
    show();

    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    device = ge.getDefaultScreenDevice();
    setFullScreen(false);

    Thread t = new Thread() {
        public void run() {
          while (true) {
            synchronized (lock) {
              setFullScreen(!fullScreen);
            }

            try {
              Thread.sleep(2000);
            }
            catch (InterruptedException ex) { ex.printStackTrace(); }
          }
        }
      };
    t.start();

    while (true) {
      synchronized (lock) {
        if (fullScreen) {
          BufferStrategy bs = getBufferStrategy();
          Graphics       g  = bs.getDrawGraphics();
          paint(g);
          g.dispose();
          bs.show();
        }
        else
          repaint();
      }

      try {
        Thread.sleep(100);
      }
      catch (InterruptedException ex) { ex.printStackTrace(); }
    }
  }

  private void setFullScreen(boolean b) {
    device.setFullScreenWindow(null);
      if (b && device.isFullScreenSupported()) {
        setIgnoreRepaint(true);
        enableInputMethods(false);
        device.setFullScreenWindow(this);
      }
      else {
        setIgnoreRepaint(false);
        enableInputMethods(true);
      }
      createBufferStrategy(2);
      fullScreen = b;
    }

  public static void main(String[] args) { new FullScreenTest(); }
}

---------- END SOURCE ----------

(Review ID: 182796)
======================================================================
Work Around
N/A
Evaluation
Committing to tiger.
  xxxxx@xxxxx   2003-03-20

The crash occurs when we're trying to dispose of a DDrawBackBufferSurface.

All DDrawBackBufferSurfaces share a dxSurface, which is a surface attached
to the primary so in the DDBBS's desctructor
we should just null out dxSurface reference. Currently we're attemtpting to release it when a super class's (DDrawSurface) destructor is called after
DDBBS's destructor is done.

If the dxSurface is nulled out in DDBBS::ReleaseSurface (which is called
from ~DDBBS), then ~DDrawSurface won't attempt to release the surface.

  xxxxx@xxxxx   2003-06-03
Comments
  
  Include a link with my name & email   

Submitted On 26-JUN-2003
bh94704
I only have 1 computer, so I can't test this thesis myself, but 
I only recently enountered this bug, even though I have been 
programming fullscreen apps for almost a year. I began 
getting this bug persistently, on programs that had never 
been affected by it before, when I upgraded from Win98 to 
WinME. Can someone check to see if there is causality there? 
It could be a valuable workaround. Thank you!



PLEASE NOTE: JDK6 is formerly known as Project Mustang