Debugging JVM crashes on Windows

I wrote a piece of software in Java that communicates with USB hardware using a DLL provided by the hardware vendor. I used Java Native Access to write wrappers in native code. Sometimes, when I run it, only to the native functions related to the code, the JVM crashes, and I can not find the cause of the error, because this happens in the native code, to which I do not have the source code (MSVCRT71.DLL).

I have been a Linux developer most of the time, so I'm not used to this situation. What can I do to connect a debugger from outside (say, Visual C ++) to the JVM process and get something meaningful from it (that is, not Assembly instructions)?

+3
source share
1 answer

MSVCRT71.DLL is a dll for the c-runtime libraries included with Visual Studio 7.1.

Install Visual Studio 7.1, which has a crt source. Go to Debug->, find the java instance that you are using, then click "Attach".

If you cannot use VS7, try this.

[ http://www.microsoft.com/whdc/DevTools/Debugging/default.mspx.BIZ[1]

make sure you get the characters for this crt version

+2
source

Source: https://habr.com/ru/post/1702935/


All Articles