Welcome to the AFK Mods bug tracker. In order to report an issue, you need to have a VALIDATED account to post one. Once you have followed the link the registration email sent you, please select a project from the drop down menu below. Select “Open New Issue” and fill out the form with as many details as possible.

Please also consider sending your bug report to Bethesda if you are reporting on an issue with Skyrim Special Edition, Fallout 4, or Starfield. Doing so will help everyone on all platforms.

Issue Data
Status: Closed
Issue Type: Bug Report
Project: Unofficial Skyrim Special Edition Patch
Component: Skyrim SE: Dragonborn
Category: Papyrus
Assigned To: Nobody
Platform: All
Severity: Very Low
Votes: 0
Watching: N/A
Opened By DarthVitrial on Jun 23, 2022 3:23 pm
Closed By Arthmoor on Feb 25, 2023 5:32 pm
Resolution: Not Feasible

Issue #32464: Potential missing safety check in Karstaag quest script

 
Error: Cannot call IsDead() on a None object, aborting function call
stack:
[alias Karstaag on quest DLC2dunKarstaagQST (040247F8)].dlc2dunkarstaagbattlescript.RecordIceWraith() - "DLC2dunKarstaagBattleScript.psc" Line 180
[ (random id)].DLC2dunKarstaagIceWraithScript.OnLoad() - "DLC2dunKarstaagIceWraithScript.psc" Line 7

Basically the script for Karstaag's ice wraiths (04028246) doesn't account for what happens if they spawn without KarstaagAlias being filled.

Now, I can't be sure if it's possible for this to happen during normal gameplay (maybe if a player saves and reloads at JUST the wrong point during the battle after killing Karstaag?) but it seems like it could be easily fixed just by adding a check to the script to confirm whether the alias is not None.

as it stands the entire code is just
Event OnLoad()
    (KarstaagAlias as DLC2dunKarstaagBattleScript).RecordIceWraith(Self)
EndEvent


So adding just an "if KarstaagAlias != none" before the RecordIceWraith call might be a good sanity check just in case.

Comments

2 comment(s) [Closed]
DarthVitrial said:
 
Sorry, I think I might have misunderstood the error message.
It might be that the Karstaag alias IS filling properly but then the "self" for the relevant ice wraith isn't being properly passed to the DLC2dunKarstaagBattleScript.

The code in that case is
 Function RecordIceWraith(ObjectReference wraith)
    if (!selfActor.IsDead())
        if (IceWraith01 == None || IceWraith01.IsDead())
            IceWraith01 = wraith as Actor
        ElseIf (IceWraith02 == None || IceWraith02.IsDead())
            IceWraith02 = wraith as Actor
        ElseIf (IceWraith03 == None || IceWraith03.IsDead())
            IceWraith03 = wraith as Actor
        EndIf
    EndIf

So it's missing a safety check for if the selfActor isn't filled.
Might not be worth fixing considering how unlikely that is.
Sorry for the pointless ticket.

Comment #1 Jun 23, 2022 3:30 pm  Edited by DarthVitrial on Jun 23, 2022 3:33 pm
Arthmoor said:
 
Don't worry about it. This battle sequence of theirs is a convoluted mess that's impossible to follow without spending hours on it.

The only way SelfActor could be null is if the quest isn't running and you'd only encounter it trying to come back to the location somewhere down the line.

Showing Comments 1 - 2 of 2