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
#11
Solved: 3 Years, 7 Months, 4 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
Joseph Curwen Offline
Member

Posts: 63
Threads: 8
Joined: Aug 2010
Reputation: 0
#12
Solved: 3 Years, 7 Months, 4 Weeks ago RE: Segmentation fault launcher and AmnesiaAMFP.bin.x86_64

(09-19-2013, 07:59 PM)Urkle Wrote: 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.
Yes, I get the same error when I set e.g. LANG=foobar or anything other that is not a valid value for this. But for eo.UTF-8 (upper case, don't know if this matters) it still silenty crashens.

Quote:Now, do you have any other lang variables set?? e.g. anything starting with LC_ (set | grep LC_)
$ set | grep LC_
LC_ADDRESS=eo.UTF-8
LC_IDENTIFICATION=eo.UTF-8
LC_MEASUREMENT=eo.UTF-8
LC_MONETARY=eo.UTF-8
LC_NAME=eo.UTF-8
LC_NUMERIC=eo.UTF-8
LC_PAPER=eo.UTF-8
LC_TELEPHONE=eo.UTF-8
LC_TIME=eo.UTF-8
    for i in $(LC_ALL=C $prog --help);
    for i in $(LC_ALL=C $prog --usage);
    local LC_CTYPE=C;
            __grubcomp "$(LC_ALL=C $prog --help |                         awk -F ":" '/available formats/ { print $2 }' |                         sed 's/, / /g')";
            __grubcomp "$(LC_ALL=C $prog --help |                         awk -F "[()]" '/--target=/ { print $2 }' |                         sed 's/|/ /g')";
    LANG=C LC_MESSAGES=C svn info --non-interactive 2> /dev/null | while read line; do
But only setting LANG=en_US.UTF-8 is enough to make the game run.

Quote:(And this is the same code that has been in the Penumbra series, and Amneisa: TDD)..
No problems with TDD.
09-23-2013, 11:04 AM
Find




Users browsing this thread: 1 Guest(s)