rihardsk / rl-glue-ext

Automatically exported from code.google.com/p/rl-glue-ext
Apache License 2.0
0 stars 0 forks source link

Matlab Codec Freezes Matlab if communication problem (help wanted) #38

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If you accidentally connect a matlab agent and another type of agent, or
any number of other common accidents, you might freeze all of matlab,
requiring you to force-quite and restart it.

I'm not sure exactly how to resolve this. Maybe by putting timeouts in the
Java codec and the using loops in the matlab code to call it?  Basically,
we need a way of forcing Matlab to come back from Java system calls.

Original issue reported on code.google.com by brian.ta...@gmail.com on 3 Nov 2008 at 3:56

GoogleCodeExporter commented 9 years ago
By the way, you say in the matlab documentation that you can only run one 
instance of
matlab.

This is not true at least for me on Windows Vista, Matlab Release 2007a.

Check this.

Original comment by xjamartinh@gmail.com on 10 Dec 2008 at 12:24

GoogleCodeExporter commented 9 years ago
This problem is still true. Matlab blocks when waiting for data from rl-glue, 
so if
rl-glue dies or is killed, then Matlab just sits.  You cannot ctrl-c it.  I've 
tried
interrupting the IO thread using Matlab timers, no good, they won't.

Not sure how to proceed.  This kindof makes matlab suck because it is very 
brittle.

Original comment by brian.ta...@gmail.com on 21 Jan 2009 at 10:25

GoogleCodeExporter commented 9 years ago

Original comment by brian.ta...@gmail.com on 22 Jan 2009 at 7:28

GoogleCodeExporter commented 9 years ago
This is actually resolved.  The Java codec was hanging when the other end 
closed the
connection, we weren't catching that read was returning -1.

Now that it is, it throws an RLGlueDisconnectedException, and the Matlab codec 
comes
back.  Hooray.

Original comment by brian.ta...@gmail.com on 7 Feb 2009 at 2:57