Open cxbrooks opened 7 years ago
Edward wrote:
"If I have wifi on and connected to an access point but not to the internet (e.g. to United's wifi network on a plane), then opening a model stalls forever trying to update the accessors SVN repo. Perhaps it needs a timeout, rather than just responding to an error?"
The workaround is to set the PT_NO_NET environment variable. I updated JSAccessor.java so that a message is printed:
--start-- bash-3.2$ rm $PTII/org/terraswarm/accessor/accessors/web/Accessor_1.dtd bash-3.2$ $PTII/bin/capecode $PTII/org/terraswarm/accessor/demo/AugmentedReality/AugmentedRealityKeyValueStore.xml Updating local copy of the accessors repository. JSAccessor: If running svn hangs, then try setting the PT_NO_NET environment variable to skip running svn and jsdoc. In "/Users/cxh/src/ptII11.0.devel/org/terraswarm/accessor/accessors", about to execute: svn update --non-interactive --trust-server-cert --accept postpone Updating '.': Restored 'web/Accessor_1.dtd' --end--
The real fix would be to use the java.lang.Process waitFor(long timeout, TimeUnit unit) method. To do this would require modifying ptolemy/util/StreamExec.java so that the timeout can be set. Really, the ExecuteCommands interface should be updated and all the derived classes should use this method.
Note: the issue was created automatically with bugzilla2github tool
Original bug ID: BZ#545 From: @cxbrooks Reported version: unspecified CC: accessors-devel@terraswarm.org