As I was compiling unfinished prog - a Simple NIM for
my college projects - error occured
JDK 1.5.05
if you try to compile the project attached, although
it's unfinished, DrJava will trow same error again. See
attached
Stack Copy:
edu.rice.cs.util.UnexpectedException:
javax.swing.text.BadLocationException: Invalid location
at
edu.rice.cs.drjava.model.compiler.CompilerErrorModel.getErrorAtOffset(CompilerErrorModel.java:248)
at
edu.rice.cs.drjava.ui.ErrorCaretListener.updateHighlight(ErrorCaretListener.java:93)
at
edu.rice.cs.drjava.ui.ErrorCaretListener.caretUpdate(ErrorCaretListener.java:71)
at
javax.swing.text.JTextComponent.fireCaretUpdate(Unknown
Source)
at
javax.swing.text.JTextComponent$MutableCaretEvent.fire(Unknown
Source)
at
javax.swing.text.JTextComponent$MutableCaretEvent.stateChanged(Unknown
Source)
at
javax.swing.text.DefaultCaret.fireStateChanged(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$Handler.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:165)
at
edu.rice.cs.drjava.model.AbstractDJDocument.remove(AbstractDJDocument.java:1442)
at
edu.rice.cs.drjava.model.definitions.DefinitionsDocument.remove(DefinitionsDocument.java:390)
at
edu.rice.cs.drjava.model.AbstractGlobalModel$ConcreteOpenDefDoc.clear(AbstractGlobalModel.java:2869)
at
edu.rice.cs.drjava.model.AbstractGlobalModel$ConcreteOpenDefDoc.revertFile(AbstractGlobalModel.java:2417)
at
edu.rice.cs.drjava.ui.MainFrame._revert(MainFrame.java:2748)
at
edu.rice.cs.drjava.ui.MainFrame.access$2800(MainFrame.java:95)
at
edu.rice.cs.drjava.ui.MainFrame$30.actionPerformed(MainFrame.java:554)
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.AbstractButton.doClick(Unknown Source)
at
javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown
Source)
at
javax.swing.plaf.basic.BasicMenuItemUI$Handler.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)
Caused by: javax.swing.text.BadLocationException:
Invalid location
at javax.swing.text.GapContent.getChars(Unknown Source)
at javax.swing.text.GapContent.getString(Unknown Source)
at javax.swing.text.AbstractDocument.getText(Unknown
Source)
at
edu.rice.cs.drjava.model.AbstractGlobalModel$ConcreteOpenDefDoc.getText(AbstractGlobalModel.java:2652)
at
edu.rice.cs.drjava.model.compiler.CompilerErrorModel.getErrorAtOffset(CompilerErrorModel.java:245)
... 48 more
Caused by:
javax.swing.text.BadLocationException: Invalid location
at javax.swing.text.GapContent.getChars(Unknown Source)
at javax.swing.text.GapContent.getString(Unknown Source)
at javax.swing.text.AbstractDocument.getText(Unknown
Source)
at
edu.rice.cs.drjava.model.AbstractGlobalModel$ConcreteOpenDefDoc.getText(AbstractGlobalModel.java:2652)
at
edu.rice.cs.drjava.model.compiler.CompilerErrorModel.getErrorAtOffset(CompilerErrorModel.java:245)
at
edu.rice.cs.drjava.ui.ErrorCaretListener.updateHighlight(ErrorCaretListener.java:93)
at
edu.rice.cs.drjava.ui.ErrorCaretListener.caretUpdate(ErrorCaretListener.java:71)
at
javax.swing.text.JTextComponent.fireCaretUpdate(Unknown
Source)
at
javax.swing.text.JTextComponent$MutableCaretEvent.fire(Unknown
Source)
at
javax.swing.text.JTextComponent$MutableCaretEvent.stateChanged(Unknown
Source)
at
javax.swing.text.DefaultCaret.fireStateChanged(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$Handler.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:165)
at
edu.rice.cs.drjava.model.AbstractDJDocument.remove(AbstractDJDocument.java:1442)
at
edu.rice.cs.drjava.model.definitions.DefinitionsDocument.remove(DefinitionsDocument.java:390)
at
edu.rice.cs.drjava.model.AbstractGlobalModel$ConcreteOpenDefDoc.clear(AbstractGlobalModel.java:2869)
at
edu.rice.cs.drjava.model.AbstractGlobalModel$ConcreteOpenDefDoc.revertFile(AbstractGlobalModel.java:2417)
at
edu.rice.cs.drjava.ui.MainFrame._revert(MainFrame.java:2748)
at
edu.rice.cs.drjava.ui.MainFrame.access$2800(MainFrame.java:95)
at
edu.rice.cs.drjava.ui.MainFrame$30.actionPerformed(MainFrame.java:554)
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.AbstractButton.doClick(Unknown Source)
at
javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown
Source)
at
javax.swing.plaf.basic.BasicMenuItemUI$Handler.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)
project file - compile it and get same error
Logged In: NO
java.lang.OutOfMemoryError: Java heap space
Logged In: YES
user_id=1369585
java.lang.OutOfMemoryError: Java heap space
Logged In: YES
user_id=666678
Originator: NO
Cannot confirm either error in r4029. If this still happens in the latest stable (from http://www.drjava.org/\), please post another comment with details. Setting ticket to auto-close.
Logged In: YES
user_id=1312539
Originator: NO
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).