Opened 9 years ago

Last modified 9 years ago

#3431 closed defect

[PATCH] Color Picker fails with MatchSettings of alpha 18 — at Version 3

Reported by: gameboy Owned by:
Priority: Must Have Milestone: Alpha 19
Component: UI & Simulation Keywords: patch
Cc: Patch:

Description (last modified by elexis)

Today I tested the latest r17040, when I choose a single player game, when you choose your faction, the error appears:

WARNING: JavaScript warning: gui/gamesetup/gamesetup.js line 901 reference to undefined property pData.Color

ERROR: JavaScript error: gui/common/functions_utility.js line 151 TypeError: color2 is undefined sameColor@gui/common/functions_utility.js:151:5 selectPlayerColor/pData<@gui/gamesetup/gamesetup.js:901:39 selectPlayerColor@gui/gamesetup/gamesetup.js:901:6 initMain/colorPicker.onSelectionChange@gui/gamesetup/gamesetup.js:377:48 onGameAttributesChange@gui/gamesetup/gamesetup.js:1532:4 loadGameAttributes@gui/gamesetup/gamesetup.js:784:2 initMain@gui/gamesetup/gamesetup.js:403:3 onTick@gui/gamesetup/gamesetup.js:829:3 __eventhandler36 (tick)@setupWindow tick:0:1

WARNING: JavaScript warning: gui/gamesetup/gamesetup.js line 383 reference to undefined property g_GameAttributes.settings.PlayerData[playerSlot]

ERROR: JavaScript error: gui/gamesetup/gamesetup.js line 383 TypeError: g_GameAttributes.settings.PlayerData[playerSlot] is undefined initMain/civ.onSelectionChange@gui/gamesetup/gamesetup.js:383:5 initCivNameList@gui/gamesetup/gamesetup.js:588:3 initMain@gui/gamesetup/gamesetup.js:121:2 onTick@gui/gamesetup/gamesetup.js:829:3 __eventhandler36 (tick)@setupWindow tick:0:1

ERROR: JavaScript error: gui/gamesetup/gamesetup.js line 383 TypeError: g_GameAttributes.settings.PlayerData[playerSlot] is undefined initMain/civ.onSelectionChange@gui/gamesetup/gamesetup.js:383:5 initCivNameList@gui/gamesetup/gamesetup.js:588:3 initMain@gui/gamesetup/gamesetup.js:121:2 onTick@gui/gamesetup/gamesetup.js:829:3 __eventhandler36 (tick)@setupWindow tick:0:1

Change History (5)

comment:1 by gameboy, 9 years ago

Resolution: fixed
Status: newclosed

comment:2 by elexis, 9 years ago

Component: Core engineUI & Simulation
Description: modified (diff)
Milestone: BacklogAlpha 19
Priority: Should HaveMust Have
Resolution: fixed
Status: closedreopened
Summary: ERROR:Change player color in the gamesetup.[PATCH] Color Picker fails with MatchSettings of alpha 18

http://wildfiregames.com/forum/index.php?s=63819c21195ce79c90c23b607d4d0b20&showtopic=20059

Thanks for reporting. Yes, we noticed that too yesterday and I had uploaded a patch already, will be committed as soon as possible ;)

The reason for this bug is that the persist-matchsettings files of alpha 18 were not sanitized. For example they contain "Colour" instead of "Color" and sometimes both or neither.

The bug doesn't occur if svn creates the matchsettings file, as it was sanitized when changing the map.

by elexis, 9 years ago

Attachment: matchsettings.json added

An insane matchsettings file produced by alpha18 which produces the error with r17040.

by elexis, 9 years ago

Sanitizes the deprecated matchsettings.

comment:3 by elexis, 9 years ago

Description: modified (diff)
Keywords: patch review added
Note: See TracTickets for help on using tickets.