public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Bug in Cygwin-B20.1?
@ 1999-08-10  9:15 Radu Grosu
  1999-08-31 23:49 ` Radu Grosu
  0 siblings, 1 reply; 2+ messages in thread
From: Radu Grosu @ 1999-08-10  9:15 UTC (permalink / raw)
  To: cygwin, khan

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Bug in Cygwin-B20.1?
  1999-08-10  9:15 Bug in Cygwin-B20.1? Radu Grosu
@ 1999-08-31 23:49 ` Radu Grosu
  0 siblings, 0 replies; 2+ messages in thread
From: Radu Grosu @ 1999-08-31 23:49 UTC (permalink / raw)
  To: cygwin, khan

[-- Attachment #1: Type: text/plain, Size: 1235 bytes --]

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




[-- Attachment #2: lc.tar.gz --]
[-- Type: application/x-gzip, Size: 32635 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-08-31 23:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-08-10  9:15 Bug in Cygwin-B20.1? Radu Grosu
1999-08-31 23:49 ` Radu Grosu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).