JDK-6560269 : JRE crashes without MSVCR71.dll but install fails to place it in system32
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 6
  • Priority: P4
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: windows_vista
  • CPU: x86
  • Submitted: 2007-05-21
  • Updated: 2010-10-14
  • Resolved: 2010-10-14
Description
FULL PRODUCT VERSION :
1.6.0_01 downloaded may-10

ADDITIONAL OS VERSION INFORMATION :
Windows Vista Home Ultimate, all updates as of May-10-07

EXTRA RELEVANT SYSTEM CONFIGURATION :
Standard user account in Vista (not limited)

A DESCRIPTION OF THE PROBLEM :
1.  JRE is apparently dynamically linked to the MSVCR71.dll instead of using static linking.
2.  This DLL is not in system32 for standard Vista installs, and with standard user rights the java.com Download installer does not add the file there.

Possible fixes are either using static linking (preferred) or change the installer to run as administrator.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
This is OK for the full IE7, but any use of the component version of IE, such as an MFC CHtmlView, will APPCRASH with c0000005 exception as soon as the embedded browser tries to load any applet.

For a bug report that describes the symptoms without noting the cause, see # 6539732

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
browser component loads and runs applet
ACTUAL -
APPCRASH exception c000005

ERROR MESSAGES/STACK TRACES THAT OCCUR :
In MFC exes, APPCRASH exception c000005

in the VB.Net sample below it also displays the missing DLL name before the APPCRASH

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
Start Visual Studio 6 or 2005, use AppWizard to build an MFC EXE, change the view from CView to CHtmlView at last step of wizard.

In the OnInitialUpdate, change the navigation to the JVM version test page: .   java.com/en/download/help/testvm.xml

For a VB.Net crash see this article at CodeProject.com:
Working with the Web Browser Control in Visual Studio 2005 - IE7Clone. By tmaxwell07
Download source or demo, run, navigate to any page with Java applet

All of this requires running without the DLL in the system32 folder, which is the state of a normal Vista install that doesn't have developer tools installed.
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
Manually copy the DLL into the same folder of the application using a browser component or into Windows > System32

Comments
EVALUATION should not be reproducible now.
14-10-2010

EVALUATION Microsoft documents that we should not be copying the msvcr71.dll to the system directory. Instead we should be statically linking and/or bundling the dll in our bin directory. This is more of a plugin bug, so I'm changing the category from java->install. Here is some info from Danielle on the subject. If you search for "MS_RUNTIME_STATIC" in our make/, you'll have: C:\HOME\MyWorkPlace\ws\LC\deploy\make\javaws\Makefile.javaws(15):MS_RUNTIME_STATIC = true C:\HOME\MyWorkPlace\ws\LC\deploy\make\javaws\activex\Makefile(12):MS_RUNTIME_STATIC=true C:\HOME\MyWorkPlace\ws\LC\deploy\make\plugin\jinstall\Makefile(18):MS_RUNTIME_STATIC=true C:\HOME\MyWorkPlace\ws\LC\deploy\make\plugin\jinstall\sdk\Makefile(18):MS_RUNTIME_STATIC=true C:\HOME\MyWorkPlace\ws\LC\deploy\make\plugin\jupdate\checker\Makefile(18):MS_RUNTIME_STATIC=true C:\HOME\MyWorkPlace\ws\LC\deploy\make\plugin\jupdate\jureg\Makefile(16):MS_RUNTIME_STATIC=true C:\HOME\MyWorkPlace\ws\LC\deploy\make\plugin\jupdate\scheduler\Makefile(16):MS_RUNTIME_STATIC=true C:\HOME\MyWorkPlace\ws\LC\deploy\make\plugin\nsstub\common.gmk(18):MS_RUNTIME_STATIC = true C:\HOME\MyWorkPlace\ws\LC\deploy\make\plugin\regutils\Makefile(18):MS_RUNTIME_STATIC=true C:\HOME\MyWorkPlace\ws\LC\deploy\make\plugin\regutilsmsi\Makefile(18):MS_RUNTIME_STATIC=true If the "MS_RUNTIME_OPTION=-MT" is passed correctly to the above files when "MS_RUNTIME_STATIC=true", then the above modules in deploy ws is already static linked msvcr71.dll. Of the above list, only the bold face line belongs to Plugin and is for FF/Moz. Therefore, the following FF JPI libraries should already be static linked with msvcr71: npjpi npjava11 npjava12 npjava32 npjava13 npjava14 npoji610 The bug however complains about IE7 on Win Vista. From the above search list, I don't see any component for JPI IE preprocessed with -MT (for static runtime). On another hand, both JPI for IE and FF require deploy.jar, which in turn, requires deploy.dll. Searching our make/, I found the following note in deploy/make/javaws/Makefile: # This "wrapper" Makefile exists because on Windows, deploy.dll (under # deploy.jar must be dynamically linked against msvcr71.dll while # javaws.exe must be statically linked. If it's true that deploy.dll is dynamically linked msvcr71.dll, then the problem is right there. You may want to check with Andy (or whoever wrote the above note) before static preprocess deploy.dll with mscvr71 though. Hope this helps. Danielle.
23-05-2007