Bug 585 : Error getting Processing Data Folder on Vista
Last modified: 2008-11-27 14:29




Status:
RESOLVED
Resolution:
FIXED -
Priority:
P2
Severity:
normal

 

Reporter:
inlogic
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2007-06-24 09:07
I.

Revision No. 0124

II.

Windows Vista.
P4 2.4Ghz
1GB DDR SDRAM
Geforce 7600 GS

III.

It isn't the code that generates the error but the program itself.

IV.

As I was told in the forums by the moderator to put this on Bug Report, so
I'll just quote my post:

« Ever since I re-installed Windows Vista I've been having the problem
where both Processing and Arduino framework won't open, giving the
following error every time I try to open it:

"Error getting the Processing/Arduino data folder."

I've been looking for more people with this problem and I've found no one.
I don't have any strange specific configuration in this install from the
previous one(Vista aswell)! I've installed the newer version of Java
Platform and everything but it gives me the same error!

I don't know if this helps but I've got an image of the output of the
program on the error:

http://img236.imageshack.us/img236/6240/runbattb3.jpg

I know there's something conflicting but I don't understand where..

Thanks in advance for your help. »
Additional Comment #1 From fry 2007-06-24 09:28
that's the moderator who fixes the bugs. ;)

thanks for posting, i'll add it to the list.
Additional Comment #2 From ramyun 2007-06-24 16:04
I am having a similar Vista problem. Only the warning message is different.
Title: "Setting Issues"
Waring Message: "Processing cannot run because it could not create a folder to store
your settings."
Additional Comment #3 From inlogic 2007-06-25 08:29
(In reply to comment #2)
>
>
>
> Additional Comment #2 From
> ramyun
> 2007-06-24 16:04
>
> <!--
> addReplyLink(2); //-->[reply]
>
>
>
>
> I am having a similar Vista problem. Only the warning message is
different.
> Title: "Setting Issues"
> Waring Message: "Processing cannot run because it could not create a
folder to store
> your settings."
>
>

Usually that kind of problems (on my experience so far) on Vista happens
when an application is unable to create files because it doesn't has
administrator privileges. If you haven't ran in in Admin mode already, try
this:

Right Click on processing.exe
Choose Run As An Administrator or go to Properties > Compability \ and tick
"Run This Program as an Administrator".

:)
Additional Comment #4 From fry 2007-06-28 04:51
we check a registry key on startup to figure out where the "My Documents"
folder and "Application Data" folders are located. it sounds like that's
either not allowed on vista, or the keys have changed. both would be
somewhat surprising, since this oughta be fairly straightforward stuff..
but i'm not much of a windows programmer, so who knows what they've done to
their api.
Additional Comment #5 From inlogic 2007-06-28 12:29
(In reply to comment #4)
>
>
>
> Additional Comment #4 From
> fry
> 2007-06-28 04:51
>
> <!--
> addReplyLink(4); //-->[reply]
>
>
>
>
> we check a registry key on startup to figure out where the "My
Documents"
> folder and "Application Data" folders are located. it sounds like that's
> either not allowed on vista, or the keys have changed. both would be
> somewhat surprising, since this oughta be fairly straightforward stuff..
> but i'm not much of a windows programmer, so who knows what they've done to
> their api.
>
>

Is there any manual way for me to circumvent that(changing a path in some
file or a registry entry or something)? For example to have arduino saving
the files where I want instead of how it comes by standard? Thanks.
Additional Comment #6 From owd 2007-07-03 11:16
(In reply to comment #5)

> Is there any manual way for me to circumvent that(changing a path in some
> file or a registry entry or something)? For example to have arduino saving
> the files where I want instead of how it comes by standard? Thanks.


I think you're referring to [MENU] File > Preferences > Sketchbook location

Additional Comment #7 From inlogic 2007-07-03 17:10
(In reply to comment #6)
>
>
>
> Additional Comment #6 From
> owd
> 2007-07-03 11:16
>
> <!--
> addReplyLink(6); //-->[reply]
>
>
>
>
> (In reply to comment #5)
>
> > Is there any manual way for me to circumvent that(changing a path in some
> > file or a registry entry or something)? For example to have arduino saving
> > the files where I want instead of how it comes by standard? Thanks.
>
>
> I think you're referring to [MENU] File > Preferences > Sketchbook location
>
>
>
>

You see, the problem is, I _can't_ open the program.
Additional Comment #8 From owd 2007-07-04 01:57
Ooops! Sorry, sure. Then you can edit it in [ARDUINO DIR]\lib\preferences.txt
In the section "sketchbook.path"
Read carefully the notes before change it!
Additional Comment #9 From owd 2007-07-04 02:08
(and "settings.path" too)
Additional Comment #10 From hemicube 2007-07-24 01:25
I have the problem as well under Vista...I tried changing the values in
preferences.txt manually but to no avail :( There has to be some way
around this!!!
Additional Comment #11 From fry 2007-07-24 05:40
bummer... well, unfortunately i can't debug until i have access to a copy
of vista or a vista machine... until i get the chance, if anyone is so
inclined, try building the app on your system (dev.processing.org/build)
and see where the errors are coming from.
Additional Comment #12 From fry 2007-07-24 08:59
so i got access to a vista machine, and i got the problem the first time
that i ran processing (as an administrator) but haven't had it come back
since, that it's working just fine. also running as a 'standard' user it
seems to be ok. and the problem the first time around seemed to be that i
had accidentally launched two copies at once (goofy selection model in
vista being what it is).

also, and perhaps important, i have processing at the base of the c:\
drive, rather than in the program files folder, perhaps that makes a
difference?
Additional Comment #13 From hemicube 2007-07-24 19:58
Well I tried moving the processing directory to the root of c: and it
didn't seem to change anything. Still says "Error getting Processing data
folder" and windows says this in a lil balloon and the bottom right of the
screen "The color scheme has been changed to Vista basic. A running
program isn't compatible with certain visual elements of Windows."
Changing the theme to Windows classic seems to fix that problem and
supposedly this is a problem not only processing has...I did notice in
Vista that the directory structure is different than XP. My docs folder is
something like this /Users/Hemicube/Documents - So I'm not sure if that is
affecting anything or not. Also I'm running everything from my admin
account and I've tried "Run and Administrator" as well. So I'm pretty sure
this is something a lil more complicated. I might try and build Processing
like you mentioned but I'm much more of a C++ person but I might give it a
go.
Additional Comment #14 From fry 2007-07-25 00:10
k, so some general questions (for anyone having this problem)

- which version of vista are you using? (home, premium, enterprise)
- does your login account have spaces in the name? how about non-ascii
characters?
- is it a us english system or something else?
- are you an administrator or standard user?
- where is processing installed? (c:\ or program files)

i see the directory structure has changed, but we should be (more or less)
ok with that because we're using registry keys to get the location of the
folders we need--so the reg keys seem to point to the correct place..
however there are bugs in the registry library that we're using, so that
could be a problem (tho that's probably most likely with non-ascii
characters).

for reference, i was able to get things to work with 1) vista enterprise 2)
username 'fry' 3) us english 4) admin and standard users 5) with processing
in the root of the c drive.
Additional Comment #15 From hemicube 2007-07-25 02:32
- which version of vista are you using? (home, premium, enterprise)

