Name: gm110360 Date: 07/02/2004
FULL PRODUCT VERSION :
java version "1.5.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b51)
Java HotSpot(TM) Client VM (build 1.5.0-beta2-b51, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
I am using LoadLibrary() and GetProcAddress() to call JNI_CreateJavaVM() from jvm.dll. This works fine from a normal application. In my application, however, I am subclassing SysListView32's WindowProc and causing it to create a JVM within its process-space. When I do this, the call crashes with:
Unhandled exception at 0x6d67d8b8 in
explorer.exe: 0xC0000005: Access violation reading location 0x00000000.
and it looks like there is possibly a stack-overflow by looking at the call-stack window. If, however, I link statically against jvm.lib and invoke JNI_CreateJavaVM() from it, it loads fine. I went to great lengths to verify my arguments and code against both JDK 1.4.2_04 and JDK 1.5 beta 2. My VM creation routine is taken directly from the JNI_CreateJavaVM() sample in the JNI documentation.
From this I conclude that there is some sort of bug in JNI_CreateJavaVM() in JVM.DLL but I need Sun's help to debug this. Normally I would regenerate JVM.DLL with debugging symbols under VC++ but the source-codes do not ship with a project-file and I am not about to generate one from scratch as it will take a very very long time.
Can a Sun engineer please work with me to zero in on the cause of the crash? Shipping me a version of jvm.dll with debug symbols should be enough for me to get back a line number in the JDK source-codes and send an explanation for the cause of the crash back to Sun.
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
Link statically against JVM
(Incident Review ID: 282242)
======================================================================