Skip to content
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

XML parsing with non-standard linux-locale #913

Closed
benjaminhuth opened this issue May 23, 2022 · 1 comment
Closed

XML parsing with non-standard linux-locale #913

benjaminhuth opened this issue May 23, 2022 · 1 comment
Labels

Comments

@benjaminhuth
Copy link

I'm not sure if this is really a bug, but certainly a unexpected behavior at least for me:

I tried to parse a DD4hep XML-file (this one specifically, though it shouldn't matter for the issue: https://gitlab.cern.ch/acts/OpenDataDetector/-/blob/main/xml/OpenDataDetector.xml) with the ACTS DD4hep interface, and got the following error:.

RuntimeError: dd4hep: Evaluator::Object : syntax error : value=10.0*m [Evaluation error]

After quite some time of debugging I found the error in the configured locale, where the LC_NUMERIC entry was set to de_DE.UTF-8, which caused the failure of the floating point parsing (it expected a comma). Changing this value to the default C-locale resolved the error.

From my perspective the dependence on the configured locale for the parsing causes hard to debug errors and should be fixed (or at least checked with a warning).

  • OS version: e.g. Fedora 5.17.6-200.fc35.x86_64
  • Compiler version: GCC 11.3.1
  • DD4hep version: v01-17
@MarkusFrankATcernch
Copy link
Contributor

After quite some investigations:
Cannot be fixed if the old locales in C and C++ should be restored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants