Jump to content

auc42x

Members
  • Posts

    5
  • Joined

  • Last visited

About auc42x

auc42x's Achievements

  1. and I do have to admit that I'm not 100% satisfied with my search for the bug, due to not definitively identifying the triggering condition. The crash itself seems to be deterministic, in that it doesn't happen "randomly" for a given game state. Starting from a given pre-rest savepoint, it will crash 100% of the time, or not crash 100% of the time, based on what game state perturbations I make. But, as you quoted from the other thread, unexpected game state changes affect it. Removing Keldorn (a non-casting NPC) from my party will prevent the crash. As will removing all memorized L4 cleric spells from Aerie, and making no changes to the party. Or, adding Nalia (who has no cleric spells) to the party will cause it to crash when it didn't before. As per the other thread, I was able to prevent the crash in all circumstances (e.g., I wasn't able to cause it in any other manual tests) by removing SPPR426.SPL only. So there's something about the IWD version of Cause Serious Wounds that was manifesting in my game. I did wonder about whether SPPR524.SPL (Cause Critical Wounds, an L5 cleric spell) would also cause it if I advanced a character in level so that they could memorize L5 cleric spells, but I didn't actually test it. I don't know why that spell would have been being invoked, however. I don't keep party AI on, and as you say, it isn't exactly an expected prebuff anyway. My testing was able to trigger the bug by resting in a variety of inns and outdoor areas, including tests that used saves from hours of gameplay ago, by preturbing the state. I can add one more detail, in case it is of interest. I originally encountered the bug on the rest that triggers the "Life... is Strength" Irenicus dream. The crash happened after the dream finished, after the "Loading Area" screen came up, and directly before the resting movie played. I could then generate the crash on non-dream rests as well; it always happens before the movie plays (but, if a dream is triggered, after the dream completes and after it loads the original resting area). So, yeah, like I said, I'm not totally thrilled with my own bugfinding here. I found a bug, and I'm 99% sure that it is the cause of the crash that I was having, but I can't totally explain why it was triggering in those particular circumstances. I have done coding work on other games, and were it one of the ones that I had experience with, I absolutely would have kept digging. But I have zero experience with BG2 coding and mod development, and so as much as I like debugging (seriously!), I admit that this bug doesn't quite give me enough incentive to dive into the technical details here. (I am happy to run further tests if requested, though; I fixed my current game, but cloned a copy of the install just before making more drastic changes, and presumably could still generate the same circumstances by going back to that cloned copy and reverting the four spells). My compliments on a quick update to Near Infinity. And for what it's worth, I see those other ones too, when I go looking for them. My search missed the non-61 ones the first time around; I suppose I'm not searching with quite the correct syntax, but got lucky on finding the 61 set. For what it's worth, I went back and read the SCS readme (https://gibberlings3.github.io/Documentation/readmes/readme-stratagems.html) and found one line that I had missed the first time around: So there was a warning in there, but it's pretty easy to miss. The proper "fix" could just have been to restrict those components from installing on original BG2, the way that several other components have per-game restrictions? Though I see that @CamDawg has already said that the IWDification fixes will be rolled into a next version at some point, which should take care of it that way.
  2. Aww. I don't want to be "that guy"! Doing that really is the cruelest version. By not saying anything, the next person might just think "they never solved it; I'll keep looking". But seeing that it was solved, they keep thinking "something in here is enough to fix the problem!" and spin their wheels for a while. Not that I speak from personal experience, or anything. As a bit of extra detail for the benefit of any future readers, the bug discussion is here: https://www.gibberlings3.net/forums/topic/37026-bug-invalid-bg2-opcode-in-iwd-spells-component/ Summary: the current SCS version IWD spells component only works properly for Enhanced Edition, but it should be fixed in a future release. And the author of Near Infinity has added functionality to search for invalid opcodes, which will make this diagnosis easier in the future!
  3. I recently discovered a crashing bug with the Icewind Dale spells component of SCS, using original BG2+ToB. Upon resting in some circumstances (not all), my game crashed with the message of "An Assertion failed in CCGameEffect.cpp at line number 1536". I am told that this indicates the engine encountering an invalid opcode. Briefly, I found four spells that use opcode 61, which is only valid in BGEE. In that game, it is "Creature RGB color fade" (https://gibberlings3.github.io/iesdp/opcodes/bgee.htm#op61), whereas in original BG2, it is a crash (https://gibberlings3.github.io/iesdp/opcodes/bg2tob.htm#op61). The four spells with that opcode are from the IWD set added by this mod, specifically: GHAST1.spl, SPPR426.SPL (Cause Serious Wounds), SPPR524.SPL (Cause Critical Wounds), and SPPR740.SPL (Wither). I was able to use Near Infinity to update the opcodes from 61 to 50 ("Color: Glow by RGB (Brief)") without changing any other data, and everything seems to be working again. I can't say if the visual effect is what was "intended", but it looks okay to me. More details of my bug hunt are in this thread: https://www.gibberlings3.net/forums/topic/37022-solved-help-on-debugging-a-modded-bg2-crash/ If SCS is updated again, it would be good to get that fixed. If not, then hopefully this message is helpful to somebody else in the future, trying to figure out how to fix it! (More details on what I did to fix it on an individual basis are in the linked thread above)
  4. Thank you, this did let me find the error! And since I like to be one of those people that leaves behind useful information for the next person who goes searching for an answer, I'll write up the details. By searching with Near Infinity, I found four spells that had an invalid opcode of 61: GHAST1.spl, SPPR426.SPL (Cause Serious Wounds), SPPR524.SPL (Cause Critical Wounds), and SPPR740.SPL (Wither). It looks like these come from the Sword Coast Stratagems mod, from the IWD spells component. I didn't find any creatures, items, or effects with any invalid opcodes. Digging into it a bit, I see that 61 isn't a valid opcode for original BG2, as you said (https://gibberlings3.github.io/iesdp/opcodes/bg2tob.htm#op61), but it is valid in BG2EE (https://gibberlings3.github.io/iesdp/opcodes/bgee.htm#op61)! Specifically, it is a creature RGB color fade effect, and I can see how that would be used in the spells listed above. To verify, I tried casting one of the spells, and indeed it crashed as soon as the spell casting animation completed. I have to admit that I don't know why one of those spells would be triggering on a rest, as per my experimentation from the last post, but I know that odd things can happen behind the scenes. As a "blunt hammer" experimental fix, I tried removing those four spells from the override directory, and sure enough the crashes stopped. (Removing SPPR426.SPL was actually enough to stop the crashing). Removing those four spells outright would probably work well enough to keep going with the game, but it is a little inelegant. The BG2EE opcodes documentation notes that it is similar to opcodes 8, 9, and 50. The BG2 "native" version of the "Cause Serious Wounds" spell uses opcode 50 ("Color: Glow by RGB (Brief)"). Therefore, using Near Infinity, I edited the four spells above to change all instances of opcode 61 to opcode 50 (there were 56 changes needed in the end, because of lots of nested effects in three of the four spells). Eyeballing the values that resulted, I think it looks reasonable, and it probably isn't a problem if a temporary color change goes a bit wacky, anyway. And now, no more crashes. At least so far, trying all the tests that were causing crashes the last two days. So for the benefit of anyone who has this problem in the future in unmodified BG2, the problem can be narrowed down by using Near Infinity, and doing an advanced search for opcodes 61, 260, 312, and 318+ on the CRE, EFF, ITM, and SPL resource types. (Or, if using TobEx, 318 is indeed valid, and you can search for 319+ instead). That will let you find the offending files, and hopefully narrow it down to the mod with the problem. The actual fix will be dependent on the exact problem. In this case, I could change opcode 61 to opcode 50 by editing the files, and it's relatively innocuous because 61 was used for a genuine EE effect. Removing the files from your override directory is the "blunt hammer" approach and might work, though removing files that exist only in override usually makes me nervous. (It is a bit safer to remove files that have a "base" version, but not necessarily totally safe). Uninstalling the mod component should also work, needless to say. If my editing trick didn't work, I probably would have started over without that component. I'm a little surprised that this bug is present in SCS and that I couldn't find anything on it through searching; surely I'm not the only one to try install IWD spells in an original BG2 version? I'll toddle off to the appropriate forum to make a bug report in a minute.
  5. I would like to request help on debugging strategies to figure out a crashing problem that I'm having with modded BG2. I'm not an expert modder, since I tend to replay the game every few years and have to relearn it every time, but I'm generally a technical person. Unfortunately, I've reached the end of my Google-Fu on this one. I've found other references to the same problem (including a 2008 G3 thread), but the links that they cite have long since gone dead, even with the Wayback machine. It also doesn't help that Spellhold Studios is going through one of its dead periods, so I can't access anything there. I'm using the original BG2 + ToB, patched, with a relative handful of mods. Specifically: TobEx (v26), BG2Fixpack (v13), Unfinished Business (v28), Widescreen (v3.08), BG2 GUI (v5.6), Rogue Rebalancing (v4.92), Sword Coast Stratagems (v34.3) and Tweaks Anthology (v16). I can post the full WeiDU log if needed, of course, although I'm primarily looking for debugging strategies to diagnose the problem. Specifically, that problem is: I am getting a crash with the message of "An Assertion failed in CCGameEffect.cpp at line number 1536" upon resting. I discovered the problem only several hours into my new game (which I had thought was stable), but I discovered that I can cause the crash in earlier saves, and can prevent the crash in my current save, by perturbing the game state in various ways (see below). The trouble is, I can't figure out the root cause of the bug, which is almost certainly a mod component. I'm not adverse to starting over if I have to, but I don't want to take a guess as to what is wrong, be incorrect, and only find out after several more hours of play. This thread from 2008 describes my problem almost exactly (although the original poster found it on their first rest, as opposed to several rests in), and it appeared to manifest in Tweaks Anthology: https://www.gibberlings3.net/forums/topic/12895-assertion-failed-in-ccgameeffectcpp-at-line-number-1536/ One of the responses said "Any time you see a CGameEffect assertion at L:1536, it's a bugged item or spell", which I accept as a working hypothesis. Following up on that, I have discovered that I can prevent the crash by removing characters from my party, or by unselecting spells to be memorized. I can induce a crash by adding other party members. What I cannot do is discover one single cause. For example, I first encountered the crash when I had a party of CHARNAME, Yoshimo, Aerie, and Keldorn. I can prevent the crash by: Removing Keldorn from the party, but keeping all others. Removing Aerie from the party, but keeping all others. De-selecting all L4 priest spells that Aerie is set to memorize that night, but keeping all characters in the party. And various other perturbations. On the other hand, I can create a crash by going back to previous saves and adding various other spellcasters (priest or mage) to the party and resting, with or without Yoshimo/Keldorn/Aerie. My feeling is that the problem is with a spell (or spells), which I understand includes pretty much all abilities, but I can't narrow it down further than that. Various spells/abilities and items are added by the above mods, and I suspect that a few of them modify each other in turn. None of them are especially important to me individually, and I could probably solve the problem by dropping that mod component... if I can only figure out where the problem lies. Therefore, I am looking for help on how to debug this properly. I've run the G3 debugging suite, but it spits out ~2700 spell errors and ~800 item errors (not uncommon in debugging tools of any sort), none of which look especially "unusual" compared to the others. The 2008 thread had a reference to various utilities like an "old index checker" and a link to a "Nyuthrun's Fix" (which apparently worked, but it was located at a home.comcast.net account that is no longer there). I've tried running Near Infinity checks for mis-indexed effects (from the 2008 thread: "This is almost certainly another effects index error"), but no dice. I don't see any useful log results (TobEx just reports the failed assertion, etc.). Is there any advice on what/how to check next? Thanks. [Editing this post to add a "solved" tag to the topic line; no other changes].
×
×
  • Create New...