Board index FlightGear Support Installation Windows

"Unable to create the user-data storage folder" error

Installing FlightGear, scenery, aircraft etc. on Windows.

"Unable to create the user-data storage folder" error

Postby Headhunter76 » Sun Dec 25, 2016 9:23 pm

I am using Windows 10. I have tried to install version 4.3, but I always get the error message "Unable to create the user-data storage folder at: 'C:/Users/MY USER NAME/AppData/Roaming/Flightgear.org'." MY USER NAME is a name containing the German "ö" sign because of my respective user name registered in Windows. The "ö" is replaced with a strange sign in the error message => obviously Flightgear does not recognize the German "ö" in the path correctly, which seems to cause this error message.

I thought that this problem has been resolved with UTF-8 compatibility of version 4.3, but it does not seem true in my case.

Does anybody know how to resolve this problem? Renaming the user name folder is a nightmare in Windows 10 and I would like to avoid that if possible. Thanks a lot in advance!
Headhunter76
 
Posts: 4
Joined: Sun Dec 25, 2016 9:06 pm
Location: Munich, Germany
OS: Windows 10

Re: "Unable to create the user-data storage folder" error

Postby wkitty42 » Sun Dec 25, 2016 10:01 pm

the UTF-8 stuff has been being worked on but no one has tested or provided feedback to the developers as requested :( specifically those people with UTF-8 characters in their user names on winwhatever...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: "Unable to create the user-data storage folder" error

Postby Headhunter76 » Sun Dec 25, 2016 11:18 pm

Thanks for the quick reply. Is there anything I can do to provide feedback to the developers, perhaps with my problem, to support them?
Headhunter76
 
Posts: 4
Joined: Sun Dec 25, 2016 9:06 pm
Location: Munich, Germany
OS: Windows 10

Re: "Unable to create the user-data storage folder" error

Postby wkitty42 » Mon Dec 26, 2016 3:05 am

the main thing is to try running the nightly builds... i know there's information needed but i have no clue what... best i can suggest, right now, is to add "--log-level=debug" to your command line, try running flightgear, and then grab "%APPDATA%\flightgear.org\fgfs.log" and post it somewhere like pastebin so it can be analyzed... hopefully that log file will exist but it might be a chicken and egg thing since it is written to the directory that can't be created :(

in the mean time, i've posted a pointer to this topic on the dev list by responding to one of the already existing threads there... the subject line of that thread is "fromLocal8Bit() vs. utf8Str()"... you can join the developer's mailing list via the "mailing lists" link at the top of this page...

PS: i'm glad that you didn't take my initial post in a bad way... i realized later that it might sound rather harsh and ugly...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: "Unable to create the user-data storage folder" error

Postby rominet » Wed Dec 28, 2016 5:21 pm

Thanks for the useful report, Headhunter76 (i.e., a report with the precise error message and relevant info). And thanks to wkitty42 for forwarding it to the dev list.

I've located a place that is very likely to be the, or at least the first cause of this problem (in flightgear/src/Main/fg_init.cxx):

Code: Select all
#ifdef _WIN32
static SGPath platformDefaultDataPath()
{
  char *envp = ::getenv( "APPDATA" );
  SGPath config( envp );
  config.append( "flightgear.org" );
  return config;
}

The return value of ::getenv() is, as far I as understand it, in the user's Windows local 8 bits encoding, but it is passed to the SGPath constructor as if it were encoded in UTF-8. I have fixed this in commit d6313e52b5cfbb212adb104d52d025ff7a764421.

I can't actually test the fix, because I don't have Windows. Now, we need Windows users to build FG from source or install the next nightly—assuming nothing prevents it from building—and report.

There might be more places where a fix is needed, but this one at least seems pretty clear to me, so let's start with that.

Regards

Edit: grammar fix
Last edited by rominet on Wed Dec 28, 2016 7:22 pm, edited 1 time in total.
rominet
 
Posts: 605
Joined: Sat Nov 01, 2014 2:33 pm
Callsign: F-KATS
Version: Git next
OS: Debian GNU/Linux

Re: "Unable to create the user-data storage folder" error

Postby wkitty42 » Wed Dec 28, 2016 7:10 pm

@Headhunter76 and anyone else willing to test this, please download the nightly build tomorrow, 2016 Dec 29, after jenkens finishes it and see if it fixes your problem...

if i have my ducks lined up properly, i think you can get it from this link https://sourceforge.net/projects/flightgear/files/unstable/
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: "Unable to create the user-data storage folder" error

Postby Headhunter76 » Wed Dec 28, 2016 7:48 pm

Dear Rominet and Wkitty42, thank you so much for your great support! I will be happy to download and test the build, and report back to you if it resolves the problem.

In the meantime, I have found an easy work-around by creating a new user account on my Windows system without UTF-8 characters. On that account the standard install worked pretty well. I have to switch the user account when I want to play FlightGear (which is no big deal), but I thought I also post this here as an easy work-around until the final fix, for anybody else who might have my problem.

Again, thanks for your great effort and commitment - much appreciated!
Headhunter76
 
Posts: 4
Joined: Sun Dec 25, 2016 9:06 pm
Location: Munich, Germany
OS: Windows 10

Re: "Unable to create the user-data storage folder" error

Postby Headhunter76 » Fri Dec 30, 2016 11:00 pm

Rominet, the nightly built worked on installation and creation of the files in my user folder with the UTF-8 characters. I could fully install and run the game with your nightly built. Looks like you found the problem. Thanks a lot!

I had a few other problems playing in this built compared to the 2016.4.3 version (e.g. the scenery for the tutorial loaded, but everything outside was just grey), but the UTF-8 problem seems to be solved.
Headhunter76
 
Posts: 4
Joined: Sun Dec 25, 2016 9:06 pm
Location: Munich, Germany
OS: Windows 10

Re: "Unable to create the user-data storage folder" error

Postby rominet » Fri Dec 30, 2016 11:39 pm

Thanks for the report, I am glad we finally solved this. Concerning your grey scenery, I have no idea what it could be, so my suggestion would be to look inside $FG_HOME/fgfs.log. In case you don't see the cause of the problem there yourself, post preferably on the flightgear-devel mailing list with:
  • the fgfs.log contents in a site such as pastebin.com (if it is long);
  • one or two screenshots on a site such as imgur.com or postimg.org.
(maybe you've already posted on the forum, I haven't caught up yet...)
rominet
 
Posts: 605
Joined: Sat Nov 01, 2014 2:33 pm
Callsign: F-KATS
Version: Git next
OS: Debian GNU/Linux

Re: "Unable to create the user-data storage folder" error

Postby wkitty42 » Sat Dec 31, 2016 11:47 pm

Headhunter76 wrote in Fri Dec 30, 2016 11:00 pm:I had a few other problems playing in this built compared to the 2016.4.3 version (e.g. the scenery for the tutorial loaded, but everything outside was just grey), but the UTF-8 problem seems to be solved.

i'm glad to read that the UTF-8 characters are fixed... hopefully they are now fixed everywhere...

on your grey scenery... that sounds like it is water and that the scenery for your location doesn't exist in your installation... where did you try to load? do you have terrasync enabled?
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04


Return to Windows

Who is online

Users browsing this forum: No registered users and 0 guests