[Bug] Access Violation 0x80 Ciri Special Attack

+
Confirmed a Vanilla bug which causes an access violation at location 0x80 (null pointer exception) while using Ciri's special attack multiple times in a row during the quest 'On Thin Ice' againt hounds and the Wild Hunt. To replicate, simply use special attack continuously. Uses need not be consecutive, and the area does not matter.

Best lead I have is in scriptslog.txt in the function OnCombatActionStart... or while changing combat/exploration state, or invulnerability changes, or an input event listener registration, or some bug in the skill which causes the Ciri entity itself to malfunction.

it seems to be related to when the key is pressed (confirmed by blocking release action and cancelling)... found this by accident, thought it was a bug in my mod/script, but apparently not. Occurs randomly within 5-23 uses (according to my tests; there was one test which passed 50+ uses and didn't crash).

Tracked it down to r4Game.ws, FirePostponedPreAttackEvents() and gameplayEntity.ws, OnPreAttackEvent() using ScriptStudio... which leads me to believe it's in ciriPhantom.ws, OnPreAttackEvent() somewhere. Oddly, the first time I've seen it happen, it triggered on release when hitting (dismembering) a Wild Hunt unit just now, not instantly while pressing the key. On PreAttackEvent() only fires on each sword strike during special attack (on release). Really awkward.

Code:
[HUD_TICK] INPUT CONTEXT CHANGED Combat_Replacer_Ciri previousInputContext Exploration_Replacer_Ciri
[HUD_TICK]
[ExplorationState] Changed SuperState from : Exploration to CombatSteel
[ExplorationState] Idle: StateExit. Took 0.153300 seconds.
[ExplorationState] -----------------------------------------------------------------------------
[ExplorationState] CombatExploration: StateEnter
[ExplorationSave] Unlock, state  CombatExploration
[ExplorationState] CombatExploration: CONFIRMATION NOT NEEDED, so it is set on the property
[Script] slideTarget = NULL
[Targeting] NO SLIDE TARGET
[ComboInput] combatIdleStance = Right
[Stamina] CombatActionEnd
[SpecialAttackHeavy] 0.000000
[HUD_TICK] INPUT CONTEXT CHANGED Exploration_Replacer_Ciri previousInputContext Combat_Replacer_Ciri
[HUD_TICK]
[ExplorationState] Changed SuperState from : CombatSteel to Exploration
[ExplorationState] CombatExploration: StateExit. Took 0.289681 seconds.
[ExplorationState] -----------------------------------------------------------------------------
[ExplorationState] Idle: StateEnter
[ExplorationSave] Unlock, state  Idle
[ExplorationState] Idle: CONFIRMATION NOT NEEDED, so it is set on the property
[Script] Enter CombatSword w/out attacking
[Script] slideTarget = NULL
[Targeting] NO SLIDE TARGET
[combatActionAllowed] FALSE OnCombatActionStart
[combatActionAllowed] FALSE OnCombatActionStart
[HUD_TICK] INPUT CONTEXT CHANGED Combat_Replacer_Ciri previousInputContext Exploration_Replacer_Ciri
[HUD_TICK]
[ExplorationState] Changed SuperState from : Exploration to CombatSteel
[ExplorationState] Idle: StateExit. Took 0.802521 seconds.
[ExplorationState] -----------------------------------------------------------------------------
[ExplorationState] CombatExploration: StateEnter
[ExplorationSave] Unlock, state  CombatExploration
[ExplorationState] CombatExploration: CONFIRMATION NOT NEEDED, so it is set on the property
[Stats] Actor <<Unnamed CDynamicLayer::quests\part_3\quest_files\q501_eredin\characters\q501_wild_hunt_slave_ciri.w2ent>> changes immortality mode from <<AIM_None>> to <<AIM_Invulnerable>>

Last line: [Stats] Actor <<Unnamed CDynamicLayer::quests\part_3\quest_files\q501_eredin\characters\q501_wild_hunt_slave_ciri.w2ent>> changes immortality mode from <<AIM_None>> to <<AIM_Invulnerable>>

So, I was just mashing the key, with no enemies in range, then this happened. Crash right after setting invulnerability state when I pressed the key. Presumably due to an enemy walking into range?

However, what follows next (after entering combat) is usually the W3Effect_AutoStaminaRegen, never kicked in. After that, FirePostponedPreAttackEvents() processes the postponedPreAttackEvents array, then a hit/critical usually follows in the log, and those are also missing. This is all before it even gets to select a slideTarget or processes OnCombatActionStart().

Code:
[Stamina] CombatActionEnd
[SpecialAttackHeavy] 0.000000
[combatActionAllowed] FALSE OnCombatActionStart
[combatActionAllowed] FALSE OnCombatActionStart
[Stamina] CombatActionEnd
[SpecialAttackHeavy] 0.000000
[combatActionAllowed] FALSE OnCombatActionStart
[combatActionAllowed] FALSE OnCombatActionStart
[ComboInput] combatIdleStance = Right
[Stamina] CombatActionEnd
[SpecialAttackHeavy] 0.000000
[combatActionAllowed] FALSE OnCombatActionStart
[combatActionAllowed] FALSE OnCombatActionStart
[Oneliner] HIDE -1855380541
[Oneliner] SHOW -1864103133: [Calmly, now
[ComboInput] combatIdleStance = Right
[Stamina] CombatActionEnd
[SpecialAttackHeavy] 0.000000
[combatActionAllowed] FALSE OnCombatActionStart
[combatActionAllowed] FALSE OnCombatActionStart

And there's what it looks like when spamming the key while already in Combat, the previous log was in Exploration mode when spamming the key and the crash happened. Crashed after setting vulnerability again (subsequent time), OnCombatActionStart triggered just before it. Well, that's it for now, I got nothing.

OK, I actually narrowed it down to the sphere. ciri_combat.ws, SpecialAttackTimer()... Not sure if it's actually the sphere though, but this is what happens:

1. Sphere is spawned via SpawnSpecialAttackSphere() after SpecialAttackTimer() 'ticks' to determine button hold.
2. Sphere is then enlarged on each tick of SpecialAttackTimer(), until max radius, when the timer is stopped.

However, during a crash, step 2. fails after only a few iterations, before reaching max radius. It could be something else completely because sphere is on a timer.

last line I can determine in the log on each crash is specialAttackSphere.SetScale(Vector(specialAttackRadius,SpecialAttackRadius,specialAttackRadius)); nothing after that.

Actually, that makes a lot of sense: Once, instead of crashing to desktop, the display froze with a blue pixel shader issue of some sort, possibly the sphere.

It's not the SetScale() function itself, commented that out, still crashes. One thing I did notice though, it that it seems to crash after 4 iterations, each time. 0x20 times 4 is 0x80. Have this odd feeling it's actually the event handler for the timer. Definitely 4 iterations, every single time...

OK, so I bypassed the entire timer, thus event listeners can't enter a race condition, and the entity is never spawned. Set the radius to max, and the skill still works without a sphere, but no crashes. Will now try disabling just the entity/mesh spawning, but I'm still convinced it's some sort of listener/handler issue with that timer. Ah ok, it's prob the timer removing the sphere entity, or something else removing it while the timer handler is active leading to an intermittent race condition. It's neither on its own, there's nothing else those handlers touch that could lead to a null pointer.
 
Last edited:
Top Bottom