bitshares / bitshares1-core

Software to run the old chain (before 2015-10-13). Code for current chain is https://github.com/bitshares/bitshares-core
https://bitshares.org/
The Unlicense
219 stars 174 forks source link

Problem if username in local language (non english) #791

Open testzcrypto opened 10 years ago

testzcrypto commented 10 years ago

Tested version 0.4.15-a Windows 8 (user reports same for Windows 7).

If user name in local language (for example Тест), BitSharesX start with error "An error occurred while trying to start", if you run BitSharesX as administrator it's start but creates 2 additional folders in C:\Users: "C:\Users\Тест\AppData\Roaming\BitShares X\logs" "C:\Users\Тест\AppData\Roaming\BitShares X"

And no "BitShares X" folder at C:\Users\Тест\AppData\Roaming

Looks like problem located in handling Unicode paths in different BitShares modules.

nathanielhourt commented 10 years ago

You say it made no data dir when you run as a normal user? Can you run it from the command line and copy-paste the output to pastebin and link to it here?

testzcrypto commented 10 years ago

Yes, as normal user it's can't create data dir, because program looking to create data dir not under regular user profile. Output from bitshares_client.exe under windows user Тест: C:\Program Files (x86)\BitSharesX\bin>bitshares_client.exe Loading blockchain from: C:/Users/╥хёЄ/AppData/Roaming/BitShares X/chain Creating default config file at: C:/Users/╥хёЄ/AppData/Roaming/BitShares X/config.json Logging to file: C:/Users/╥хёЄ/AppData/Roaming/BitShares X/logs/default/default.log Logging RPC to file: C:/Users/╥хёЄ/AppData/Roaming/BitShares X/logs/rpc/rpc.log Logging blockchain to file: C:/Users/╥хёЄ/AppData/Roaming/BitShares X/logs/blockchain/blockchain.log Logging P2P to file: C:/Users/╥хёЄ/AppData/Roaming/BitShares X/logs/p2p/p2p.log error opening log file: C:/Users/╨в╨╡╤Б╤В/AppData/Roaming/BitShares X/logs/default/default.log error opening log file: C:/Users/╨в╨╡╤Б╤В/AppData/Roaming/BitShares X/logs/rpc/rpc.log error opening log file: C:/Users/╨в╨╡╤Б╤В/AppData/Roaming/BitShares X/logs/blockchain/blockchain.log error opening log file: C:/Users/╨в╨╡╤Б╤В/AppData/Roaming/BitShares X/logs/p2p/p2p.log Initializing genesis state from built-in genesis file Please be patient, this will take a few minutes... Successfully re-indexed 0 blocks in 0 seconds. Not starting RPC server, use --server to enable the RPC interface (wallet closed) >>>

nathanielhourt commented 10 years ago

I'm guessing this is due to the use of char* and std::string in fc's filesystem.cpp in the home_path() and app_path() functions. I imagine the fix would be to use wchar_t* and std::wstring for that little bit until it gets to fc::path which should be unicode-friendly. I don't have a windows box, though, so I can't really work on this...

nathanielhourt commented 10 years ago

Between https://github.com/BitShares/qt_wallet/commit/21748f00564775478522c609884cc75f5f4fa234 and https://github.com/InvictusInnovations/fc/commit/6cddd42cfe5a86ab8e339728bec1aeb07506750f this should be resolved. Can you still reproduce the issue (with BitShares XT, not BitShares X)

nathanielhourt commented 10 years ago

Assuming this is resolved unless we hear otherwise.

testzcrypto commented 10 years ago

Same problem for File->Export, if you store to path with local language. Please check File->Import also.

nathanielhourt commented 10 years ago

Resolved: https://github.com/BitShares/qt_wallet/commit/deff9ef0cccb072255e8edf5f70d77c89136218c

valzav commented 10 years ago

TestZ has reported this issue is back

testzcrypto commented 10 years ago

This time if user name in local language (for example Тест), bitshares_client.exe works but Qt client get "Critical error" and not produce any logs. Tested with x86 and x64 versions from https://github.com/dacsunlimited/bitsharesx/releases (BitShares X 0.4.22)

vikramrajkumar commented 9 years ago

Possible effect: https://bitsharestalk.org/index.php?topic=7022.msg164927#msg164927

nathanielhourt commented 9 years ago

Is this still happening? Have you tried it with a fresh data dir?

testzcrypto commented 9 years ago

Yes, it's still happening, it's not a problem with fresh data dir, the problem is local characters in the path, if your Windows user name uses local characters (like Тест) you will see the problem, probably same will happened if you create folder C:\Тест and specify it as --data-dir.

nathanielhourt commented 9 years ago

Right, I understand, but I've had an issue before where logs weren't being generated correctly because my config.json was generated by an outdated client.

testzcrypto commented 9 years ago

Just check and I can confirm that this problem happening with v0.4.27.2, it's show error message, no data dir, no log files (%APPDATA% = C:\Users\Тест\AppData\Roaming) if I specify --data-dir - works good.

nathanielhourt commented 9 years ago

If you specify a data dir with non-ASCII characters, it works?

testzcrypto commented 9 years ago

bitshares_client.exe works, BitShares.exe fail with error message. Try: bitshares_client.exe --data-dir C:\дата and BitShares.exe --data-dir C:\дата

vikramrajkumar commented 9 years ago

@testzcrypto Is this problem still present in 0.6.x version?

testzcrypto commented 9 years ago

Yes, problem still present in 0.6.2.

vikramrajkumar commented 9 years ago

Possibly related: https://github.com/BitShares/qt_wallet/issues/94

testzcrypto commented 9 years ago

Reproducible in BitShares 0.9.1, Windows username Тест, %APPDATA% = C:\Users**Тест**\AppData\Roaming

testzcrypto commented 9 years ago

Probably same problem with French Windows user name: https://bitsharestalk.org/index.php/topic,16235.msg