Skip to content

Arduino IDE fails to start under windows if "Documents" directory is unavailable. #7097

Closed
@WestfW

Description

@WestfW

Early in its initialization, the Arduino cod calls Win32KnownFolders.getDocumentsFolder, which does a catch-less:
return new File(Shell32Util.getFolderPath(ShlObj.CSIDL_MYDOCUMENTS));

If the Documents folder is not accessible, this fails and throws an exception as shown by arduino_debug (see attached backtrace.)

This can be easily reproduced by creating a windows user and modifying their documents folder to be on a flash drive, ejecting the flash drive, and then trying to start Arduino. It can also occur if the Documents directory is configured to be on a network share that is unreachable.

Because this happens so early in the initialization, it fails even if the IDE has been installed in "portable" mode, which should prevent it from needing to access the Documents directory. (Thus: no known workaround.)

It looks like other code is prepared to deal with a null sketchbook path; perhaps all that is needed is ignoring the error...

See also this thread: http://forum.arduino.cc/index.php?topic=521015.msg3555956#msg3555956

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions