problem with JAVA and global constructors in dll

Dr. Schroeder, Klaus
Fri Jan 7 06:20:00 GMT 2000


I'm running a Java-application using native IO-routines from my.dll,
which I built using the rules outlined by Mumit Kahn in his
java-jni-examples. The example runs just fine including the calling of
the global constructor, but using my own functions crashes with a
segmentation violation in ioctl.

Using gdb and a cygwin1.dll-Version with symbols I found, that ioctl
uses a global instance of class locker defined in (locker __tn
NO_COPY;).  This instance apparently was not initalized, which caused
the segmentation violation.

My Question: Why are the global constructors of cygwin1.dll not called,
when used in the above fashion? Is there a way to call them explicitly?

Additional information:

I'm running cygwin B20.1 on
WinNT Ver 4.0 build 1381 Service Pack 5

The IO-Routines which cause the Java-Crash run correctly from a
C++-application built with cygwin on the same system.


 Dr. Klaus Schröder          E-Mail :
 repas AEG Software GmbH     Phone  : +49 30 89714 871
 Hohenzollerndamm 150        Fax    : +49 30 89714 990
 D 14199 Berlin

Want to unsubscribe from this list?
Send a message to

More information about the Cygwin mailing list