Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Segmentation fault launcher and AmnesiaAMFP.bin.x86_64
Urkle Offline
FG - Associate

Posts: 1,172
Threads: 31
Joined: Jul 2006
Reputation: 21
Solved: 5 Years, 5 Months, 2 Weeks ago RE: Segmentation fault launcher and AmnesiaAMFP.bin.x86_64

The crash occurred in XGetICValues which is part of the multi-language input (IME) handling in X11. not sure why exactly it doesn't like eu.UTF-8 setting it to "C" would effectively turn off UTF8 which you generally don't want to do.. you want to use a UTF8 locale.. such as en_US.UTF-8.

Now, on my system (Fedora 17). setting the locale to yours does not cause a crash but rather causes it to quit with an error.

LANG=eo.utf8 ./Launcher.bin.x86_64
Can't set the specified locale! Check LANG, LC_CTYPE, LC_ALL.

Now, do you have any other lang variables set?? e.g. anything starting with LC_ (set | grep LC_)

Essentially what is going on is I'm initializing the locale with the environment as internally amnesia handles Unicode conversions for text and file paths..

So we do a simple call like this in the startup.

    if(!std::setlocale(LC_CTYPE, "")) {
                fprintf(stderr, "Can't set the specified locale! Check LANG, LC_CTYPE, LC_ALL.\n");
                return 1;
        char *charset = nl_langinfo(CODESET);
        bool utf8_mode = (strcasecmp(charset, "UTF-8") == 0);
        if (!utf8_mode) {
                fprintf(stderr, "UTF-8 Charset %s available.\nCurrent LANG is %s\nCharset: %s\n",
                        utf8_mode ? "is" : "not",
                        getenv("LANG"), charset);

Which should not fail. (And this is the same code that has been in the Penumbra series, and Amneisa: TDD).. so I'm surprised that there are now issues. And it's rather odd that on Ubuntu setting the locale succeeds only to have the X calls crash later on.

I'll have to investigate more on what is causing this issue.. But you might want to ensure you have the latest updates installed and possible report a bug with your distribution about the issue with that locale.

Developing away on one of
Multiple Macs running 10.6, 10.7, 10.8, and 10.9.
Linux, 8-core AMD, 8GB RAM, Fedora 18, nVidia 450 1GB
(This post was last modified: 09-19-2013, 08:17 PM by Urkle.)
09-19-2013, 07:59 PM
Website Find

Messages In This Thread
RE: Segmentation fault launcher and AmnesiaAMFP.bin.x86_64 - by Urkle - 09-19-2013, 07:59 PM

Users browsing this thread: 1 Guest(s)