Hi Andrew, To better understand what you are asking: - I need to look at the gcc-4.1.2 source to see if gnu.java.nio.ServerSocketChannelImpl inherits from java.nio.channels.SocketChannel? - "This is caused by a bug somewhere when generating stack traces", you mean in classpath or libgcj in my case. I must then return you an indication in your code? This is a bug of yours? Many Thanks, David Sayada. -----Original Message----- From: Andrew Haley [mailto:aph-gcc@xxxxxxxxxxxxxxxxxxx] Sent: Thursday, August 30, 2007 10:48 AM To: David Sayada Cc: classpath@xxxxxxx; 'Amnon David' Subject: RE: SIGSEGV issue David Sayada writes: > Hi Andrew, > > In fact, the exception I am receiving is the following one: > > java.lang.ClassCastException: > > gnu.java.nio.ServerSocketChannelImpl cannot be cast to > java.nio.channels.SocketChannel > > What can make such an exception to occur? Does gnu.java.nio.ServerSocketChannelImpl inherit from java.nio.channels.SocketChannel? Have a look. > Also can it cause an application to terminate with signal SIGSEGV? No. This is caused by a bug somewhere when generating stack traces. You need to run our app under gdb and tell us exactly where the segv happens. Andrew.