Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

spelling corrections in #4617 can crash the game with popup "Failed to parse wrf/multires.wrf" #4639

Closed
wzdev-ci opened this issue Sep 19, 2017 · 11 comments

Comments

@wzdev-ci
Copy link
Contributor

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

@wzdev-ci
Copy link
Contributor Author

Forgon uploaded file popup.png (30.6 KiB)

popup displaying warning message "Failed to parse wrf/multires.wrf"
popup.png

@wzdev-ci
Copy link
Contributor Author

Forgon uploaded file error.log (0.8 KiB)

logfile containing error messages

@wzdev-ci
Copy link
Contributor Author

Forgon uploaded file fix_spellings (0.5 KiB)

bash script that can fix the problem

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg uploaded file 0001-Fix-Nullbot-research-item-and-revert-a-few-changes.patch (19.7 KiB)

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg changed blocking which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg changed blockedby which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

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
Copy link
Contributor Author

Berserk Cyborg changed status from new to closed

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg changed owner from `` to Berserk Cyborg

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg changed resolution from `` to fixed

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg committed [52]


In Warzone2100/warzone2100@52db941:

#CommitTicketReference repository="" revision="52db9416a8fbb7984165bbdc58b4b96efe872c33"
Fix Nullbot research item and revert a few changes.

Reverts part of 2ce9492 where "Incenediary" was corrected to "Incendiary" so as
not to break mods and savegames.

Fully revert 6000e5e so resolutions can be changed again.

Fixes Nullbot research for super pulse laser cyborg.

Fixes #4639.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant