Seemingly random crash
I got a game crash shortly after fighting a bunch of air bugbears. I'll attach the log and dump file.
I don't have much of a clue as to what caused it. I was just walking the party back to the stairs at the time. I guess maybe it's the bad particle ID mentioned in the log? TemplePlus.log 4686c1e2-da92-4435-844b-a1e45665a55a.zip
I think I was running the most recent build from the countersong PR.
It says you were running pre-3039, which is Sagenlicht's PR build... you should probably stick to master, not sure that was up to date (but I don't know if that's the root cause).
Unfortunately for some reason I can't load the debug symbols so it's hard to tell where and why it crashed, but it seems to be in SpellSoundPlay for the Bear's Endurance spell removal. Do you have a savegame that demonstrates it?
I don't. A second time doing stuff on that floor didn't cause it to happen, either. If I get something similar to happen again, I'll try to get a relevant save.
The worst kind of bug - the one you know users will quickly find on release :P
I did get another crash that might be related. It was shortly after loading, so I tried reproducing it but couldn't. The crash happened when casting web on a dozen guys in the temple back door fight (which of course plays a lot of overlapping sounds, although the crash seemed to occur before any sound). I could upload a save, but I imagine it wouldn't be very useful.
The behavior seems like some kind of race condition, I guess probably in the sound system given what you mentioned before.
Well it may or may not be related... Do you have a dump+log?
It's crashing while trying to print the spell target list actually (during GetInt32() for someone's obj_f_description field). So it looks like a corrupt object issue. Interesting...
Also I found an issue with the spell Silence - used target.obj instead of target_item.obj. Probably unrelated though.
Also probably unrelated, but you have an error in action 1702:
[2021-09-12 16:34:31.783] [core] [error] An error occurred while calling event GetActionCostType for script action01702_full_meteor.py. [2021-09-12 16:34:31.783] [core] [info] Python: Traceback (most recent call last): [2021-09-12 16:34:31.783] [core] [info] Python: File "rules/d20_actions/action01702_full_meteor.py", line 15, in GetActionCostType [2021-09-12 16:34:31.784] [core] [info] Python: NameError [2021-09-12 16:34:31.784] [core] [info] Python: : [2021-09-12 16:34:31.784] [core] [info] Python: global name 'D20ACT_Free_Action' is not defined
That's your Melf's Minute Meteors mod I think?
Yeah. I haven't gotten around to finishing that up. It wouldn't be causing random errors, would it?
No, it doesn't seem likely. The curious thing here is that it must have gone through all the objects in the target list when the engine built it, so presumably they were ok up to that point. Might help pin down the source of error...
I cannot load this crash dump hmm.... Probably something related to wine.
Can you do a winedbg <crashdumpfile>.dmp and then just type bt on your end, @dolio ?
ah, before you do that, can you place the .pdb file from this zip next to TemplePlus.exe ? https://ci.appveyor.com/api/buildjobs/5b5qkeam8834jhcm/artifacts/TemplePlusSymbols-0.1.0-pre%2B3069.zip
winedbg doesn't seem to like it, either. Just complains about an invalid address 0x00c350a00000002b. Backtrace is empty.
Alright, finally figured this one out (the first one; the 2nd one was handled in #692)
Every spell condition in the game has the standard self-cleanup hook d20_mods_spells__teleport_prepare. This removes spell conditions when the caster is not in the party. One exception to this rule is... 🥁 🥁 🥁 🥁 🥁 🥁 Bear's Endurance! Which is the spell that was being removed when the crash happened.
As the logfile shows, what happens here is as follows:
- After entering Temple Level 2, Belsornig casts Bear's endurance
- Map change to Temple Level 1
- Coming back to Temple Level2 -> the spell condition was still active, except with an invalid caster handle.
- sp-Endurance countdown finishes, triggering the crash
Should be easy to fix I guess, though it's getting really annoying chasing all these invalid handle errors. I'm starting to think the real solution is to just persist object handles across maps...