Hello Whizzer, I am back again... tbh, this is a big question for quick modding ones, but I wanted to write here rather than a PM in case someone else knows.
I have been working on After the End: Eurasia, which has been in development hell for years due to inconsistent crashing on load. Drastic measures have been taken, but we cannot figure it out. It loads sometimes, it doesn't sometimes, and even if it does load, it only goes a month or so in game. We did switch the code base over to CleanSlate, but it was crashing like this before too.
One wacky problem is the game is assigning traits doubly. Like, a random courtier will have two instances of paranoid. We checked traits, which are all CleanSlated, but everything looks like what CleanSlate has besides the obvious mod specific ones.
Secondly, is that we have a file of Chinese characters which appear to be load bearing... if we have that file in, the game loads to the main menu and you can pick a character and sometimes it loads in and sometimes doesn't, and a variety of characters are tested but there is no rhyme or reason to it. When the Chinese chars are included, the game crashes during the load process. We have torn through the file, but really have no clue which character it is, besides one wife/mother who seems like the culprit but there are no errors in her code.
We appreciate your ideas in advance... we are about to tear our garments and run for the hills. Please help
Not Whizzer, but some ideas:
Regarding the trait thing, check setup.log. It will have entries like
Code:
[trait.cpp:1221]: Trait #1 tag = cat name = Cat
. If you've got two entries of the same tag, something is definitely up... and
per the wiki the file structure behavior is for traits is
| Merge, but traits with same name will co-exist, and generated characters may get both versions of the trait at the same time. The last definition gets assigned to a character when using commands. |
which to me seems to indicate you're not overriding the directory properly
or you've got the trait defined in two files present in the mod itself.
Regarding the crashes, it sounds like there are multiple causes, but you might want to look at
the Troubleshooting page on the wiki. When you get a crash during setup, setup.log's last line will give you a hint as to where the issue was (the
next file would be the issue, so if e.g.
Code:
[eventmanager.cpp:269]: Events loaded events/AA_events.txt' #1
is present, look at "AB_events.txt").
error.log might also give some hints regarding issues, but that gets a
lot of false positives during setup (e.g. missing tech seeds for all duchies if you've got that set on the county level instead), so I personally tend to look at how many lines there are and then filter out everything that's "supposed" to be there.
A somewhat repeatable crash one month in
does sound familiar, but I don't remember the exact issue (
might have been something related to a focus (including childhood/adolescence), plot, or ambition), and there might be other ways to get something like that (e.g. any events randomly firing around that time could be part of the problem).
Ultimately, however, if you've got a bunch of unclear crashes, the Validator isn't giving you any hints, the logs aren't giving you any hints, manual checking of interface/graphics files doesn't show anything (I once had an issue with a transparent CoA causing a crash on startup that required manual checking), you probably need to go back to the last stable version and add back "a few" new/changed files at a time (in a sensible order; you'll create new issues if you e.g. have an on_actions file referencing a missing event) to see when things break, then narrow it down further by adding files one at a time. Keep adding back files slowly after fixing the first issue you discover is fixed; you might have more than one.
I
strongly recommend getting in the habit of launching the mod and running an observer game for a bit whenever you've made sizeable changes to it (after first fixing any Validator and error.log issues that aren't just "Missing/broken loc stirng"), because if you e.g. break things today and don't test for a month you'll have a month's worth of files to check.
On the character issue, if the Validator isn't giving you anything relevant in the file and error.log isn't giving you anything relevant in the file, I'd try something similar to the "add back a few files at a time" approach with the characters in the file; the game can reach the main menu just fine with a good number of characters missing (tested by deleting Tianxia's Yamato/Japanese character file; which screws up a bunch of title histories). Also check on issues with the ID of the suspected character -- is it a duplicate, would it cause 32-bit integer overflow, or anything like that? -- and whether you've got some bracket issues (missing/extra or "wrapping" more than it should), missing equals signs, incorrect tags for anything, or stray characters anywhere (the Validator should catch these issues).