#297 "Run Doc's Main" broken

closed-fixed
Patrick Kruse
5
2004-07-22
2004-07-22
Neal Horowitz
No

Using the "run current document's main method" causes
the following exception to be thrown:

java.lang.NullPointerException
at
edu.rice.cs.drjava.model.repl.InteractionsDocumentAdapter.setColoring(InteractionsDocumentAdapter.java:141)
at
edu.rice.cs.drjava.model.definitions.ColoringView.drawUnselectedText(ColoringView.java:203)
at
javax.swing.text.PlainView.drawElement(PlainView.java:96)
at javax.swing.text.PlainView.drawLine(PlainView.java:71)
at javax.swing.text.PlainView.paint(PlainView.java:288)
at
javax.swing.plaf.basic.BasicTextUI$RootView.paint(BasicTextUI.java:1351)
at
javax.swing.plaf.basic.BasicTextUI.paintSafely(BasicTextUI.java:642)
at
javax.swing.plaf.basic.BasicTextUI.paint(BasicTextUI.java:791)
at
javax.swing.plaf.basic.BasicTextUI.update(BasicTextUI.java:759)
at
javax.swing.JComponent.paintComponent(JComponent.java:740)
at javax.swing.JComponent.paint(JComponent.java:1003)
at
javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4930)
at
javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4883)
at
javax.swing.JComponent._paintImmediately(JComponent.java:4826)
at
javax.swing.JComponent.paintImmediately(JComponent.java:4633)
at
javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:451)
at
javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:114)
at
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at
java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

I haven't looked too deeply into the code, but you guys
should be careful about how the stylesList is
populated; it seems to have a null floating around in
it. I'd imagine it has something to do with legacy
insertion of text into the interactions pane in order
to do the "run" action, but I'm not sure. The
exception also has an annoying tendency to recur,
making drjava unusable.

Oh yeah, this is the latest CVS, compiled/run with
java-b56 on WinXP.

Discussion

  • Patrick Kruse
    Patrick Kruse
    2004-07-22

    • status: open --> closed
     
  • Patrick Kruse
    Patrick Kruse
    2004-07-22

    Logged In: YES
    user_id=1039473

    The bug has been fixed now on CVS and a test added to make
    sure it never comes back. That's a nasty bug and I'm glad it
    was caught before we released. I hope everyone is using
    updated versions of the code from CVS for their own work so
    we can catch any other bugs that may have slipped in during
    the refactoring before we do another development release.

     
  • Patrick Kruse
    Patrick Kruse
    2004-07-22

    • assigned_to: nobody --> pakruse
    • status: closed --> closed-fixed