pert
April 12, 2018, 12:10pm
8
I forgot that there is a bug that causes the IDE to still try to access the Documents/Arduino folder even when in portable mode:
opened 06:04AM - 09 Jan 18 UTC
closed 05:07PM - 16 Sep 19 UTC
Component: IDE
Type: Bug
OS: Windows
Early in its initialization, the Arduino cod calls Win32KnownFolders.getDocument… sFolder, 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
Which makes portable mode not the workaround I thought it might be.
Try running the Arduino IDE beta build in portable mode to see if it works:
http://www.arduino.cc/en/Main/Software#beta
This person's solution to the same error concurs with my theory of the cause:
j-luc:
[SOLVED] It was my bad, I messed up moving My Documents to the HDD such that the registry entries for My Documents, ... were pointing to the DVD (which was empty). Hence the "not ready" error message. Pointed everybody back to the HDD and all was well.