#289 Editing save path may crash game

closed-fixed
nobody
None
8
2007-04-17
2007-04-02
Kelimion
No

In FreeOrion-0.3.1-RC5 (under WinXP, at least), when you go and edit the save directory it can crash the game when you do the following:

- Set the cursor to the first position
- Press Delete

I'm assuming this has to do with the on-the-fly checking to see if the path given is a viable location, painting the name red if it's not.

Discussion

  • Geoff Topping
    Geoff Topping
    2007-04-03

    • priority: 5 --> 8
     
  • Geoff Topping
    Geoff Topping
    2007-04-03

    Logged In: YES
    user_id=913462
    Originator: NO

    This also occurs in the SVN version.

     
  • Mike Dotterer
    Mike Dotterer
    2007-04-04

    Logged In: YES
    user_id=1509889
    Originator: NO

    This seems to be exclusive to Windows. Unable to reproduce on Linux (Ubuntu 6.10)

     
  • Kelimion
    Kelimion
    2007-04-04

    Logged In: YES
    user_id=1759073
    Originator: YES

    I have a theory as to why it's exclusive to Windows, Maelstrom.

    When you remove the drive letter on Windows, the remaining path beginning with ":\" could perhaps trigger an exception of sorts. Whereas on Unix-like systems a path where you'd remove the first character would still remain potentially valid.

    I've not yet checked the FreeOrion source code to see where exactly this validity check occurs, and why it's throwing an exception to start with. I can't make any guarantees, but I'll try and see if I can ferret it out this weekend, submitting a patch to fix it provided I have the time to do so.

     
  • Mike Dotterer
    Mike Dotterer
    2007-04-05

    Logged In: YES
    user_id=1509889
    Originator: NO

    I would check UI/OptionsWnd.cpp line 118. It creates boost::filesystem object. The documentation for the path object states that it throws an exception if the path is not valid. However, on Linux even if you type in arbitrary characters it seems okay.

     
  • Geoff Topping
    Geoff Topping
    2007-04-17

    Logged In: YES
    user_id=913462
    Originator: NO

    Fixed in Subversion.

     
  • Geoff Topping
    Geoff Topping
    2007-04-17

    • status: open --> closed-fixed