Are you possibly leaving a "dangling pointer?" I've found that (at least in C/C++) if I forget to free a pointer, that I get seg faults... Maybe your lib isn't doing this, & java can't, because it's in the lib? (just a WAG) > -----Original Message----- > From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]] > Sent: Wednesday, June 28, 2000 4:49 PM > To: [EMAIL PROTECTED] > Subject: Could any one help me in solving this segmentation fault > > Hi friends, > I am getting segmentation problem from my shared library. After some time > the application terminates with the segmentation problem. No where I am > going out of bounds of an array or not using an illegal pointer or > dereferencing it. Please see startPolling() function of NativeLayer.c (the > attachment). > > This is basically a Java Application. It loads the shared library and > accesses its native methods. I think you need small info before I describe > the problem : > > 1. My application contains Java + Native codes > 2. Java loads shared library and calls a native method that has > infinite loop. Because control should come back to Java, I am calling it > in > a thread. > 3. The native method keeps calling Java methods from that loop as > and when there is an event. I have attached source and core file also. > please have a look at them > > 4. I wrote a Java command line application over this native shared > library. > It never gave segmentation problem. However when I test it through a Java > Graphical User Interface it terminates with segmentation fault. > > I am using Redhat Linux 6.1 glibc 2.1.2 and IBM jdk1.1.8 > Hardware: IBM PC with 64MB RAM. > > Could any help me in solving this. I tried my best to find the reason. But > could not. Please help me. > > regards, > syam << File: javacore1033.txt >> << File: NativeLayer.c >> -- To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject.