Subject: Bug in Cygwin-B20.1?
From: Radu Grosu <[email-masked]>
To: [email-masked], [email-masked]
Date: Tue, 10 Aug 1999 12:15:05 -0400

I took the java-jni/c example of Mumit and modified it as follows:

1. dhello2 (in hello2.dll) calls dhello1.
2. dhello1 (in hello1.dll) calls dhello.
3. dhello (in hello.dll) is Mumit's function.

4. hello2.dll is linked to the java program and built by using
hello1.lib (see hello2Make)
5. hello1.dll is built by using hello.lib (see hello1Make)

I built the libraries using an adapted version of Mumit's Makefile.cyg
to account for libraries. This worked fine.

Now I added a function pointer declaration in hello.c together with an
external dummy function:

extern void dummyHello(JNIEnv *, jobject);
void (*extFncPtr)(JNIEnv *, jobject) = dummyHello;

void dummyHello(JNIEnv *env, jobject obj){}

I also changed hello1.c by adding the following:

  extern void (*extFncPtr)(JNIEnv *,jobject);
  extFncPtr = dHello;

I recompiled and linked the code. Now starting the program with "java
Main" I get the following message:

            " JAVA caused and invalid page fault in module hello1.dll"

Is this a BUG of Cygwin-B20.1?

All the source and make files are in the attached gzipped, tar file. The
source codes are shorter (together) than this email.

Any help will be greatly appreciated.

With many thanks in advance,

radu

--
Want to unsubscribe from this list?
Send a message to [email-masked]