Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JNI_CreateJavaVM crashes in Release mode

843829Jan 9 2007
Hello,

I execute following lines successfully in Debug configuration of my Visual C++ 7 project:
	JavaVMInitArgs args;
	args.version = JNI_VERSION_1_2;
	args.nOptions = 0;
	args.options = NULL;
	args.ignoreUnrecognized = JNI_FALSE;
	jint res=JNI_CreateJavaVM(&jvm, (void **)&env, &args);
..and subsequent java-operation-invocations work excellent.

However when I run my project in Release configuration, the last line causes a crash of my application. If you are interested in the call stack:
MFC71u.dll!CMapPtrToPtr::GetValueAt(void * key=0x003b06fe) Line 182 C++
MFC71u.dll!CWnd::DestroyWindow() Line 985 C++ MFC71u.dll!CToolTipCtrl::DestroyToolTipCtrl() Line 75 C++ MFC71u.dll!AFX_MODULE_THREAD_STATE::~AFX_MODULE_THREAD_STATE() Line 164 C++ MFC71u.dll!AFX_MODULE_THREAD_STATE::`scalar deleting destructor'() + 0x8 C++ MFC71u.dll!CThreadSlotData::DeleteValues(CThreadData * pData=0x001553f8, HINSTANCE__ * hInst=0x00000000) Line 350 C++ MFC71u.dll!CThreadSlotData::DeleteValues(HINSTANCE__ * hInst=0x00000000, int bAll=1) Line 390 + 0xf C++ MFC71u.dll!DllMain(HINSTANCE__ * hInstance=0x7c250000, unsigned long dwReason=0, void * __formal=0x00000001) Line 650 C++ MFC71u.dll!_DllMainCRTStartup(void * hDllHandle=0x7c250000, unsigned long dwReason=0, void * lpreserved=0x00000001) Line 272 + 0xd C
However this callstack is not related to my routines calling JNI..

Any help would be great.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 6 2007
Added on Jan 9 2007
0 comments
311 views