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

OpenSpades crashes if core_locale is invalid #468

Closed
feikname opened this issue Dec 1, 2016 · 5 comments
Closed

OpenSpades crashes if core_locale is invalid #468

feikname opened this issue Dec 1, 2016 · 5 comments
Assignees
Labels
bug some feature is broken localization system
Milestone

Comments

@feikname
Copy link
Collaborator

feikname commented Dec 1, 2016

Version: 0.1.0 (development)

Steps to reproduce:

  • Edit SPConfig.cfg to have an invalid core_locale (one that can't be found or does not exist)
  • Launch OpenSpades
  • It crashes right after loading the splash screen.

Expected behaviour:

  • Silently ignore the error and load the default strings. OR
  • Show the error and ask to change core_locale to an valid one.

Files and logs:
SPConfig.cfg, SystemMessages.log and a link to the Crash Dump can be found inside this Gist.

@feikname feikname added bug some feature is broken localization system labels Dec 1, 2016
@feikname feikname changed the title OpenSpades crashes if there is core_locale is invalid OpenSpades crashes if core_locale is invalid Dec 1, 2016
@feikname feikname added this to the 0.1.0 milestone Dec 1, 2016
@mschlumpp
Copy link
Contributor

I can't reproduce it on my system. What kind of "invalid" 'core_locale' did you use? Also a backtrace could be useful.

@feikname
Copy link
Collaborator Author

feikname commented Dec 3, 2016

@theunknownxy

I used an inexistent one. I will try to reproduce it with latest build and provide a backtrace tomorrow.

EDIT: Done.

@VelocityRa
Copy link
Collaborator

Here's a callstack (you'll still probably want to repro it yourself if you want to fix it):
image

I changed the core_locale to pc_cp, restarted the client, crash occured (read access violation).

@VelocityRa
Copy link
Collaborator

VelocityRa commented Dec 3, 2016

The bug is here, I think it's trying to print a string that's not null-terminated:

image

@yvt yvt self-assigned this Dec 3, 2016
@yvt yvt closed this as completed in ccd365b Dec 3, 2016
@yvt
Copy link
Owner

yvt commented Dec 3, 2016

This was the actual cause of the issue:

 					SPLog("Catalog file for the locale '%s' was not found. (domain='%s')",
-					      domainName.c_str());
+					      currentLocaleRegion.c_str(), domainName.c_str());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug some feature is broken localization system
Projects
None yet
Development

No branches or pull requests

4 participants