Hi Bob,
The environment I run Jmol (V 11.2.8) on is quite sensitive and it was
able to detect a hidden thread violation from using the Run button in
the script console window. I typed a script command (for example, spin
on) in the console window, and click the Run button. I can see warnings
about Swing component being access from a thread other than the Event
Dispatch Thread (EDT). I looked up the ScriptWindow.java, and indeed in
executeCommand method, console, runButton and haltButton are being
accessed from the ExecuteCommandThread instead of EDT. Would you please
take a look at this and put the call to these Swing components to
SwingUtilities.invokeLater or SwingUtilities.invokeAndWait?
Thank you very much.
Li Yang
//----------------------------------------------------------------------
-------//
Below is the thread warning
A Swing component is being accessed on a thread (Thread-106) other than
the Event Dispatch Thread.
Component:
org.openscience.jmol.app.ConsoleTextPane[,0,0,588x336,invalid,layout=jav
ax.swing.plaf.basic.BasicTextUI$UpdateHandler,alignmentX=0.0,alignmentY=
0.0,[EMAIL PROTECTED],flag
s=296,maximumSize=,minimumSize=,preferredSize=,caretColor=javax.swing.pl
af.ColorUIResource[r=0,g=0,b=0],disabledTextColor=javax.swing.plaf.Color
UIResource[r=128,g=128,b=128],editable=true,margin=javax.swing.plaf.Inse
tsUIResource[top=3,left=3,bottom=3,right=3],selectedTextColor=javax.swin
g.plaf.ColorUIResource[r=255,g=255,b=255],selectionColor=javax.swing.pla
f.ColorUIResource[r=10,g=36,b=106],kit=javax.swing.text.StyledEditorKit@
510e35,typeHandlers={text/[EMAIL PROTECTED]
]
at java.awt.Component.repaint(Unknown Source)
at javax.swing.text.DefaultCaret.repaint(Unknown Source)
at javax.swing.text.DefaultCaret.changeCaretPosition(Unknown Source)
at javax.swing.text.DefaultCaret.handleSetDot(Unknown Source)
at javax.swing.text.DefaultCaret.setDot(Unknown Source)
at javax.swing.text.DefaultCaret.setDot(Unknown Source)
at javax.swing.text.JTextComponent.setCaretPosition(Unknown Source)
at
org.openscience.jmol.app.ConsoleDocument.appendNewline(ScriptWindow.java
:623)
at
org.openscience.jmol.app.ConsoleTextPane.appendNewline(ScriptWindow.java
:360)
at
org.openscience.jmol.app.ScriptWindow.executeCommand(ScriptWindow.java:2
50)
at
org.openscience.jmol.app.ScriptWindow$ExecuteCommandThread.run(ScriptWin
dow.java:175)
A Swing component is being accessed on a thread (Thread-106) other than
the Event Dispatch Thread.
Component:
javax.swing.JButton[,90,5,47x23,alignmentX=0.0,alignmentY=0.5,border=jav
[EMAIL PROTECTED],flags=29
6,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,di
sabledSelectedIcon=,margin=javax.swing.plaf.InsetsUIResource[top=2,left=
11,bottom=2,right=11],paintBorder=true,paintFocus=true,pressedIcon=,roll
overEnabled=false,rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text
=Halt,defaultCapable=true]
at java.awt.Component.repaint(Unknown Source)
at javax.swing.JComponent.setEnabled(Unknown Source)
at javax.swing.AbstractButton.setEnabled(Unknown Source)
at
org.openscience.jmol.app.ScriptWindow.executeCommand(ScriptWindow.java:3
01)
at
org.openscience.jmol.app.ScriptWindow$ExecuteCommandThread.run(ScriptWin
dow.java:175)
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users