cybrxkhan / VIET

Vanilla Immersion, Events, and Traits
5 stars 5 forks source link

Iso Branch Status #60

Open thefinestsieve opened 10 years ago

thefinestsieve commented 10 years ago

Ziji and I are in the process of doing a binary search through decisions. The currently activated decisions represent a group which (seems) to have led to a CTD. In order to continue to testing process, the active decisions will need to be halved again.

(Please don't close this issue until testing has picked up again.)

List of decisions currently active: VIET_heresy_decisions, VIET_misc_decisions, VIET_misc_religion_decisions, VIET_Pagan_decisions, VIET_West_Africa_decisions, VIET_Z_Customization_Options, realm_decisions, succession_laws

zijistark commented 10 years ago

Also, please make no commits to the Isolation branch without also keeping this issue up-to-date. In general, AMC is current tag-you're-it leader of the details of what we've been crossing-off, and it's important that resumption is easy, because this is the drudge of the drudgery and also on the critical path of nearly all of what is presently known by users as "HIP."

Extensive addendum to AMC's note:

This is where we currently stand:

The following set of unchecked decision files is very likely to contain at least one decision whose execution or possibly just allow/potential evaluation by the AI (remember, for observe games, only _ai_actually_willdo matters) leads directly to a CTD under some unknown circumstances[1]:

[1] On an informed hunch, we do reason that those circumstances are likely reduced in frequency of occurrence by the coincident lack of war, plots, and factions in the test games' progression due to the generally increased observed MTTH of CTDs in our current isolation tests. However, that observation may be due purely to a) coincidental, independent CTD sources existing in, e.g., the disabled CBs/war and/or b) the ridiculously small sample space available for informing troubleshooting decisions.

Final notes:

This is grueling and demoralizing work indeed, so progress is going to be slow (particularly if nobody else offers to lend a hand, so please do lend a hand-- or a CPU core!)-- even though that set of files is looking as small as it is already. That potential sluggishness is why it was important to compile this relatively detailed "case file" (combined with git history on the isolation branch) in order for someone to be able to effectively resume this work in the future or simply join the effort.

It is not reasonable to expect anybody to sit through this kind of work alone. It very much benefits from a team effort (cheerleading, if need be). It would be totally reasonable to just halt further efforts for quite some time to take a break, although it is important that the effective PB+VIET codebase doesn't change much at all underneath the experiments being done here, or their empirical premises will rapidly rot.

However, the importance of eliminating the most frequent CTD sources in, particularly, PB+VIET ranges HIP-wide, and the outstanding VIET crash issues are presently the most critical blocker to any further new additions to PB, VIET, or any other mod intended to be compatible with VIET (existing or planned). For every minute spent on this drudgery, @thefinestsieve and insert your name here are, from my perspective, working on the single most important, concrete technical obstacle that currently lies in the path of HIP's indefinite future.

zijistark commented 10 years ago

From VIso4 (the state detailed in my previous comment), I've created new branch iso5 from Isolation. If iso5 still CTDs, I'll branch again from here. For a guided "binary search" process of elimination where all the observation-game data points are of interest, this seems the most flexible policy.

Changes:

The following decision files are now additionally blank:

This should leave the following PB- or VIET-contributed decision files active in the PB+VIET install:

My goal is to get a long-haul data point that doesn't crash again. I chose files strategically for that. That should add some more confidence that we're on the right path; a lack of a CTD at all helps confirm that multiple CTD-source interaction is not disturbing the elimination process and, obviously, its additional eliminations. Since we're not running these to 400+ years, a little confidence boost is important now and then... It's about 75 years into a 1066 start as of this writing.

zijistark commented 10 years ago

VIso5 (iso5 branch) was indeed CTD-free. I saved and quit the game at +215 years from the 1066 start. The iso5 branch will not receive any further commits but will be kept for reference for now.

Ergo, at least one of the following 4 decision files should contain a CTD source:

The other decisions which were left alone can still be left alone in the next iterations, as they're clear (unless there's some interaction, but let's hope we're not dealing with anything that complex, as this whole process is subject to that kind of issue).

Since proceeding with a binary search now produces roughly the same number of iterations as simply focusing on one of these files at a time, we can be a little more selective now.

Having no prior knowledge of these files whatsoever (or how big they are), I'm now going to start scanning these files to get an idea of what they're doing and to what degree they might be suspect in order to sort out what best to do next.

zijistark commented 10 years ago

VIso6 (iso6 branch snapshot)

Of the interesting 4 determined from VIso5:

Blanked:

Leaving these active:

Starting from 1066 promptly... About 1100 now.

