Re: TCPSession.sendFrame: NullPointerException

Pete Siemsen <[email protected]> Mon, 05 Dec 2005 10:43:16 -0700
Newsgroups gmane.network.beep.beepcore.java.general
Message-ID <[email protected]>
I haven't seen much traffic on this list since I joined. It's good to 
see some.

I found a bug in Java BEEP and reported it to the buglist at the BEEP
SourceForge site.  I just wonder - is that the right thing to do, or are 
other
users using this list to talk about bugs?

-- Pete

Wladimir Araujo wrote:
> I've run into this a couple of times. TCPSession has some race
> conditions re the socket manipulation. What I do to avoid these problems
> (all but one) is to guarantee that the channel and session cannot be
> closed while sending messages (through external locks). Of course, if
> the session is closed from the other side there is nothing we can do. In
> this case, the NullPointerException kills the TCPSEssion thread (created
> inside enableIO()).
>
> Fixing these problems is not trivial (chance of distributed deadlock),
> so I decided it was easier to live with them ;-)
>
> Wladimir 
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of
> Lukas Zbinden
> Sent: Monday, December 05, 2005 6:21 AM
> To: [email protected]
> Subject: [Beepcore-java-users] TCPSession.sendFrame:
> NullPointerException
>
> Hi
>
> We use the beepcore java library in our diploma project 'a  
> collaborative editor'.
> When two users collaboratively edit a document, each character is sent  
> over a channel by a call to
> myChannelImplInstance.sendMSG(outputData, myReplylistener).
> Both sides use the same channel. After a while (both users type very  
> fast, i.e.
> channel.sendMSG(..) is called at a high rate), the following exception  
> occurs:
>
> Caused by: java.lang.NullPointerException
>          at  
> org.beepcore.beep.transport.tcp.TCPSession.sendFrame(TCPSession.java: 
> 291)
>          at  
> org.beepcore.beep.core.ChannelImpl.sendFrames(ChannelImpl.java:837)
>          at  
> org.beepcore.beep.core.ChannelImpl.sendQueuedMessages(ChannelImpl.java: 
> 773)
>          at  
> org.beepcore.beep.core.ChannelImpl.sendToPeer(ChannelImpl.java:754)
>          at  
> org.beepcore.beep.core.ChannelImpl.sendMSG(ChannelImpl.java:414)
>          at  
> ch.iserver.ace.net.impl.protocol.AbstractConnection.send(AbstractConnect
>
> ion.java:77)
>          at  
> ch.iserver.ace.net.impl.protocol.ParticipantConnectionImpl.sendToPeer(Pa
>
> rticipantConnectionImpl.java:261)
>          at  
> ch.iserver.ace.net.impl.protocol.ParticipantConnectionImpl.sendRequest(P
>
> articipantConnectionImpl.java:157)
>          at  
> ch.iserver.ace.collaboration.jupiter.server.ParticipantConnectionWrapper
>
> .sendRequest(ParticipantConnectionWrapper.java:177)
>          at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
>          at  
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
>
> Impl.java:25)
>          at java.lang.reflect.Method.invoke(Method.java:324)
>          at  
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(
>
> AopUtils.java:335)
>          at  
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinp
>
> oint(ReflectiveMethodInvocation.java:181)
>          at  
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Ref
>
> lectiveMethodInvocation.java:148)
>          at  
> ch.iserver.ace.util.AsyncMethodInvocation.proceed(AsyncMethodInvocation.
>
> java:100)
>          at ch.iserver.ace.util.AsyncWorker.doWork(AsyncWorker.java:102)
>          at ch.iserver.ace.util.Worker.run(Worker.java:49)
>
>
> Does anyone know this problem? Is it a bug or do I use the channel the  
> wrong way?
>
> Any help highly appreciated.
>
> Lukas
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> Beepcore-java-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/beepcore-java-users
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
> _______________________________________________
> Beepcore-java-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/beepcore-java-users
>   



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click