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: New
Issue Type: Bug Report
Project: Unofficial Fallout 4 Patch
Component: Unofficial Fallout 4 Patch
Category: Papyrus
Assigned To: Sclerocephalus
Platform: All
Severity: Very Low
Votes: 0
Watching: N/A
Opened By gh0stwizard on Oct 2, 2020 9:45 pm
Last Edited By Sclerocephalus on Mar 30, 2021 7:07 pm

Issue #29321: hc_managerscript - Cannot call show() on a None object (EffectMessageToShow check needed)

 
This is continue of "Issue #20606: hc_managerscript - Cannot call show() on a None object".

Summary:
The value of EffectMessageToShow could be None because it can be unset dynamically, but the comparison against the PreviousEffectMessageToShow does not taking into account this fact.

Currently the stack trace is looks like this:
[10/02/2020 - 04:44:06AM] error: Cannot call Show() on a None object, aborting function call
stack:
[HC_Manager (0000080E)].hardcore:hc_managerscript.ApplyEffect() - "C:\Users\JD\AppData\Local\Temp\PapyrusTemp\Hardcore\HC_ManagerScript.psc" Line 929
[HC_Manager (0000080E)].hardcore:hc_managerscript.HandleSleepDeprivationTimer() - "C:\Users\JD\AppData\Local\Temp\PapyrusTemp\Hardcore\HC_ManagerScript.psc" Line 2963
[HC_Manager (0000080E)].hardcore:hc_managerscript.OnTimerGameTime() - "C:\Users\JD\AppData\Local\Temp\PapyrusTemp\Hardcore\HC_ManagerScript.psc" Line 466
[10/02/2020 - 04:44:06AM] warning: Assigning None to a non-object variable named "::temp231"
stack:
[HC_Manager (0000080E)].hardcore:hc_managerscript.ApplyEffect() - "C:\Users\JD\AppData\Local\Temp\PapyrusTemp\Hardcore\HC_ManagerScript.psc" Line 929
[HC_Manager (0000080E)].hardcore:hc_managerscript.HandleSleepDeprivationTimer() - "C:\Users\JD\AppData\Local\Temp\PapyrusTemp\Hardcore\HC_ManagerScript.psc" Line 2963
[HC_Manager (0000080E)].hardcore:hc_managerscript.OnTimerGameTime() - "C:\Users\JD\AppData\Local\Temp\PapyrusTemp\Hardcore\HC_ManagerScript.psc" Line 466


Possible fix:
; There has been no change... nothing to see here.
;UFO4P 1.0.3 Bug #20606 - Guys, there was something to see here after all :P
if IncrementEffectBy > 0 && newVal == oldVal
  EffectMessageToShow = none
elseif bDisplayMessage && EffectMessageToShow != PreviousEffectMessageToShow
  if EffectMessageToShow != none
    EffectMessageToShow.show()
  elseif PreviousEffectMessageToShow != none
    PreviousEffectMessageToShow.show()
    PreviousEffectMessageToShow = None ; XXX: is it correct?
  endif
endif