Opened 2 years ago

Last modified 2 years ago

#6433 closed defect

[26393] Errors pop up — at Version 1

Reported by: Langbart Owned by:
Priority: Should Have Milestone: Alpha 26
Component: UI – Game setup Keywords:
Cc: Patch:

Description (last modified by Langbart)

to reproduce

  1. Start a game with the autostart command e.g.
    binaries/system/pyrogenesis -conf=mod.enabledmods:"mod public" -autostart="random/unknown" -autostart-seed=-1 -autostart-civ=1:spart -autostart-civ=2:brit -autostart-ai=2:petra
    
  1. Errors appear
    0 A.D. (0.0.26) Main log (warnings and errors only)
    ERROR: JavaScript error: gui/common/l10n.js line 69 Script value conversion check failed: v.isString() || v.isNumber() || v.isBoolean() (got type undefined) translate@gui/common/l10n.js:69:36 TitleDisplay@gui/loading/TitleDisplay.js:11:13 init@gui/loading/loading.js:10:19
    
    ERROR: GUI page 'page_loading.xml': Failed to call init() function
    
    ERROR: JavaScript error: gui/loading/loading.js line 22 g_LoadingPage is undefined reallyStartGame@gui/loading/loading.js:22:2
    

bisect

The issue can be noticed for the first time with changeset [26393]

File causing issues

Line 11 in the file gui/loading/TitleDisplay.js has been changed. If I undo the change, the problem for the autostart command is no longer reproducible, but the normal GUI game setup within the app is broken. I don't know how to solve the problem, waiting for big brain (bb).

  • ps/trunk/binaries/data/mods/public/gui/loading/TitleDisplay.js

     
    11/**
    22 * This class choses the title of the loading screen page.
    33 */
    44class TitleDisplay
    55{
    66    constructor(data)
    77    {
    88        let loadingMapName = Engine.GetGUIObjectByName("loadingMapName");
    99        loadingMapName.caption = sprintf(
    1010            data.attribs.mapType == "random" ? this.Generating : this.Loading,
    11             { "map": translate(data.attribs.settings.Name) });
     11            { "map": translate(data.attribs.settings.mapName) });
    1212    }
    1313}
    1414
    1515TitleDisplay.prototype.Generating = translate("Generating “%(map)s”");
    1616
    1717TitleDisplay.prototype.Loading = translate("Loading “%(map)s”");

Change History (2)

by Langbart, 2 years ago

Attachment: change_26393.jpg added

comment:1 by Langbart, 2 years ago

Description: modified (diff)

additional comment on the file causing the problem

Note: See TracTickets for help on using tickets.