Announcement: Be excellent to each other.


Caravel Forum : DROD Boards : Bugs : Can't Access DROD Data with non-ASCII username
New Topic New Poll Post Reply
Poster Message
kr3w.1337brown
Level: Goblin
Rank Points: 16
Registered: 05-30-2015
IP: Logged

File: TROUBLE.png (62.8 KB)
Downloaded 32 times.
License: Public Domain
icon Can't Access DROD Data with non-ASCII username (+1)  
Alright, today i bought DROD Gunthro and Epic Blunder on Steam.
And what I see. This game is crashing.

"Couldn't Accses DROD Data."

This error, also was when I bought DROD RPG.

My OS - Windows 7

Who can help with this problem?

Click here to view the secret text


[Last edited by mrimer at 09-24-2016 04:05 PM]
09-23-2016 at 02:50 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 5056
Registered: 02-04-2003
IP: Logged
icon Re: Couldn't Accses DROD Data. (0)  
On Windows 7, the place that DROD:GatEB will place your data is typically in this folder:

C:\Users\<your username>\Documents\Caravel\drod-5_0\

Can you confirm that this directory exists on your PC?

If so, it might contain a "drod.err" file that lists more details on what went wrong. If you see this file in that directory (or the Data subdirectory), would you please post it here?

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.

[Last edited by mrimer at 09-23-2016 03:22 PM]
09-23-2016 at 02:59 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 5056
Registered: 02-04-2003
IP: Logged
icon Re: Couldn't Accses DROD Data. (0)  
I have another question that might help troubleshoot this issue. Are you able to run the DROD RPG or DROD:GatEB demo or full version if you download it here from the Caravel Games site?

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.
09-23-2016 at 03:00 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
kr3w.1337brown
Level: Goblin
Rank Points: 16
Registered: 05-30-2015
IP: Logged
icon Re: Couldn't Accses DROD Data. (0)  
C:\Users\<your username>\Documents\Caravel\drod-5_0\

There are 3 file data.dat; hold.dat text.dat. There is no drod.err, but it is in DROD Data.

mrimer wrote:
I have another question that might help troubleshoot this issue. Are you able to run the DROD RPG or DROD:GatEB demo or full version if you download it here from the Caravel Games site?

I might be able.
09-23-2016 at 03:07 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 5056
Registered: 02-04-2003
IP: Logged
icon Re: Couldn't Accses DROD Data. (0)  
Would you please post the drod.err file contents here?

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.
09-23-2016 at 03:22 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
kr3w.1337brown
Level: Goblin
Rank Points: 16
Registered: 05-30-2015
IP: Logged
icon Re: Couldn't Accses DROD Data. (0)  
All crashlog. On some lines there are other problems.
Because, I tried to do as I did in DROD RPG.

I have installed the demo version of DROD RPG and from demo took player.dat. But, here it does not work

Click here to view the secret text

09-23-2016 at 03:25 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 5056
Registered: 02-04-2003
IP: Logged
icon Re: Couldn't Accses DROD Data. (0)  
If neither the Steam nor the Caravel builds of the game work for you, it seems there is a file permission issue on your system. There should be five .dat files, not three (also player.dat and savedgames.dat, IIRC). Or maybe a disk space or quota issue?

This issue seems to be in the realm of proper system configuration, and I don't think it's a problem in the game.

If you would post the contents of the drod.err file, that might be helpful. Thank you.

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.

[Last edited by mrimer at 09-23-2016 03:33 PM]
09-23-2016 at 03:32 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
kr3w.1337brown
Level: Goblin
Rank Points: 16
Registered: 05-30-2015
IP: Logged

File: drod.err (3.1 KB)
Downloaded 29 times.
License: Public Domain
icon Re: Couldn't Accses DROD Data. (+1)  
mrimer wrote:
If neither the Steam nor the Caravel builds of the game work for you, it seems there is a file permission issue on your system. There should be five .dat files, not three (also player.dat and savedgames.dat, IIRC). Or maybe a disk space or quota issue?

This issue seems to be in the realm of proper system configuration, and I don't think it's a problem in the game.

If you would post the contents of the drod.err file, that might be helpful. Thank you.

Here you are.
09-23-2016 at 03:42 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
kr3w.1337brown
Level: Goblin
Rank Points: 16
Registered: 05-30-2015
IP: Logged
icon Re: Couldn't Accses DROD Data. (+1)  
Alright, Mike. I fix it.

