Skip to main content

SwingX 0.9.7 : SloppyHtmlEditorKit bug

1 reply [Last post]
Anonymous

Hello,

I'm currently using SwingX 0.9.7.

I'm using CheckingRepaintManager to identify invocation of graphic functionalities outside the EDT.

It seems that JXEditorPane.SloppyHtmlEditorKit does processings in an other thread than the EDT.

Has it been fixed in a posterior version ?

I tried the last version (1.6.2) but some of the classes I use are not in the package anymore (FilterPipeline, SortController, SortOrder, etc) so I

cannot test it myself.

Here is the stack :

at javax.swing.JComponent.repaint(JComponent.java:4734)
at java.awt.Component.repaint(Component.java:3081)
at javax.swing.text.View.updateLayout(View.java:1216)
at javax.swing.text.View.changedUpdate(View.java:768)
at javax.swing.text.html.BlockView.changedUpdate(BlockView.java:324)
at javax.swing.plaf.basic.BasicTextUI$RootView.changedUpdate(BasicTextUI.java:1618)
at javax.swing.plaf.basic.BasicTextUI$UpdateHandler.changedUpdate(BasicTextUI.java:1879)
at javax.swing.text.AbstractDocument.fireChangedUpdate(AbstractDocument.java:214)
at javax.swing.text.html.HTMLDocument.fireChangedUpdate(HTMLDocument.java:1332)
at javax.swing.text.html.HTMLDocument$HTMLReader.adjustEndElement(HTMLDocument.java:2073)
at javax.swing.text.html.HTMLDocument$HTMLReader.flush(HTMLDocument.java:2128)
at javax.swing.text.html.HTMLEditorKit.read(HTMLEditorKit.java:231)
at org.jdesktop.swingx.JXEditorPane$SloppyHTMLEditorKit.read(JXEditorPane.java:763)
at javax.swing.JEditorPane.read(JEditorPane.java:555)
at javax.swing.JEditorPane.read(JEditorPane.java:583)
at javax.swing.JEditorPane$PageLoader.run(JEditorPane.java:646)

Thanks for your help

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kschaefe
Offline
Joined: 2006-06-08

It's a bug in core. Document changes are synchronized and may occur on any thread. BasicTextUI is not properly checking whether the current thread is the EDT before updating the view.

Karl