Open GoogleCodeExporter opened 8 years ago
cannot reproduce - window pops up, key events are still handled
Original comment by pejob...@gmail.com
on 5 Nov 2012 at 4:14
Please look at threaddump http://pastebin.com/Ar29KTjd created when beanshell
is frozen.
The issue occurs when pasted block of code is large enough, so that Interpreter
running in Thread-3 starts to send output before the block of code is sent to
PipedOutputStream.
In the threaddump, AWT-EventQueue-0 thread is blocked, it's trying to send
large command to PipedOutputStream, therefore it's unable update user
interface. Thread-3 is blocked as well, it's trying to execute some code in
Swing UI thread (by calling SwingUtilities.invokeAndWait method). These two
threads are waiting for each other.
Original comment by michal.b...@gmail.com
on 5 Nov 2012 at 8:42
[deleted comment]
In Issue #81 the following comment concerning this issue was added by Michael
Bergmann:
<snip>
I've also loaded beanshell console into eclipse and looked at source code.
There are actually two bugs in Beanshell Console code, fixing either one of
them (preferably both) should resolve the issue.
1st bug : method bsh.util.JConsole.acceptLine - Text inputted by user is written to PipedOutputStream in Swing UI thread - that should happen in another thread.
2nd bug : methods bsh.util.JConsole.print - response from Interpreter should be printed to console using SwingUtilities.invokeLater method instead of SwingUtilities.invokeAndWait
</snip>
Original comment by pejob...@gmail.com
on 6 Nov 2012 at 7:33
Original comment by pejob...@gmail.com
on 6 Nov 2012 at 7:33
As mentioned a timing issue. "SwingUtilities.invokeAndWait" is evil (deadlock
prone).
Original comment by pejob...@gmail.com
on 6 Nov 2012 at 7:41
Issue 81 has been merged into this issue.
Original comment by pejob...@gmail.com
on 6 Nov 2012 at 7:41
Original issue reported on code.google.com by
michal.b...@gmail.com
on 31 Oct 2012 at 4:29