spelling corrections in #4617 can crash the game with popup "Failed to parse wrf/multires.wrf" #4639
Description
resolution_fixed
type_bug
| by Forgon
Ticket #4617 (implemented in commit '2ce9492056d84846a07174770cfc2c46abf44e7b') corrected the string 'Incenediary' to 'Incendiary' in the following files:
- './data/mp/multiplay/skirmish/nb_rulesets/standard.js'
- './data/mp/multiplay/skirmish/nexus.vlo'
- './data/mp/multiplay/skirmish/semperfi.vlo'
- './data/mp/stats/research.json'
- './data/mp/stats/structure.json'
- './data/mp/stats/weapons.json'
This affects Incendiary Mortar and Incendiary Howitzer, whose misspelled mentioning in old files, e.g. savegames and mods, can cause the game to crash with a popup displaying a message 'Failed to parse wrf/multires.wrf' (see attached image [raw-attachment:popup.png]) and error messages similar to:
--- Starting log [error.log]---
info |00:00:06: [realmain:990] (global) mod (ultimatescavs-1-17-RC4.wz) is enabled
info |00:00:15: [loadResearch:188] Could not find stats for Emplacement-Howitzer-Incendiary research > Incendiary Howitzer Emplacement
info |00:00:15: [loadResearch:188] Assert in Warzone: research.cpp:188 (research.psStat), last script event: ''
info |00:00:15: [resLoadFile:549] The load function for resource type "RESCH" failed for file "research.json"
info |00:00:15: [resLoadFile:549] Assert in Warzone: frameresource.cpp:549 (false), last script event: ''
fatal |00:00:15: [resLoad:208] Failed to parse wrf/multires.wrf
error |00:00:18: [levLoadData:760] Failed resLoad(wrf/multires.wrf)!
fatal |00:00:18: [startGameLoop:568] Shutting down after failure
The problem can easily be fixed by correctly spelling 'Incenediary'. Linux users can use the attached bash script [raw-attachment:fix_spellings], which can be used in the following ways:
./fix_spellings [file]
-- backs up 'file' and corrects spelling within it./fix_spellings [directory]
-- backs up 'directory' and corrects spelling within it./fix_spellings [archive.zip]
-- backs up 'archive.zip', extracts its files into new directory 'archive', corrects spelling within that directory, recreates zip archive 'archive.zip' and removes new directory 'archive'./fix_spellings [archive.wz]
-- analogous to procedure above, since '.wz' files are '.zip' files
Issue migrated from trac:4639 at 2022-04-16 12:54:57 -0700
Activity
wzdev-ci commentedon Sep 19, 2017
Forgon uploaded file
popup.png
(30.6 KiB)popup displaying warning message "Failed to parse wrf/multires.wrf"

wzdev-ci commentedon Sep 19, 2017
Forgon uploaded file
error.log
(0.8 KiB)logfile containing error messages
wzdev-ci commentedon Sep 19, 2017
Forgon uploaded file
fix_spellings
(0.5 KiB)bash script that can fix the problem
wzdev-ci commentedon Sep 19, 2017
Berserk Cyborg uploaded file
0001-Fix-Nullbot-research-item-and-revert-a-few-changes.patch
(19.7 KiB)wzdev-ci commentedon Sep 19, 2017
Berserk Cyborg changed blocking which not transferred by tractive
wzdev-ci commentedon Sep 19, 2017
Berserk Cyborg changed blockedby which not transferred by tractive
wzdev-ci commentedon Sep 19, 2017
Berserk Cyborg commented
Have not tested the above, will do so later. I also used this as an opportunity to remove that resolution patch and fix trailing white-spaces and the super pulse laser research item for NullBot.
wzdev-ci commentedon Sep 19, 2017
Berserk Cyborg changed status from
new
toclosed
wzdev-ci commentedon Sep 19, 2017
Berserk Cyborg changed owner from `` to
Berserk Cyborg
wzdev-ci commentedon Sep 19, 2017
Berserk Cyborg changed resolution from `` to
fixed
wzdev-ci commentedon Sep 19, 2017
Berserk Cyborg committed [52]
In Warzone2100/warzone2100@52db941: