JDK-6357413 : loading ddraw.dll is not handled correctly
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 1.4.2
  • Priority: P5
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_nt
  • CPU: x86
  • Submitted: 2005-11-30
  • Updated: 2010-04-02
  • Resolved: 2006-06-28
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.4.2_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_03-b01)
Java HotSpot(TM) Client VM (build 1.4.2_03-b01, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Windows NT Version 4.0

EXTRA RELEVANT SYSTEM CONFIGURATION :
I have 1 gegabyte of RAM on my machine

A DESCRIPTION OF THE PROBLEM :
If maximum heap size is set high enough (-Xmx800m on my machine), a Java program fails to load ddraw.dll with message "Initialization of the dynamic link library c:\winnt\system32\ddraw.dll failed.". I believe the reason is that heap allocation reserves memory that ddraw.dll must use (it likes to occupy the specific address). The solution is to change JVM to load ddraw.dll before heap is allocated, unless -Dsun.java2d.noddraw=true is passed.

Passing -Dsun.java2d.noddraw=true as recommended workaround causes Java Web Start to hang randomly while trying to launch our application.


STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
set maximum heap size high enough till you get the ddraw error.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
"Initialization of the dynamic link library c:\winnt\system32\ddraw.dll failed" error should never be displayed.
ACTUAL -
"Initialization of the dynamic link library c:\winnt\system32\ddraw.dll failed" error is displayed if maximum heap size is high enough.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
"Initialization of the dynamic link library c:\winnt\system32\ddraw.dll failed"

REPRODUCIBILITY :
This bug can be reproduced always.

Comments
EVALUATION Our current releases do not support Windows NT, and I don't have a system to verify if it is still a problem. It doesn't manifest on XP systems I've tried. However, I've found the following thread regarding this: http://forum.java.sun.com/thread.jspa?forumID=32&threadID=232065 Folks there say the moving to 5.0 fixed this problem. Also, in Java 6 (mustang) we fixed bug 6353972: REGRESSION: GUI fails to paint text with large heap size which addressed issues with GUI rendering with large heap. I'm going to close this bug as a duplicate of 6353972.
28-06-2006