Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#3431 closed defect (fixed)

[PATCH] Color Picker fails with MatchSettings of alpha 18

Reported by: gameboy Owned by: mimo
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

Attachments (2)

matchsettings.json (1.9 KB ) - added by elexis 9 years ago.
An insane matchsettings file produced by alpha18 which produces the error with r17040.
t3431_sanitize_matchsettings_v1.patch (4.8 KB ) - added by elexis 9 years ago.
Sanitizes the deprecated matchsettings.

Download all attachments as: .zip

Change History (7)

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

comment:4 by mimo, 9 years ago

Owner: set to mimo
Resolution: fixed
Status: reopenedclosed

In 17043:

sanitize matchsettings, patch by elexis, fixes #3431

comment:5 by mimo, 9 years ago

Keywords: review removed

Thanks for the patch

Note: See TracTickets for help on using tickets.