Page 1 of 1

BUG: can't load and save any data on WindowsXP

PostPosted: 16 Jan 2012, 17:26
by x3_m
can't load and save any data on WindowsXP.
In console window has written
Data files wll be fetched from:
./data/ Can't find config file!

Re: BUG: can't load and save any data on WindowsXP

PostPosted: 16 Jan 2012, 17:30
by Edward_Lii
Hello x3_m,

First of all thanks for reporting the bug. ;)
x3_m {l Wrote}:can't load and save any data on WindowsXP.
In console window has written
Data files wll be fetched from:
./data/ Can't find config file!

Just to make sure, you are running version 0.2?

If you can't save things the problem isn't with your data dir but with your user dir.
Before the line "Data files wll be fetched from" there should be a line saying:
{l Code}: {l Select All Code}
User preferences will be fetched from: <path>

Could you tell us what that is?

Re: BUG: can't load and save any data on WindowsXP

PostPosted: 16 Jan 2012, 17:55
by x3_m
It is 0.2
First string is
User preference will be fetched from: C:\Documents and Settings\username\Мои документы\My Games\meandmyshadow\

Re: BUG: can't load and save any data on WindowsXP

PostPosted: 16 Jan 2012, 18:34
by Edward_Lii
Hello x3_m,

x3_m {l Wrote}:It is 0.2
First string is
User preference will be fetched from: C:\Documents and Settings\username\Мои документы\My Games\meandmyshadow\

I'm not sure what the problem is, perhaps it's related to the Russian characters in the username.
When do you encounter problems?
Does you progress get saved? Can you save levels?

Re: BUG: can't load and save any data on WindowsXP

PostPosted: 17 Jan 2012, 02:05
by x3_m
Hello, Edward_Lii
"Мои документы" is My Documents in Eanglish version. I have this bug on several computers. Nothing save, nothing load.
From,
x3_m

Re: BUG: can't load and save any data on WindowsXP

PostPosted: 17 Jan 2012, 10:37
by acme_pjz
Hi x3_m,

It looks like something goes wrong with special characters in the file name or folder names. In my tests, Chinese characters also causes the problem. Need investigating...

Re: BUG: can't load and save any data on WindowsXP

PostPosted: 17 Jan 2012, 15:08
by Edward_Lii
acme_pjz {l Wrote}:It looks like something goes wrong with special characters in the file name or folder names. In my tests, Chinese characters also causes the problem. Need investigating...

Shouldn't there be errors saying some files can't be loaded or saved?

Anyway perhaps you can meandmyshadow from terminal by using these commands:
{l Code}: {l Select All Code}
cd C:\Documents and Settings\username\Мои документы\My Games\meandmyshadow\

{l Code}: {l Select All Code}
meandmyshadow --user-dir .\

(Can you use .\ in Windows?)

Re: BUG: can't load and save any data on WindowsXP

PostPosted: 17 Jan 2012, 17:53
by acme_pjz
Hi all,

Edward_Lii {l Wrote}:Anyway perhaps you can meandmyshadow from terminal by using these commands:


No, it won't help :( Moreover I found there is a big bug in the custom user directory code: if you provide a custom user directory and the directory doesn't exist, then the program won't try to create it :| ... And i have fixed it in latest SVN.

x3_m {l Wrote}:I have this bug on several computers. Nothing save, nothing load.


After searching on the Internet it looks like M$'s ifstream/ofstream doesn't support non-latin file names (fopen() works fine) unless we add a line of dirty trick code to the program... I have fixed it in latest SVN, plus a bug of createDirectory() under Windows, namely you must provide the full path, not the relative path to the system function...

Re: BUG: can't load and save any data on WindowsXP

PostPosted: 17 Jan 2012, 18:02
by Edward_Lii
Hello acme_pjz,

acme_pjz {l Wrote}:No, it won't help :( Moreover I found there is a big bug in the custom user directory code: if you provide a custom user directory and the directory doesn't exist, then the program won't try to create it :| ... And i have fixed it in latest SVN.
...
After searching on the Internet it looks like M$'s ifstream/ofstream doesn't support non-latin file names (fopen() works fine) unless we add a line of dirty trick code to the program... I have fixed it in latest SVN, plus a bug of createDirectory() under Windows, namely you must provide the full path, not the relative path to the system function...

The bug is fixed in SVN, but that isn't a solution for x3_m (and other Windows users with non-latin path names).
Perhaps we should create a special Windows release including that fix?

BTW, this isn't a problem under Linux, is it?
EDIT: Just tried it and it works fine under Linux. ;)

Re: BUG: can't load and save any data on WindowsXP

PostPosted: 17 Jan 2012, 18:43
by acme_pjz
Hi,

Edward_Lii {l Wrote}:Perhaps we should create a special Windows release including that fix?


It's OK, we can name it 0.2a or so...

Edward_Lii {l Wrote}:BTW, this isn't a problem under Linux, is it?


There is another minor bug on all systems, if you type 'meandmyshadow --user-dir ./aaa' and folder ./aaa doesn't exist, then the program will not try to create it.