From: SourceForge.net <no...@so...> - 2004-07-03 01:36:31
|
Bugs item #984420, was opened at 2004-07-03 09:36 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=984420&group_id=44253 Category: Other Group: Makes DrJ unstable Status: Open Resolution: None Priority: 5 Submitted By: Nor Jaidi Tuah (norjaidi) Assigned to: Nobody/Anonymous (nobody) Summary: UnexpectedException. Edit pane refuses focus Initial Comment: DrJava: 20040618 Compiler and runtime: 1.5.0-beta2-b51 System: Windows XP Language Level: elementary I suppose this error would only occur after a user cleans a directory and then starts a class that happens to have the same name with a previously deleted class. This is something that a user rarely does. But once the user gets the error, the only cure is to restart DrJava. The symptoms are very worrying: it seems like a synchronization problem. If that is so, then it may have some other tentacles elsewhere. How to reproduce error: 1. Enter class Z { any silly thing } 2. [Compile All]. 3. [Close]. 4. Delete Z.dj0 5. Enter class Z { silly thing again } 6. [Compile All]. 7. If you don't get UnexpectedException now, goto step3. 8. If you get the UnexpedtedException now, you can get it again by clicking anywhere inside the editor pane. 9. Closing and reopening the file will NOT remove the error. Detail: edu.rice.cs.util.UnexpectedException: edu.rice.cs.util.UnexpectedException: javax.swing.text.BadLocationException: Invalid location at edu.rice.cs.drjava.ui.MainFrame$ModelListener.activeDocumentChanged(MainFrame.java:5071) at edu.rice.cs.drjava.model.DefaultSingleDisplayModel$2.notifyListener(DefaultSingleDisplayModel.java:432) at edu.rice.cs.drjava.model.GlobalEventNotifier.notifyListeners(GlobalEventNotifier.java:102) at edu.rice.cs.drjava.model.DefaultSingleDisplayModel._setActiveDoc(DefaultSingleDisplayModel.java:426) at edu.rice.cs.drjava.model.DefaultSingleDisplayModel.access$000(DefaultSingleDisplayModel.java:96) at edu.rice.cs.drjava.model.DefaultSingleDisplayModel$1.gainedSelection(DefaultSingleDisplayModel.java:132) at edu.rice.cs.util.docnavigation.JListSortNavigator.valueChanged(JListSortNavigator.java:322) at javax.swing.JList.fireSelectionValueChanged(Unknown Source) at javax.swing.JList$ListSelectionHandler.valueChanged(Unknown Source) at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source) at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source) at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source) at javax.swing.DefaultListSelectionModel.changeSelection(Unknown Source) at javax.swing.DefaultListSelectionModel.changeSelection(Unknown Source) at javax.swing.DefaultListSelectionModel.setSelectionInterval(Unknown Source) at javax.swing.JList.setSelectedIndex(Unknown Source) at javax.swing.JList.setSelectedValue(Unknown Source) at edu.rice.cs.util.docnavigation.JListSortNavigator.setActiveDoc(JListSortNavigator.java:211) at edu.rice.cs.drjava.model.DefaultSingleDisplayModel.setActiveDocument(DefaultSingleDisplayModel.java:172) at edu.rice.cs.drjava.model.DefaultSingleDisplayModel.saveAllFiles(DefaultSingleDisplayModel.java:306) at edu.rice.cs.drjava.ui.MainFrame._saveAll(MainFrame.java:2430) at edu.rice.cs.drjava.ui.MainFrame.access$2100(MainFrame.java:100) at edu.rice.cs.drjava.ui.MainFrame$ModelListener._saveAllBeforeProceeding(MainFrame.java:5441) at edu.rice.cs.drjava.ui.MainFrame$ModelListener.saveBeforeCompile(MainFrame.java:5359) at edu.rice.cs.drjava.model.GlobalEventNotifier.saveBeforeCompile(GlobalEventNotifier.java:526) at edu.rice.cs.drjava.model.compiler.CompilerEventNotifier.saveBeforeCompile(CompilerEventNotifier.java:127) at edu.rice.cs.drjava.model.compiler.DefaultCompilerModel.compileAll(DefaultCompilerModel.java:183) at edu.rice.cs.drjava.ui.MainFrame$84.construct(MainFrame.java:2655) at edu.rice.cs.util.swing.SwingWorker$2.run(SwingWorker.java:157) at java.lang.Thread.run(Unknown Source) Caused by: edu.rice.cs.util.UnexpectedException: javax.swing.text.BadLocationException: Invalid location at edu.rice.cs.drjava.model.compiler.CompilerErrorModel.getErrorAtOffset(CompilerErrorModel.java:290) at edu.rice.cs.drjava.ui.ErrorCaretListener.updateHighlight(ErrorCaretListener.java:119) at edu.rice.cs.drjava.ui.ErrorCaretListener.caretUpdate(ErrorCaretListener.java:95) 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.setDot(Unknown Source) at javax.swing.text.DefaultCaret$Handler.propertyChange(Unknown Source) at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source) at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source) at java.awt.Component.firePropertyChange(Unknown Source) at javax.swing.text.JTextComponent.setDocument(Unknown Source) at edu.rice.cs.drjava.ui.DefinitionsPane.notifyInactive(DefinitionsPane.java:1021) at edu.rice.cs.drjava.ui.MainFrame._switchDefScrollPane(MainFrame.java:4225) at edu.rice.cs.drjava.ui.MainFrame$ModelListener$3.run(MainFrame.java:5015) at java.awt.event.InvocationEvent.dispatch(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) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=438935&aid=984420&group_id=44253 |