[kaffe] Bug Report: NIO SelectorImpl crashing

Everton da Silva Marques everton at lab.ipaccess.diveo.net.br
Wed Oct 29 15:05:02 PST 2003


Please find attached a small test program which
reproduces the following crash under Kaffe 1.1.2:

/usr/local/kaffe/bin/java -classpath build telnet.TelnetServer
waiting for connections on 1234
java.lang.NullPointerException
   at gnu.java.nio.SelectorImpl.deregisterCancelledKeys (SelectorImpl.java:234)
   at gnu.java.nio.SelectorImpl.select (SelectorImpl.java:146)
   at gnu.java.nio.SelectorImpl.select (SelectorImpl.java:92)
   at telnet.TelnetServer.serve (TelnetServer.java:93)
   at telnet.TelnetServer.main (TelnetServer.java:22)

I have looked quickly on the problem, and it seems
SelectorImpl.deregisterCancelledKeys() calls cancelledKeys(),
which is inherited as "returning null" from AbstractSelector:

class SelectorImpl extends AbstractSelector:

  private final void deregisterCancelledKeys()
  {
    Iterator it = cancelledKeys().iterator();
    ...

class AbstractSelector:

  protected final Set cancelledKeys()
  {
    return null;
  }

So is someone writing SelectorImpl.cancelledKeys()...? ;)

Regards,
Everton

-------------- next part --------------
A non-text attachment was scrubbed...
Name: TelnetServer.java
Type: text/x-java
Size: 4383 bytes
Desc: not available
Url : http://kaffe.org/pipermail/kaffe/attachments/20031029/ffb24fb4/attachment-0002.java 


More information about the kaffe mailing list