still despondently wondering if this will all lead nowhere... :persevere:

This is not a job for a lone gunslinger in a foreign, foreign land.

zijistark commented 10 years ago

Well, it lead somewhere... I guess. :unamused:

101 years into the game, VIso6 crashed. Consistently, it did so with an execute_decision_command as the last entry in random.log.

This implicates at least one source of CTDs in the following two decision files:

Brief digression...

// Fear and Loathing Lost in VIET: Diary Entry: Day 666 //

The increasing MTTHs until crash are leaving me with a feeling of frustration-- a fear that there are perhaps several relatively rare but compounding CTD sources and that I'm simply narrowing-in on only one with all this effort and all that to possibly come, depending upon how far we're willing to try to fix a broken code path rather than just disable it. And even were that lone decision somehow wrangled from the tangle, the actual crash might be due to some butterfly effect still far, far removed from the actual decision's effect.

This is a Godless, desolate land.

// End of Diary Entry //

The Dulcinians currently look a bit suspect to me (VIET_heresy_decisions). It reminds me of the terrible instability problems of a third-party mod once mentioned in the PB forum which were due to the fact that the mod allowed you to create a second, simultaneous Papacy / landless religious title for a religion with investiture=yes.

Basically, the game would start pathologically doing something weird with memory consumption and then randomly crash at some point. Apparently for the functionality to even pretend to work in this 3rd-party-mod, it was a requirement to have a 64-bit machine w/ at minimum 4-8GB RAM (even though CKII itself is fundamentally locked into a 32-bit world, essentially running on a hardware emulator, ergo shouldn't be able to benefit so clearly from a 64-bit CPU and excessive RAM under any non-pathological circumstances). Why this happened whenever you attempted to create a second, simultaneous Investiture entity nobody knew, but it did.

Note that in SoA, d_fraticelli is not activated until Fraticelli has completed the game's "heresy takeover mechanic" over Catholicism, and there are never two simultaneous Papacies created. With the Dulcinians, the AI can create a second Papacy by an is_high_prio=yes decision as soon as some disjointed event (best I can figure) randomly creates some Dulcinian characters.

That's probably an ultra-long shot there, but that's all I've currently got that sets the hairs on the back of my neck a-tingling in those two decision files' immediate contents. I have neither confirmed that Dulcinians have investiture nor do I have any idea how AI Dulcinians, designed to be able to execute the decision in question, even come into existence.

I did not try to trace through the many event chains they-- the 4 files from VIso5, all told-- altogether fire, or the many MTTH-style events that seem to work/exist in concert with them somewhere).

I'm not sure what my next move is, and it's past late, so another iteration before I sleep is probably not going to happen.

:neutral_face:

thefinestsieve commented 10 years ago

Dulcinians arise through the standard heresy mechanics or through the ruler designer. I'll take a look at the decisions myself and see if I can spot something, but I agree that the Dulcinian angle has some potential. It's also true that cybr introduced the Dulcinians around the time the CTDs started becoming a thing, so...

zijistark commented 10 years ago

Current running theory: A very well-planned and long-running Asian conspiracy to enslave WASP American 'game content modification authors.'

There's probably a GitHub smiley for conspiracy too... Heh, if there is, I should've told cybr about it in January.

zijistark commented 10 years ago

... FWIW, this, which ended in VIso9 and some special methods for drilling-down into files, concluded in failure and a ton of wasted time. However, information derived here is probably relevant to a CTD source w/i VIET.

thefinestsieve commented 10 years ago

DarkReborn has been testing some elements of VIET and has this to say:

Have you tried commenting out the "battleambition" events from on_actions, or deleting the event file "battle_ambition_events"? IIRC, they were from Advanced Objectives, which was integrated as part of VIET immersion. I enabled those events, and their relevant ambitions (obj_lead_troops, obj_lead_troops_infidel and obj_lead_troops_muslim), and the game crashed in no less than 1 year, and disabling them stopped the crashes. Considering these events trigger frequently during battles (they're on_combat_pulse random events) if the characters have the relevant ambitions (which is quite often), and wars are more frequent in LI than in both HIP and Vanilla, I'd say it's a good lead worth on looking at (unless you have already, chances of which are high).

This is unlikely to be the source of the crashes given previous testing, but I'm tucking this in here for @cybrxkhan or Ordep to reference later, just in case it means something.

zijistark commented 10 years ago

Could've been one of them [the crash sources]. We did have a reduction of MTTH of crashes once wars were disabled in isolation testing. Of course, that turns off a lot of potential crash triggers, but it's possible this is one.

cybrxkhan commented 10 years ago

Just wanted to say I read through all this.