#553 DrJ hangs after Interactions System.in operation

closed
nobody
5
2007-02-02
2006-12-01
Anonymous
No

While writing a program using a BufferedReader wrapped around System.in, I tested it in the Interactions Pane. I used it and entered the same command several times before (just "q"), but this time the interactions pane hung. While DrJ still responds and compiles, the interactions pane will not reset and I'm going to have to close/restart DrJ. The errors window picked up two different problems.

I'm on Windows XP using Java 1.5 with DrJava Version : 20061025-1556

Exception Stack Trace report from the built-in reporter:

java.lang.ArrayIndexOutOfBoundsException: 43
at javax.swing.text.CompositeView.replace(Unknown Source)
at javax.swing.text.BoxView.replace(Unknown Source)
at javax.swing.text.View.updateChildren(Unknown Source)
at javax.swing.text.View.removeUpdate(Unknown Source)
at javax.swing.plaf.basic.BasicTextUI$RootView.removeUpdate(Unknown Source)
at javax.swing.plaf.basic.BasicTextUI$UpdateHandler.removeUpdate(Unknown Source)
at javax.swing.text.AbstractDocument.fireRemoveUpdate(Unknown Source)
at javax.swing.text.AbstractDocument.handleRemove(Unknown Source)
at javax.swing.text.AbstractDocument.remove(Unknown Source)
at edu.rice.cs.util.text.SwingDocument.remove(SwingDocument.java:161)
at edu.rice.cs.drjava.model.AbstractDJDocument.remove(AbstractDJDocument.java:1586)
at javax.swing.text.AbstractDocument.replace(Unknown Source)
at javax.swing.JTextPane.replaceSelection(Unknown Source)
at javax.swing.JTextPane.replaceSelection(Unknown Source)
at javax.swing.text.DefaultEditorKit$DefaultKeyTypedAction.actionPerformed(Unknown Source)
at javax.swing.SwingUtilities.notifyAction(Unknown Source)
at javax.swing.JComponent.processKeyBinding(Unknown Source)
at javax.swing.JComponent.processKeyBindings(Unknown Source)
at javax.swing.JComponent.processKeyEvent(Unknown Source)
at edu.rice.cs.drjava.ui.InteractionsPane.processKeyEvent(InteractionsPane.java:131)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Second stack trace:

java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at javax.swing.text.CompositeView.replace(Unknown Source)
at javax.swing.text.BoxView.replace(Unknown Source)
at javax.swing.text.View.updateChildren(Unknown Source)
at javax.swing.text.View.insertUpdate(Unknown Source)
at javax.swing.plaf.basic.BasicTextUI$RootView.insertUpdate(Unknown Source)
at javax.swing.plaf.basic.BasicTextUI$UpdateHandler.insertUpdate(Unknown Source)
at javax.swing.text.AbstractDocument.fireInsertUpdate(Unknown Source)
at javax.swing.text.AbstractDocument.handleInsertString(Unknown Source)
at javax.swing.text.AbstractDocument.insertString(Unknown Source)
at edu.rice.cs.util.text.SwingDocument.forceInsertText(SwingDocument.java:123)
at edu.rice.cs.util.text.ConsoleDocument.insertBeforeLastPrompt(ConsoleDocument.java:219)
at edu.rice.cs.drjava.model.repl.InteractionsModel.interpreterResetting(InteractionsModel.java:540)
at edu.rice.cs.drjava.model.repl.newjvm.MainJVM.killInterpreter(MainJVM.java:600)
at edu.rice.cs.drjava.model.repl.RMIInteractionsModel._resetInterpreter(RMIInteractionsModel.java:104)
at edu.rice.cs.drjava.model.repl.InteractionsModel.resetInterpreter(InteractionsModel.java:204)
at edu.rice.cs.drjava.model.DefaultGlobalModel.resetInteractions(DefaultGlobalModel.java:322)
at edu.rice.cs.drjava.model.DefaultGlobalModel.resetInteractions(DefaultGlobalModel.java:300)
at edu.rice.cs.drjava.model.DefaultGlobalModel$2.compileEnded(DefaultGlobalModel.java:161)
at edu.rice.cs.drjava.model.compiler.CompilerEventNotifier.compileEnded(CompilerEventNotifier.java:85)
at edu.rice.cs.drjava.model.compiler.DefaultCompilerModel._rawCompile(DefaultCompilerModel.java:263)
at edu.rice.cs.drjava.model.compiler.DefaultCompilerModel.compile(DefaultCompilerModel.java:189)
at edu.rice.cs.drjava.model.compiler.DefaultCompilerModel.compileAll(DefaultCompilerModel.java:136)
at edu.rice.cs.drjava.ui.MainFrame._compileAll(MainFrame.java:4192)
at edu.rice.cs.drjava.ui.MainFrame.access$4000(MainFrame.java:102)
at edu.rice.cs.drjava.ui.MainFrame$43.actionPerformed(MainFrame.java:661)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Discussion

  • Logged In: YES
    user_id=430590
    Originator: NO

    This is a timing/concurrency bug that has been fixed in the most recent stable release.

    I am closing this bug. If you can reproduce this bug using the latest stable version (30 Jan 07), please file a new bug report.

     
    • status: open --> closed