uludaggonul / snow-dots

Automatically exported from code.google.com/p/snow-dots
0 stars 0 forks source link

matlabUDP fails periodically #18

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
As of Jan 25 2010
Sometimes the matlabUDP stops working. sent messages disappear and 
never arrive at destination sockets.

This seems to happen after a few runtest() sessions

Restarting Matlab consistently fixes it

So far this shows up with the messenger's default sockets, changing the 
ports for those sockets didn't help

I haven't figured out how to reproduce this in isolation.

This seems to happen only for two sockets that are connected to each 
other.

This happens during matlabUDP tests as well as dotsTheMessenger tests.

Original issue reported on code.google.com by Benjamin.Heasly on 29 Jan 2010 at 5:37

GoogleCodeExporter commented 8 years ago
I wonder if it has to do with re-opening an open socket, where I try to return 
the 
already-open socket. Maybe the sockets go stale and I don't detect it. Maybe in 
that 
case I should close and re-open, and try to return the same socketID.

Original comment by Benjamin.Heasly on 29 Jan 2010 at 5:37

GoogleCodeExporter commented 8 years ago
The stack track reports that the error happens when reading a string from a 
mxArray 
into the matlabUDP big byteBuffer.  I hadn't been checking the number of bytes 
to read 
against the size of the buffer, which was certainly responsible for some of the 
problems.  
Maybe all?

Original comment by Benjamin.Heasly on 9 Feb 2010 at 6:10

GoogleCodeExporter commented 8 years ago
As of r53, I'm not using matlabUDP anymore.  Instead I'm using mexUDPMxGram.  
The 
latter does a better job of counting bytes and imposes a maximum on the length 
of 
datagrams.

So far, with some amount of testing, this bug has not reappeared under 
mexUDPMxGram.

Original comment by Benjamin.Heasly on 16 Feb 2010 at 10:43