Windows Vista Ultimate

- does your login account have spaces in the name? how about non-ascii
characters?

No, its hemicube

- is it a us english system or something else?

US English, yes

- are you an administrator or standard user?

Yes, admin

- where is processing installed? (c:\ or program files)

Currently is located at c:\processing but I usually keep it on the desktop...
Additional Comment #16 From hemicube 2007-07-25 02:44
I just tried creating a new account, non-admin, unpacked it to my desktop
and it works! Its late now, but tomorrow I'll mess with the settings to
see if I can figure out what is going on...
Additional Comment #17 From fry 2008-06-01 11:28
k, tried with a new machine, rev 0138, on vista home premium and no
problems at all. are you still having trouble?

it's possible that the version of java in 0124 (which has since been
updated) was the real culprit.
Additional Comment #18 From doc 2008-06-03 09:50
Windows Vista 64
Processing icon appears skewed/corrupted.
Additional Comment #19 From fry 2008-06-03 10:01
> Additional Comment #18 From doc 2008-06-03 09:50
>
> Windows Vista 64
> Processing icon appears skewed/corrupted.

that's completely unrelated to this bug, which is about getting the data
folder on vista. please file a separate report.
Additional Comment #20 From fry 2008-06-05 08:18
closing this bug since i can't seem to get it to replicate.

if anyone runs into the problem, please test with revision 0140 once that
is released, since that may/should also fix the remaining bits of the
problem. if you still have the problem with 0140, please file a new bug
with details on how to produce.
Additional Comment #21 From noii 2008-10-09 02:57
hey fry,

just to let you know that this bug is still happening occasionally. I had a
student in a class today report this error having just downloaded 0148 on
to his vista laptop.

I didn't get a chance to grab his system setup - so sorry no
reproducability, but thought it might be slightly useful to know that the
issue is not 100% fixed.

ben
Additional Comment #22 From fry 2008-10-09 05:09
k, if you can get it to reproduce, please file a new bug with the details
on the setup.
Additional Comment #23 From mhen312 2008-11-26 21:41
(In reply to comment #22)

Is this the code?

If so, if you look for that registry item you find a key called...

!Don't use this registry key

w/ a value of...

Use the SHGetFolderPath or SHGetKnownFolderPath function instead

} else if (Base.isWindows()) {
// looking for Documents and Settings/blah/Application Data/Arduino

// this is just based on the other documentation, and eyeballing
// that part of the registry.. not confirmed by any msft/msdn docs.
// HKEY_CURRENT_USER\Software\Microsoft
// \Windows\CurrentVersion\Explorer\Shell Folders
// Value Name: AppData
// Value Type: REG_SZ
// Value Data: path

try {
//RegistryKey topKey = Registry.getTopLevelKey("HKCU");
RegistryKey topKey = Registry.HKEY_CURRENT_USER;

String localKeyPath =
"Software\\Microsoft\\Windows\\CurrentVersion" +
"\\Explorer\\Shell Folders";
RegistryKey localKey = topKey.openSubKey(localKeyPath);
String appDataPath = cleanKey(localKey.getStringValue("AppData"));
//System.out.println("app data path is " + appDataPath);
//System.exit(0);
//topKey.closeKey(); // necessary?
//localKey.closeKey();

dataFolder = new File(appDataPath, "Arduino");

} catch (Exception e) {
showError("Problem getting data folder",
"Error getting the Arduino data folder.", e);
}
//return null;

} else {
// otherwise make a .arduino directory int the user's home dir
File home = new File(System.getProperty("user.home"));
dataFolder = new File(home, ".arduino");
}
Additional Comment #24 From mhen312 2008-11-26 22:01
I found this on the web....

There are plenty of other shell folders available, more than 80 in Windows Vista and
around half that in XP. We've sorted them into bite-sized categories below for easier
digestion, but if you insist on having the full, low-level gory details then you'll find
them all in the Registry at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
\CurrentVersion\explorer\FolderDescriptions (Windows Vista) or HKEY_CURRENT_USER
\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders (XP).
Additional Comment #25 From fry 2008-11-27 14:29
That's Arduino code, and again, the original bug here was fixed--please
file a new bug if you're having a problem with Processing.