JNI? Code Bug or GCC issue?

L

Lordy

Hi Ive got a little JNI class that calls some functions of mine that use a
3rd party dll.
This DLL provides some RPC functions to a help desk application (Remedy)

Whenever the connection is closed I get an EXCEPTION_ACCESS_VIOLATION
in the 3rd party app.

Now the immediate assumption (after lots of code reduction) is that the 3rd
party libray is doing something naughty - however these DLLs are used
without problem by almost every type of client that accesses the system,

The program runs fine as pure C code, but it bombs with JNI.

Now the caveat is I'm using GCC rather than the recommended MSVC,
when it bombs under Java 1.5 the error is

EXCEPTION_ACCESS_VIOLATION ... Problematic Stack Frame"

Could it be the way I'm building the DLL? Rather than a pure 3rd party
error?

(using cygwin/gcc 3.3.1 and java 1.4.2_04 / 1.5.0 )

Link line below...

Cheers,
Lordy
 
L

Lordy

Hi Ive got a little JNI class that calls some functions of mine that
use a 3rd party dll.
This DLL provides some RPC functions to a help desk application
(Remedy)

Whenever the connection is closed I get an EXCEPTION_ACCESS_VIOLATION
in the 3rd party app.

Now the immediate assumption (after lots of code reduction) is that
the 3rd party libray is doing something naughty - however these DLLs
are used without problem by almost every type of client that accesses
the system,

The program runs fine as pure C code, but it bombs with JNI.

Now the caveat is I'm using GCC rather than the recommended MSVC,
when it bombs under Java 1.5 the error is

EXCEPTION_ACCESS_VIOLATION ... Problematic Stack Frame"

Could it be the way I'm building the DLL? Rather than a pure 3rd party
error?

(using cygwin/gcc 3.3.1 and java 1.4.2_04 / 1.5.0 )

Link line below...

Cheers,
Lordy

Oopps link line got chopped ...

gcc -mno-cygwin -Wl,--add-stdcall-alias -shared -Wl,--export-all-symbols
-Wl,--enable-auto-import -o mydll.dll
\
-Wl,--out-implib=IMChangeControl.dll.a \
-Wl,--whole-archive JavaStub.o \
-Wl,--no-whole-archive mod1.o mod2.o etc.

JavaStub.c contains the jni stub functions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top