-
Bug
-
Resolution: Fixed
-
P2
-
1.4.0
-
beta2
-
sparc
-
solaris_8
-
Verified
java version "1.4.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b56)
Java HotSpot(TM) Client VM (build 1.4-beta-B56, mixed mode)
Run the attached program and hold down "Shift+A" so that "A" is repeatedly typed into the JEditorPane. About 1/2 - 3/4 of the way down in the JEditorPane, you'll notice that instead of the characters being typed out nice and smoothly like in the beginning, output will start to become choppy and in intermittent spurts. Eventually, it becomes so slow that you may think that the system has locked up, but if you wait a while (sometimes a LONG while), the screen will repaint properly and show the other characters that were typed. It's as if the event queue is not processing the typed characters fast enough and some sort of bottleneck is happening.
I did this on an Ultra 1. I tried reproducing it on an Ultra 10, but it didn't happen, at least not right away. Perhaps the speed of the system plays a part in why this is not happening on an Ultra 10.
Also, I tried this on b53 on my Ultra 1 and it didn't happen, at least not right away. I couldn't try it on b54 or b55 due to internal error bugs showing up in Hotspot VM.
I have included the stack dump in case that gives any clue into the problem.
----------------------------------------------
^\Full thread dump:
"TimerQueue" daemon prio=5 tid=0x1b6c40 nid=0x10 waiting on monitor [f3601000..f36019e0]
at java.lang.Object.wait(Native Method)
- waiting on <f5085620> (a javax.swing.TimerQueue)
at javax.swing.TimerQueue.run(TimerQueue.java:234)
- locked <f5085620> (a javax.swing.TimerQueue)
at java.lang.Thread.run(Thread.java:579)
"Thread-2" daemon prio=6 tid=0x12d958 nid=0xf waiting on monitor [f3701000..f37019e0]
at java.lang.Object.wait(Native Method)
- waiting on <f5085680> (a java.util.TaskQueue)
at java.util.TimerThread.mainLoop(Timer.java:432)
- locked <f5085680> (a java.util.TaskQueue)
at java.util.TimerThread.run(Timer.java:385)
"Thread-0" prio=5 tid=0x28d70 nid=0x1 runnable [0..ffbee260]
"AWT-EventQueue-0" prio=5 tid=0xd2a80 nid=0xe runnable [f3800000..f38019e0]
at javax.swing.text.WrappedPlainView.insertUpdate(WrappedPlainView.java:445)
at javax.swing.plaf.basic.BasicTextUI$RootView.insertUpdate(BasicTextUI.java:1403)
at javax.swing.plaf.basic.BasicTextUI$UpdateHandler.insertUpdate(BasicTextUI.java:1637)
at javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:185)
at javax.swing.text.AbstractDocument.handleInsertString(AbstractDocument.java:680)
at javax.swing.text.AbstractDocument.insertString(AbstractDocument.java:640)
at javax.swing.text.PlainDocument.insertString(PlainDocument.java:117)
at javax.swing.text.JTextComponent.replaceSelection(JTextComponent.java:987)
at javax.swing.JEditorPane.replaceSelection(JEditorPane.java:1042)
at javax.swing.text.DefaultEditorKit$DefaultKeyTypedAction.actionPerformed(DefaultEditorKit.java:829)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1496)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2339)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2374)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2301)
at java.awt.Component.processEvent(Component.java:4700)
at java.awt.Container.processEvent(Container.java:1308)
at java.awt.Component.dispatchEventImpl(Component.java:3460)
at java.awt.Container.dispatchEventImpl(Container.java:1370)
at java.awt.Component.dispatchEvent(Component.java:3327)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1510)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:576)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:693)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:631)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:548)
at java.awt.Component.dispatchEventImpl(Component.java:3351)
at java.awt.Container.dispatchEventImpl(Container.java:1370)
at java.awt.Window.dispatchEventImpl(Window.java:1338)
at java.awt.Component.dispatchEvent(Component.java:3327)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:439)
at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:140)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:126)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:121)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
"AWT-Shutdown" prio=6 tid=0x1186a0 nid=0xd waiting on monitor [f3901000..f39019e0]
at java.lang.Object.wait(Native Method)
- waiting on <f5025800> (a java.lang.Object)
at java.lang.Object.wait(Object.java:425)
at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:262)
- locked <f5025800> (a java.lang.Object)
at java.lang.Thread.run(Thread.java:579)
"AWT-Motif" daemon prio=6 tid=0x265438 nid=0xc runnable [f3a01000..f3a019e0]
at sun.awt.motif.MToolkit.run(Native Method)
at java.lang.Thread.run(Thread.java:579)
"Signal Dispatcher" daemon prio=10 tid=0x9f130 nid=0x9 runnable [0..0]
"Finalizer" daemon prio=8 tid=0x9b678 nid=0x7 waiting on monitor [f4781000..f47819e0]
at java.lang.Object.wait(Native Method)
- waiting on <f501c8a0> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:111)
- locked <f501c8a0> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:126)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:162)
"Reference Handler" daemon prio=10 tid=0x99df0 nid=0x6 waiting on monitor [fa981000..fa9819e0]
at java.lang.Object.wait(Native Method)
- waiting on <f501c900> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:425)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:110)
- locked <f501c900> (a java.lang.ref.Reference$Lock)
"VM Thread" prio=5 tid=0x98aa0 nid=0x4 runnable
"VM Periodic Task Thread" prio=10 tid=0x9d118 nid=0x8 runnable
----------------------------------------------
----------------------------------------------
import javax.swing.*;
import java.awt.*;
public class TypingJEditorPane extends JFrame {
JEditorPane editorPane;
JScrollPane scrollPane;
JPanel panel;
public static void main(String[] args) {
new TypingJEditorPane();
}
public TypingJEditorPane() {
editorPane = new JEditorPane();
scrollPane = new JScrollPane(editorPane);
scrollPane.setPreferredSize(new Dimension(300, 300));
// editorPane.getDocument().addUndoableEditListener(this);
panel = new JPanel();
panel.add(scrollPane);
setContentPane(panel);
setSize(400, 400);
show();
}
}
----------------------------------------------
edmund.lou@eng 2001-03-22
Swing Test Development
=======================================
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b56)
Java HotSpot(TM) Client VM (build 1.4-beta-B56, mixed mode)
Run the attached program and hold down "Shift+A" so that "A" is repeatedly typed into the JEditorPane. About 1/2 - 3/4 of the way down in the JEditorPane, you'll notice that instead of the characters being typed out nice and smoothly like in the beginning, output will start to become choppy and in intermittent spurts. Eventually, it becomes so slow that you may think that the system has locked up, but if you wait a while (sometimes a LONG while), the screen will repaint properly and show the other characters that were typed. It's as if the event queue is not processing the typed characters fast enough and some sort of bottleneck is happening.
I did this on an Ultra 1. I tried reproducing it on an Ultra 10, but it didn't happen, at least not right away. Perhaps the speed of the system plays a part in why this is not happening on an Ultra 10.
Also, I tried this on b53 on my Ultra 1 and it didn't happen, at least not right away. I couldn't try it on b54 or b55 due to internal error bugs showing up in Hotspot VM.
I have included the stack dump in case that gives any clue into the problem.
----------------------------------------------
^\Full thread dump:
"TimerQueue" daemon prio=5 tid=0x1b6c40 nid=0x10 waiting on monitor [f3601000..f36019e0]
at java.lang.Object.wait(Native Method)
- waiting on <f5085620> (a javax.swing.TimerQueue)
at javax.swing.TimerQueue.run(TimerQueue.java:234)
- locked <f5085620> (a javax.swing.TimerQueue)
at java.lang.Thread.run(Thread.java:579)
"Thread-2" daemon prio=6 tid=0x12d958 nid=0xf waiting on monitor [f3701000..f37019e0]
at java.lang.Object.wait(Native Method)
- waiting on <f5085680> (a java.util.TaskQueue)
at java.util.TimerThread.mainLoop(Timer.java:432)
- locked <f5085680> (a java.util.TaskQueue)
at java.util.TimerThread.run(Timer.java:385)
"Thread-0" prio=5 tid=0x28d70 nid=0x1 runnable [0..ffbee260]
"AWT-EventQueue-0" prio=5 tid=0xd2a80 nid=0xe runnable [f3800000..f38019e0]
at javax.swing.text.WrappedPlainView.insertUpdate(WrappedPlainView.java:445)
at javax.swing.plaf.basic.BasicTextUI$RootView.insertUpdate(BasicTextUI.java:1403)
at javax.swing.plaf.basic.BasicTextUI$UpdateHandler.insertUpdate(BasicTextUI.java:1637)
at javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:185)
at javax.swing.text.AbstractDocument.handleInsertString(AbstractDocument.java:680)
at javax.swing.text.AbstractDocument.insertString(AbstractDocument.java:640)
at javax.swing.text.PlainDocument.insertString(PlainDocument.java:117)
at javax.swing.text.JTextComponent.replaceSelection(JTextComponent.java:987)
at javax.swing.JEditorPane.replaceSelection(JEditorPane.java:1042)
at javax.swing.text.DefaultEditorKit$DefaultKeyTypedAction.actionPerformed(DefaultEditorKit.java:829)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1496)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2339)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2374)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2301)
at java.awt.Component.processEvent(Component.java:4700)
at java.awt.Container.processEvent(Container.java:1308)
at java.awt.Component.dispatchEventImpl(Component.java:3460)
at java.awt.Container.dispatchEventImpl(Container.java:1370)
at java.awt.Component.dispatchEvent(Component.java:3327)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1510)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:576)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:693)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:631)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:548)
at java.awt.Component.dispatchEventImpl(Component.java:3351)
at java.awt.Container.dispatchEventImpl(Container.java:1370)
at java.awt.Window.dispatchEventImpl(Window.java:1338)
at java.awt.Component.dispatchEvent(Component.java:3327)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:439)
at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:140)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:126)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:121)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
"AWT-Shutdown" prio=6 tid=0x1186a0 nid=0xd waiting on monitor [f3901000..f39019e0]
at java.lang.Object.wait(Native Method)
- waiting on <f5025800> (a java.lang.Object)
at java.lang.Object.wait(Object.java:425)
at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:262)
- locked <f5025800> (a java.lang.Object)
at java.lang.Thread.run(Thread.java:579)
"AWT-Motif" daemon prio=6 tid=0x265438 nid=0xc runnable [f3a01000..f3a019e0]
at sun.awt.motif.MToolkit.run(Native Method)
at java.lang.Thread.run(Thread.java:579)
"Signal Dispatcher" daemon prio=10 tid=0x9f130 nid=0x9 runnable [0..0]
"Finalizer" daemon prio=8 tid=0x9b678 nid=0x7 waiting on monitor [f4781000..f47819e0]
at java.lang.Object.wait(Native Method)
- waiting on <f501c8a0> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:111)
- locked <f501c8a0> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:126)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:162)
"Reference Handler" daemon prio=10 tid=0x99df0 nid=0x6 waiting on monitor [fa981000..fa9819e0]
at java.lang.Object.wait(Native Method)
- waiting on <f501c900> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:425)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:110)
- locked <f501c900> (a java.lang.ref.Reference$Lock)
"VM Thread" prio=5 tid=0x98aa0 nid=0x4 runnable
"VM Periodic Task Thread" prio=10 tid=0x9d118 nid=0x8 runnable
----------------------------------------------
----------------------------------------------
import javax.swing.*;
import java.awt.*;
public class TypingJEditorPane extends JFrame {
JEditorPane editorPane;
JScrollPane scrollPane;
JPanel panel;
public static void main(String[] args) {
new TypingJEditorPane();
}
public TypingJEditorPane() {
editorPane = new JEditorPane();
scrollPane = new JScrollPane(editorPane);
scrollPane.setPreferredSize(new Dimension(300, 300));
// editorPane.getDocument().addUndoableEditListener(this);
panel = new JPanel();
panel.add(scrollPane);
setContentPane(panel);
setSize(400, 400);
show();
}
}
----------------------------------------------
edmund.lou@eng 2001-03-22
Swing Test Development
=======================================
- relates to
-
JDK-4483229 Repeated typing in JEditorPane doesn't type in-flow, types in chunks.
-
- Closed
-