|
From: SourceForge.net <no...@so...> - 2005-08-04 20:40:22
|
Bugs item #1252198, was opened at 2005-08-04 20:40 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101703&aid=1252198&group_id=1703 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Reuben Grinberg (reubgr) Assigned to: Nobody/Anonymous (nobody) Summary: RepastConsole problems Initial Comment: There are several serious problems with Repast Console. First, because it uses PipedInputStreams and since System.out.println, System.err.println, etc... are blocking calls, the UI slows down considerably when there is a lot of output. The correct approach is to use a ByteArrayOutputStream instead. Next, RepastConsole calls JTextArea.append from outside the Event Thread without using SwingUtilities.invokeAndWait, which is bad since Swing isn't thread safe. Next, Error and Out are read in two different threads which leads to strange output of the following nature: java.lang.NullPointerException at Society.build(Society.java:119) at net.sourceforge.indigosim.IndigoSociety.buildModel Step 1 (IndigoSociety.java:56) at uchicago.src.sim.engine.SimpleModel.begin(Unknown Source) at uchicago.src.sim.engine.BaseController.beginModel (Unknown Source) Step 2 at uchicago.src.sim.engine.AbstractGUIController.beginModel (Unknown Source) That is, the out and err become mixed in. Finally, it's sort of disconcerting to have the output disappear from the real console when it's redirected to the RepastConsole. I've fixed the problems I've mentioned here for my project, IndigoSim. I've put the relevant files here: http://indigosim.sourceforge.net/files/CopyPrintStream.java http://indigosim.sourceforge.net/files/IndigoConsole.java IndigoSim is liscensed under the BSDL and it should be trivial to modify the files above for Repast. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101703&aid=1252198&group_id=1703 |