Re: JNI EXCEPTION_ACCESS_VIOLATION
- From: "Inácio Ferrarini" <inacio.ferrarini@xxxxxxxxx>
- Date: 11 Aug 2006 05:15:11 -0700
Hi there.
I am not experienced (I never did) in coding a dll and access it via
Java, but, I would say to you that, if you do not mind, try to use the
same DLL via C++ or other windows native language, and, use the same
thing on the test app that your Java app uses, and, see if the crash
still occurs. This way, you will be able to isolate if the error is
internal of the dll or of the way you are using it in Java - even if
the error only happens sometimes under certain so quasai conditions -
but, as said before, it does not mean that the code is entirely ok.
Hope I Helped,
- Inácio Ferrarini
esandfort wrote:
I have a java application which calls into a VC++ DLL via JNI. Within
the DLL, I call some code via a 3rd party API which ultimately does
some disk IO. When the "File Writing" code is hit, my application
crashes. I get the following error (I'll spare you the entire dump)
An unexpected exception has been detected in native code outside the
VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at
PC=0x7C9111DE
Function=wcsncpy+0x74F
Library=C:\WINDOWS\system32\ntdll.dll
Here are a couple of interesting points...
The code will crash when running under XP Service Pack 2
The code will NOT crash when running under Windows 2000 Service Pack 4
When running on XP, the code will crash if the java progam makes either
of the following calls before making the JNI call:
UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
- or -
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
When running on XP, the code will NOT crash if I omit the
setLookAndFeel() call all together, or use an alternate L&F (Metal for
example)
I have spent the past couple of days trying to find clues to this
problem on the newsgroups, and have had absolutely no luck.
If anyone has any experience with this problem, I would appreciate any
leads.
Also - if anyone could recommend any tools and/or techniques that would
be useful in debugging a VM crash such as I described above, that would
be appreciated as well.
Thanks!
Ed Sandfort
.
- Follow-Ups:
- Re: JNI EXCEPTION_ACCESS_VIOLATION
- From: esandfort
- Re: JNI EXCEPTION_ACCESS_VIOLATION
- References:
- JNI EXCEPTION_ACCESS_VIOLATION
- From: esandfort
- JNI EXCEPTION_ACCESS_VIOLATION
- Prev by Date: Re: String.valueOf() Memory Leak inside of thread.
- Next by Date: Re: String.valueOf() Memory Leak inside of thread.
- Previous by thread: Re: JNI EXCEPTION_ACCESS_VIOLATION
- Next by thread: Re: JNI EXCEPTION_ACCESS_VIOLATION
- Index(es):
Relevant Pages
|