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

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

Postby x3_m » 16 Jan 2012, 17:26

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!
x3_m
 
Posts: 3
Joined: 16 Jan 2012, 13:02

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

Postby Edward_Lii » 16 Jan 2012, 17:30

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?
From,
Edward_Lii
User avatar
Edward_Lii
MnMS Moderator
 
Posts: 777
Joined: 20 Dec 2010, 16:46

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

Postby x3_m » 16 Jan 2012, 17:55

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

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

Postby Edward_Lii » 16 Jan 2012, 18:34

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?
From,
Edward_Lii
User avatar
Edward_Lii
MnMS Moderator
 
Posts: 777
Joined: 20 Dec 2010, 16:46

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

Postby x3_m » 17 Jan 2012, 02:05

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

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

Postby acme_pjz » 17 Jan 2012, 10:37

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...
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 665
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

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

Postby Edward_Lii » 17 Jan 2012, 15:08

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?)
From,
Edward_Lii
User avatar
Edward_Lii
MnMS Moderator
 
Posts: 777
Joined: 20 Dec 2010, 16:46

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

Postby acme_pjz » 17 Jan 2012, 17:53

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...
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 665
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

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

Postby Edward_Lii » 17 Jan 2012, 18:02

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. ;)
From,
Edward_Lii
User avatar
Edward_Lii
MnMS Moderator
 
Posts: 777
Joined: 20 Dec 2010, 16:46

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

Postby acme_pjz » 17 Jan 2012, 18:43

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.
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 665
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Who is online

Users browsing this forum: No registered users and 1 guest