New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test case failed on chain_test #1326

HarukaMa opened this Issue Sep 14, 2018 · 6 comments


4 participants

HarukaMa commented Sep 14, 2018

I've been testing building with Boost 1.67.0, and the compilation succeeded despite it is not supported, so I decided to run tests (*_test) to check for errors.

When running chain_test, I've met one error:

unknown location:0: fatal error: in "uia_tests/asset_name_test": std::runtime_error: collate_byname<char>::collate_byname failed to construct for en_US.UTF8
/Users/MrX/src/bitshares-core/tests/tests/uia_tests.cpp:503: last checkpoint

other tests except es_test (didn't have es installation locally) succeeded without errors.

Additional info:

$ locale

Describe which portion(s) of BitShares Core may be impacted by this bug. Please tick at least one box.

  • API (the application programming interface)
  • Build (the build process or something prior to compiled code)
  • CLI (the command line wallet)
  • Deployment (the deployment process after building such as Docker, Travis, etc.)
  • DEX (the Decentralized EXchange, market engine, etc.)
  • P2P (the peer-to-peer network for transaction/block propagation)
  • Performance (system or user efficiency, etc.)
  • Protocol (the blockchain logic, consensus, validation, etc.)
  • Security (the security of system or user data, etc.)
  • UX (the User Experience)
  • Other (please add below)

Host Environment

  • Host OS: macOS 10.13.6
  • Host Physical RAM: 16 GB
  • BitShares Version: 2.0.171025-minor-fix-1-1293-g0e86ff5 NOTE: I think this string is broken for a while
  • OpenSSL Version: 1.1.1-dev it is using a self compiled version, I even forgot when I compiled it, but seems running fine
  • Boost Version: 1.67.0


  • Evaluate / Prioritize Bug Report
  • Refine User Stories / Requirements
  • Define Test Cases
  • Design / Develop Solution
  • Perform QA/Testing
  • Update Documentation

This comment has been minimized.


abitmore commented Sep 14, 2018

The user doesn't have en_US.UTF8 locale installed, while the test case is trying to use it. The failing test case is:

// locales issue
std::locale loc1("en_US.UTF8");
static const std::locale& loc2 = std::locale::classic();
const wchar_t c = L'\u042f';
// isalpha will allow non ascii chars if locale is not C
BOOST_CHECK_EQUAL( isalpha(c, loc1), true);
BOOST_CHECK_EQUAL( isalpha(c, loc2), false);


This comment has been minimized.


abitmore commented Sep 14, 2018

Update: got same error in Windows.


This comment has been minimized.

HarukaMa commented Sep 15, 2018

en_US.UTF-8 may work on macos, but not sure on windows.


This comment has been minimized.

jmjatlanta commented Sep 27, 2018

I may be jumping in the middle here, but it is my understanding that this is testing to see if the isalpha function works as expected in various locales (new "non-C" way vs the classic "C" way).

What I do not understand is why are we testing a standard library function? Is there a belief that the standard will change? Or perhaps that some platforms will not implement it correctly?

Perhaps this test was simply to clarify how things work.

I may be wrong, but I do not see the benefit of those lines in this test. If everyone agrees, I will remove those lines. If not, please let me know why these lines are here. Thanks!


This comment has been minimized.

pmconrad commented Sep 28, 2018

IIRC the asset name validation code used the system locale and thus might have allowed to create assets with non-ascii names, depending on witness system locale settings. This has been fixed, so IMO these lines can be removed.
Or perhaps replace with a test case that ensures that non-ascii asset names don't work.

@abitmore abitmore added this to the 201810 - Feature Release milestone Oct 1, 2018

@abitmore abitmore added this to To do in Feature release (201810) via automation Oct 1, 2018

@abitmore abitmore moved this from To do to In progress in Feature release (201810) Oct 1, 2018


This comment has been minimized.

pmconrad commented Oct 10, 2018

Resolved via #1346

@pmconrad pmconrad closed this Oct 10, 2018

Feature release (201810) automation moved this from In progress to Done Oct 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment