#905 IOException when saving file

3: Ugly
closed-fixed
5
2011-06-12
2011-02-25
No

The following steps throw an exception in revision 5425

1. Start DrJava
2. Type something on text area
3. Save
4. Type random text containing "/" (e.g. "/dd/crash.java") in filename textbox
5. Click OK

A dialog box containing IOException trace will show up. I'm unable to copy the trace here because it doesn't show up in the Errors window.

Environment
OS: Ubuntu 10.10
Java: jdk-6-21

Discussion

  • Bao N. Nguyen

    Bao N. Nguyen - 2011-03-05

    This error seems happen to almost all other Open and Save windows. For example, in Create New Project,

    1. Follow Menu Project/New
    2. Enter /crash/crash/crash in the project path textbox
    3. OK

    Exception trace:

    Exception in thread "AWT-EventQueue-0" edu.rice.cs.util.UnexpectedException: java.io.IOException: Parent directory of project root /crash/crash does not exist
    at edu.rice.cs.drjava.ui.MainFrame._newProject(MainFrame.java:5214)
    at edu.rice.cs.drjava.ui.MainFrame.access$12(MainFrame.java:5185)
    at edu.rice.cs.drjava.ui.MainFrame$17.actionPerformed(MainFrame.java:515)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1223)
    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1264)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
    at java.awt.Component.processMouseEvent(Component.java:6267)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
    at java.awt.Component.processEvent(Component.java:6032)
    at java.awt.Container.processEvent(Container.java:2041)
    at java.awt.Component.dispatchEventImpl(Component.java:4630)
    at java.awt.Container.dispatchEventImpl(Container.java:2099)
    at java.awt.Component.dispatchEvent(Component.java:4460)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
    at java.awt.Container.dispatchEventImpl(Container.java:2085)
    at java.awt.Window.dispatchEventImpl(Window.java:2478)
    at java.awt.Component.dispatchEvent(Component.java:4460)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Caused by: java.io.IOException: Parent directory of project root /crash/crash does not exist
    at edu.rice.cs.drjava.project.ProjectProfile.<init>(ProjectProfile.java:127)
    at edu.rice.cs.drjava.model.AbstractGlobalModel.configNewProject(AbstractGlobalModel.java:1623)
    at edu.rice.cs.drjava.ui.MainFrame._newProject(MainFrame.java:5213)
    ... 30 more

     
  • Mathias Ricken

    Mathias Ricken - 2011-03-07
    • labels: --> User interface
    • milestone: --> 3: Ugly
    • assigned_to: nobody --> mgricken
    • status: open --> open-accepted
     
  • Mathias Ricken

    Mathias Ricken - 2011-03-07

    I don't think the IOException on Save is a bug. If a user enters an invalid file, some error has to be displayed. We should omit the stack trace, though. It makes it look like a bug.

    The IO operations that can be done with projects, as well as Save All, do have bugs, though. If the user enters a project file that cannot be accessed, the operation should terminate, not pop up the Project Properties window and several error windows.

    I'm working on fixing both.

     
  • Mathias Ricken

    Mathias Ricken - 2011-06-11

    I'm going to pick my work on this bug up again this weekend.

     
  • Mathias Ricken

    Mathias Ricken - 2011-06-12

    Fixed as of revision 5432.

     
  • Mathias Ricken

    Mathias Ricken - 2011-06-12
    • status: open-accepted --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks