How to diagnose Java JNI EXCEPTION_ACCESS_VIOLATION errors in Windows Vista

不羁岁月 提交于 2019-12-03 08:54:01
Jon

Perhaps your problem is mixing c runtime libraries because you updated your C compiler? I see in your stack dump both msvcr71.dll and msvcrt.dll. According to this Microsoft Library

If your DLLs pass CRT resources across the msvcrt.dll and msvcr71.dll boundary, you will encounter issues with mismatched CRTs and need to recompile your project

The implication seems to be that JNI extensions should use the same compiler/runtime as used to build the jre, but I can't find any reference to say that is so. I'd welcome another answer telling my why I am wrong and how I can get around the same problem myself.

Kim Gräsman

Try setting up WinDBG, and hook up a symbol server, so you can get symbols for the OS DLLs.

Then run your Java app under WinDBG and trap the crash there. With any luck you should be able to find your native code in the call stack, or at least something you can recognize.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!