Crash on long translatable label texts

Moderator: NADEO

Locked
User avatar
steeffeen
Translator
Translator
Posts: 2472
Joined: 14 Oct 2012, 16:22
Location: Germany

Crash on long translatable label texts

Post by steeffeen » 26 Jul 2013, 17:48

hey there,

i tried building a long translatable text with several TextLib::Compose() parts
unfortunately the client crashes instantly on script start

crash log
crash log after some changes

i can supply the regarding code if needed

regards,
steff

// Edit: updated thread subject
Last edited by steeffeen on 29 Apr 2014, 14:19, edited 2 times in total.
    Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

    ManiaControl, FancyManiaLinks

    User avatar
    steeffeen
    Translator
    Translator
    Posts: 2472
    Joined: 14 Oct 2012, 16:22
    Location: Germany

    Re: Crash on script start

    Post by steeffeen » 27 Jul 2013, 21:56

    alright, i did the same with another script and noticed something:

    i've only composed the long text and added it to the spawnscreen lib with

    Code: Select all

    SpawnScreen::AddSubsection("section", TextVar);
    and still everything is fine

    on the next try i called

    Code: Select all

    SpawnScreen::CreatePrettyRules("name");
    as well and then the crash happened

    so it seems to have something to do with manialink labels
      Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

      ManiaControl, FancyManiaLinks

      User avatar
      steeffeen
      Translator
      Translator
      Posts: 2472
      Joined: 14 Oct 2012, 16:22
      Location: Germany

      Re: Instant Crash on long translatable label texts

      Post by steeffeen » 29 Apr 2014, 14:19

      it's happening if you compose the string wrong by giving invalid parameter placeholders and try to display this string on the ui

      LogCrash_00B51EEC.txt

      Code: Select all

      declare test = TextLib::Compose(_("My %1st Param, My %2nd Param, My %3rd Param, My 4%th Param"), "1", "2", "3", "4");
      test = TextLib::Compose(_("%1, My %5th Param, My %6th Param, My %7th Param"), test, "5", "6", "7");
      UIManager.UIAll.ManialinkPage = """<label text="{{{test}}}"/>""";
        Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

        ManiaControl, FancyManiaLinks

        Locked

        Return to “Shootmania Storm Reports”

        Who is online

        Users browsing this forum: No registered users and 1 guest