REPORTING a language bug (Spanish in Ubuntu)

Help
Anonymous
2011-07-23
2014-04-18
  • Anonymous - 2011-07-23

    Hi, I would to report a bug produced when executing RCSS, particularly with
    the RCSS Monitor.

    Simply, when I execute a simulation with RCSS with the Spanish language seted
    in my OS (Ubuntu Linux), the Server works fine (I think) but the Monitor keeps
    a frozen image when I send a kick-off message. Actually, when a kick-off
    message is sent, the players are drown incorrectly until one of them kick the
    ball, and that is the moment when te screen is frozen.

    I haven't tried with other languages (obviously, with English works
    perfectly), but I'm sure that the problem is the language beacause I've tried
    it in different computers, operating systems and RCSS versions (version 14
    didn't work neither), and commuting from Spanish to English, it worked fine.

    That's only a contribution, I hope you can resolve it in future versions! ;)

     
  • Sandor Nagy

    Sandor Nagy - 2014-03-20

    Hi! I think, this may cause problem in those areas, which use decimal comma instead of decimal point (like here, in Hungary too).

    Reason: rcssserver is sending the floats with decimal point, but rcssmonitor is waiting decimal point or decimal comma depends of locale settings.
    These are the 50th to the 56th lines from src/main.cpp file:

        std::locale::global( std::locale::classic() );
    
        std::cout << PACKAGE"-"VERSION << "\n\n"
                  << "Copyright (C) 2009 - 2012 RoboCup Soccer Simulator Maintenance Group.\n"
                  << std::endl;
    
        QApplication app( argc, argv );
    

    The 50th line (above the first) is in order to unify the decimal point, but:

    On Unix/Linux Qt is configured to use the system locale settings by default. This can cause a conflict when using POSIX functions, for instance, when converting between data types such as floats and strings, since the notation may differ between locales. To get around this problem, call the POSIX function setlocale(LC_NUMERIC,"C") right after initializing QApplication or QCoreApplication to reset the locale that is used for number formatting to "C"-locale.

    http://qt-project.org/doc/qt-4.8/qcoreapplication.html#locale-settings

    Solution:
    a. You switch to an English locale your operation system, which will use decimal point.
    b. I had created a Git patch file and attached to this message. That move the 50th line to the right place. Usage:
    [username@pc rcssmonitor-15.1.0/src]$ patch -p0 -i rcssmonitor-15.1.0.patch

    We hope this little bug will be fixed.

     
    Last edit: Sandor Nagy 2014-03-24
  • Hidehisa Akiyama

    Hi Sándor,

    Sorry for my late response.
    Thank you for reporting the detail and providing the patch.
    I will release the new version ASAP.

    Best regards,

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks