From: SourceForge.net <no...@so...> - 2005-02-02 09:46:48
|
Bugs item #1114573, was opened at 2005-02-02 03:46 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=438935&aid=1114573&group_id=44253 Category: User interface Group: Serious Status: Open Resolution: None Priority: 5 Submitted By: ThatMorrowGuy (thatmorrowguy) Assigned to: Nobody/Anonymous (nobody) Summary: Undo Button Exception V 20040908-2125 Initial Comment: I was working on my PowerBook running OSX 10.3, and I discovered at certain times the program throws an exception when I use the undo command. I found it using the meta-z hotkey combination, but I believe it does the same through the toolbar. When I attempted to reproduce the bug, sometimes it didn't appear. However, the most reliable way I found to reproduce the bug is to open a new instance on DrJava, and paste something from the clipboard. Then when you press the undo button, it throws an array out of bounds exception with the following stack trace: java.lang.ArrayIndexOutOfBoundsException: -1 at javax.swing.text.AbstractDocument$BranchElement.getEndOffset(AbstractDocument.java:2333) at javax.swing.text.PlainView.getLineWidth(PlainView.java:631) at javax.swing.text.PlainView.getPreferredSpan(PlainView.java:214) at javax.swing.plaf.basic.BasicTextUI$RootView.getPreferredSpan(BasicTextUI.java:1239) at javax.swing.plaf.basic.BasicTextUI.getPreferredSize(BasicTextUI.java:809) at javax.swing.JComponent.getPreferredSize(JComponent.java:1275) at javax.swing.JEditorPane.getPreferredSize(JEditorPane.java:1212) at javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:769) at java.awt.Container.layout(Container.java:1020) at java.awt.Container.doLayout(Container.java:1010) at java.awt.Container.validateTree(Container.java:1092) at java.awt.Container.validate(Container.java:1067) at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:353) at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:116) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178) at java.awt.EventQueue.dispatchEvent(EventQueue.java:454) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) However, from one of my other times that the crash occured, it gave me a very different stack trace. It happened when I pressed the undo button while my cursor was in the Find window I believe, but I was unable to make a scenerio where it could be easily reproduced. In spite of that, it is possible that the two bugs have a common root that can be fixed. edu.rice.cs.util.UnexpectedException: javax.swing.undo.CannotUndoException at edu.rice.cs.drjava.ui.DefinitionsPane$UndoAction.actionPerformed(DefinitionsPane.java:1342) at edu.rice.cs.util.swing.DelegatingAction.actionPerformed(DelegatingAction.java:153) at edu.rice.cs.drjava.ui.MainFrame$47.actionPerformed(MainFrame.java:856) at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1535) at edu.rice.cs.drjava.ui.DefinitionsPane.processKeyEvent(DefinitionsPane.java:438) at java.awt.Component.processEvent(Component.java:4975) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1713) at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:627) at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:831) at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:741) at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:592) at java.awt.Component.dispatchEventImpl(Component.java:3572) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) Caused by: javax.swing.undo.CannotUndoException at javax.swing.undo.UndoManager.undo(UndoManager.java:273) at edu.rice.cs.drjava.model.definitions.CompoundUndoManager.undo(CompoundUndoManager.java:238) at edu.rice.cs.drjava.ui.DefinitionsPane$UndoAction.actionPerformed(DefinitionsPane.java:1337) at edu.rice.cs.util.swing.DelegatingAction.actionPerformed(DelegatingAction.java:153) at edu.rice.cs.drjava.ui.MainFrame$47.actionPerformed(MainFrame.java:856) at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1535) at edu.rice.cs.drjava.ui.DefinitionsPane.processKeyEvent(DefinitionsPane.java:438) at java.awt.Component.processEvent(Component.java:4975) at java.awt.Container.processEvent(Container.java:1613) at java.awt.Component.dispatchEventImpl(Component.java:3681) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1713) at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:627) at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:831) at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:741) at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:592) at java.awt.Component.dispatchEventImpl(Component.java:3572) at java.awt.Container.dispatchEventImpl(Container.java:1671) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3543) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I haven't had a chance to try a more recent version of the sofware, so it is possible that this bug has already been found and fixed. If this is the case, I apologize for wasting your time. Thanks for your help in this, and good luck bug tracking. Jeff Morrow ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=438935&aid=1114573&group_id=44253 |