The game is not run from the Russian name of the user.
09-24-2016 at 12:50 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 5056
Registered: 02-04-2003
IP: Logged
icon Re: Couldn't Accses DROD Data. (+1)  
Ah, okay, that makes sense. Sorry for the inconvenience.

I think you're right that non-ASCII characters in the path aren't currently accepted. First time this issue's come up, I think. I'll look into fixing that.

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.
09-24-2016 at 04:05 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 5056
Registered: 02-04-2003
IP: Logged
icon Re: Can't Access DROD Data with non-ASCII username (0)  
Bump

Probably a duplicate of this issue.

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.

[Last edited by mrimer at 10-03-2020 07:20 AM]
10-03-2020 at 07:19 AM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 5056
Registered: 02-04-2003
IP: Logged
icon Re: Can't Access DROD Data with non-ASCII username (+4)  
I carefully looked into this issue and now I remember something I knew long ago.

The root cause issue is with the Metakit database library file handling. It appears to only support opening files with ASCII chars in the filepath.

See CDbBase::CreateDatabase().

I tried with extended ASCII characters and Metakit won't open a file with an extended character, e.g., "Ö" in the filepath. See the c4_Storage constructors.

Not sure how we can work around this. Feel free to share ideas.

Edit: one idea I have is to allow Steam users to run the game with a special command line option that would change the expectation of where the player's Data dir is stored.

That would try to place the player's data in the common non-user specific path, e.g., "C:\Program Data\Caravel\...".

That is:
drod.exe commondatadir=1

Also document this issue and option in the game FAQ.

That's my best idea so far. I'll put up a PR for this.

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.

[Last edited by mrimer at 10-30-2020 04:07 PM]
10-29-2020 at 11:35 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 5056
Registered: 02-04-2003
IP: Logged
icon Re: Can't Access DROD Data with non-ASCII username (0)  
PR

This command line option can be used by non-Steam players too, who want to select their Windows user dir for data file storage too, instead of the common C:\ProgramData directory.

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.
10-30-2020 at 04:15 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
Schik
Level: Legendary Smitemaster
Avatar
Rank Points: 5381
Registered: 02-04-2003
IP: Logged
icon Re: Can't Access DROD Data with non-ASCII username (+5)  
FYI...

I don't have a PR for this, but I just wrote some test code, and I think if we just change this line:
https://github.com/CaravelGames/drod/blob/master/DRODLib/DbBase.cpp#L690
to use UnicodeToUTF8 instead of UnicodeToAscii, then it should work just fine, saving into directories with non-ascii characters.

I didn't check if there are other places that should be changed as well.

____________________________
The greatness of a nation and its moral progress can be judged by the way it treats its animals.
--Mahatma Gandhi
11-01-2020 at 03:03 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 5056
Registered: 02-04-2003
IP: Logged
icon Re: Can't Access DROD Data with non-ASCII username (+2)  
Wow! You're a genius, Matt!

Thanks for checking into this further and reporting a workable option.

I've tried this out with usernames with extended ASCII characters as well as Unicode characters (I tested Cyrillic, as mentioned in one of the bug reports).

I needed to make a few more changes, but it's working. So great to have this limitation finally removed.

I'll put up a PR presently.

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.

[Last edited by mrimer at 11-01-2020 05:24 PM]
11-01-2020 at 04:34 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 5056
Registered: 02-04-2003
IP: Logged
icon Re: Can't Access DROD Data with non-ASCII username (+2)  
PR

I had to replace multiple instances of UnicodeToASCII with UnicodeToUTF8.

As I searched the codebase for instances of UnicodeToASCII, I realized there's never really a valid reason to truncate any extended ASCII or Unicode characters to ASCII, which happen to be present in a WSTRING.

So, I replaced all instances of UnicodeToASCII with UnicodeToUTF8. This should avoid ongoing maintenance headaches with this type of issue in the future.

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.

[Last edited by mrimer at 11-01-2020 05:25 PM]
11-01-2020 at 05:20 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
Schik
Level: Legendary Smitemaster
Avatar
Rank Points: 5381
Registered: 02-04-2003
IP: Logged
icon Re: Can't Access DROD Data with non-ASCII username (+2)  
Good call converting them all. This is why I didn't do a PR. :)

____________________________
The greatness of a nation and its moral progress can be judged by the way it treats its animals.
--Mahatma Gandhi
11-02-2020 at 04:23 AM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Bugs : Can't Access DROD Data with non-ASCII username
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.