JDK-6999872 : java.awt.Window instantiation leads to JVM CRASH on Windows, JDK7b118+ fastdebug
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: windows
  • CPU: generic
  • Submitted: 2010-11-13
  • Updated: 2013-06-22
  • Resolved: 2011-03-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7
6u60Fixed 7 b121Fixed
Related Reports
Relates :  
Description
JDK  : 7b118 FASTDEBUG ( passes on 7b117, JDK6 )
OS   : Windows 7

public class JVMCrash {
    public static void main(String[] args) {
        new Window((Frame)null);
    }
}

log is attached

--------------------------------------------------------------------------------
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=\thread.hpp:568
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (C:\BUILD_AREA\jdk7\hotspot\src\share\vm\runtime\thread.hpp:568), pid=6108, tid=500
#  assert(thread != NULL) failed: just checking
#
# JRE version: 7.0-b118
# Java VM: Java HotSpot(TM) Client VM (20.0-b02-fastdebug mixed mode windows-x86 )
# An error report file with more information is saved as:
# D:\devhot\synth-jck\hs_err_pid6108.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#
--------------------------------------------------------------------------------

Please see comments for the list of failing tests; it is not complete,
there are only tests directly related to window system.

Comments
SUGGESTED FIX http://sa.sfbay.sun.com/projects/sound_data/7/6999872/
30-12-2010

EVALUATION additional research shown that loading awt.dll before JVM is initialized causes the crash with fastdebug build. So D3D preloading should be completely disabled for fastdebug.
23-11-2010

EVALUATION The are 2 problems: 1. error in D3D preloading (adapter initialization starts preloading thread even if preloading is disabled); 2. fastdebug redefines new/delete operators and uses JVM functions for synchronization. If preloading is turned on, JVM may be not initialized (or it fails if calling thread is not attacvhed to JVM) and this caused the assertion described. #1 should be fixed (and ported into jdk6). #2 is not important for now (due by default preloading if off), but if it became important, preloading (or at least adapter initialization which allocates objects using new operator) can be disabled for BEDUG builds
18-11-2010

EVALUATION regression of the fix for 6867515 (Reduce impact of D3D initializion on startup time), the stack trace for the failure is jvm!JVM_FindSignal+0x18b31f jvm!JVM_FindSignal+0x18bc84 jvm!JVM_EnqueueOperation+0x10d605 jvm!JVM_FindSignal+0xabc61 jvm!JVM_FindSignal+0xac7c5 awt!DMutex_Exit+0x12 [c:\build_area\jdk7\jdk\src\share\native\sun\awt\debug\debug_util.c @ 54] awt!DMem_AllocateBlock+0x178 [c:\build_area\jdk7\jdk\src\share\native\sun\awt\debug\debug_mem.c @ 245] awt!operator new+0x17 [c:\build_area\jdk7\jdk\src\windows\native\sun\windows\awt_debug.cpp @ 42] awt!D3DContext::CreateInstance+0x39 [c:\build_area\jdk7\jdk\src\windows\native\sun\java2d\d3d\d3dcontext.cpp @ 205] awt!D3DPipelineManager::GetD3DContext+0x101 [c:\build_area\jdk7\jdk\src\windows\native\sun\java2d\d3d\d3dpipelinemanager.cpp @ 926] awt!D3DInitializer::D3DAdapterInitializer::InitImpl+0x44 [c:\build_area\jdk7\jdk\src\windows\native\sun\java2d\d3d\d3dpipelinemanager.cpp @ 1005] awt!AwtToolkit::PreloadAction::Init+0x60 [c:\build_area\jdk7\jdk\src\windows\native\sun\windows\awt_toolkit.cpp @ 1796] awt!AwtToolkit::PreloadThread::ThreadProc+0xb7 [c:\build_area\jdk7\jdk\src\windows\native\sun\windows\awt_toolkit.cpp @ 1936] awt!AwtToolkit::PreloadThread::StaticThreadProc+0x12 [c:\build_area\jdk7\jdk\src\windows\native\sun\windows\awt_toolkit.cpp @ 1912]
13-11-2010