I committed this fix now. I think the exception within the exception was hidden
enough that I can be excused from detention for causing this one (though of
course I had the brilliant idea of constructing the comment there (which is
never used elsewhere in the code) as well - but that was many months ago). 

Of course, I just did the arch sin and committed while drunk, but I'm pretty
sure I didn't break anything...

On Wed, 12 Apr 2000, hal at finney.org wrote:
> Paul writes:
> > java.lang.NullPointerException:
> >         at Freenet.SendFailedException.<init>(SendFailedException.java:9)
> >         at Freenet.Message.sendBack(Message.java:278)
> >         at Freenet.message.InsertReply.pReceived(InsertReply.java:33)
> >         at Freenet.Message.received(Message.java:166)
> >         at 
> > Freenet.node.StandardMessageHandler.handle(StandardMessageHandler.java:86)
> >         at Freenet.ConnectionHandler.run(ConnectionHandler.java:95)
> 
> Ah, no doubt that's the same NullPointerException that Oskar was puzzling
> over this morning.  The stack trace was incomplete that time due to
> the use of compiled Java.  Now we see that the exception is happening
> one deeper on the stack than we realized.  Oskar said it should throw
> a ConnectFailedException, and it appears that it did so, but when it
> tried to turn this into a SendFailedException there was no peer to use.
> 
> This happens when we get a second InsertReply after sending one, so we
> do want to reject the message.  Your fix is probably reasonable just
> to suppress the spurious NullPointerException.  That way we'll just log
> the error and discard the message.
> 
> > So I peeked at SendFailedException.java and changed
> > 9c9
> > <       super("Failed to connect to " + addr.toString());
> > ---
> > >       super("Failed to connect to " + (addr==null? "NULL" 
> > > :addr.toString()));
> 
> Hal
> 
> _______________________________________________
> Freenet-dev mailing list
> Freenet-dev at lists.sourceforge.net
> http://lists.sourceforge.net/mailman/listinfo/freenet-dev
-- 

Oskar Sandberg

md98-osa at nada.kth.se

#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)

_______________________________________________
Freenet-dev mailing list
Freenet-dev at lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/freenet-dev

Reply via email to