How to diagnose Java JNI EXCEPTION_ACCESS_VIOLATION errors in Windows Vista

前端 未结 2 1023
醉酒成梦
醉酒成梦 2021-02-10 03:39

We have a Java application that uses some C++ libraries through JNI. The application used to work just fine in Windows XP, but it does not work in Windows Vista, it just crashes

2条回答
  •  日久生厌
    2021-02-10 04:37

    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.

提交回复
热议问题