![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
![]() |
#1 |
Swabbie
![]() Join Date: Nov 2015
Posts: 11
Downloads: 18
Uploads: 0
|
![]()
I had my first consistent game crash in real play within a certain area, and investigated. I turns out, the code that is used by the game to read ini-style files has a bug: if there are comments before the first [...] label, it can rarely and semi-randomly cause one such section within the file to be effectively emptied of all contents. If it happens to an .eqp file, the game will crash whenever the affected ship tries to be rendered, whether in mission or in Museum (in my case, the damage was to Sea\NTRW_\NTRW_.eqp for GWX's ASW Trawler).
This bug can be fixed with a relatively small patch, but an easier workaround may be to never use comments at the very start of an ini file. The technical cause of the bug is as follows: the ini reader uses hashes to index ini sections, without any support for collisions; it also for some reason reads and stores comments into memory. If a comment occurs at the start of the file, it creates an empty section without a name to store it, and does not initialize the hash value for that empty section. If the memory happens to contain a value that matches the hash of one of the real section names, the collision will prevent any of the values within it to be read. This is the patch that worked for me (it's for the Steam version in case it matters): |
![]() |
![]() |
|
|