diff --git a/jdk/src/windows/bin/java_md.c b/jdk/src/windows/bin/java_md.c index b778f7ab213..97e4a803657 100644 --- a/jdk/src/windows/bin/java_md.c +++ b/jdk/src/windows/bin/java_md.c @@ -70,7 +70,11 @@ static void EnsureJreInstallation(const char *jrepath); */ #undef ENABLE_AWT_PRELOAD #ifndef JAVA_ARGS /* turn off AWT preloading for javac, jar, etc */ - #define ENABLE_AWT_PRELOAD + /* CR6999872: fastdebug crashes if awt library is loaded before JVM is + * initialized*/ + #if !defined(DEBUG) + #define ENABLE_AWT_PRELOAD + #endif #endif #ifdef ENABLE_AWT_PRELOAD diff --git a/jdk/src/windows/native/sun/java2d/d3d/D3DPipelineManager.cpp b/jdk/src/windows/native/sun/java2d/d3d/D3DPipelineManager.cpp index f16db728f29..38cec3f499f 100644 --- a/jdk/src/windows/native/sun/java2d/d3d/D3DPipelineManager.cpp +++ b/jdk/src/windows/native/sun/java2d/d3d/D3DPipelineManager.cpp @@ -969,12 +969,15 @@ void D3DInitializer::InitImpl() } D3DPipelineManager *pMgr = D3DPipelineManager::CreateInstance(); if (pMgr != NULL) { - UINT adapterCount = pMgr->adapterCount; + // init adapters if we are preloading + if (AwtToolkit::GetInstance().GetPreloadThread().OnPreloadThread()) { + UINT adapterCount = pMgr->adapterCount; - pAdapterIniters = new D3DAdapterInitializer[adapterCount]; - for (UINT i=0; i