# When I Destroy the actor it gives me a pending kill error on the HUD widget...

**URL:** <https://forums.unrealengine.com/t/when-i-destroy-the-actor-it-gives-me-a-pending-kill-error-on-the-hud-widget/674643>\
**Category:** Getting Started & Setup\
**Tags:** error, destroying-actors, unreal-engine, question\
**Created:** [October 22, 2022, 3:57am UTC](https://forums.unrealengine.com/t/when-i-destroy-the-actor-it-gives-me-a-pending-kill-error-on-the-hud-widget/674643 "2022-10-22T03:57:16Z")\
**Posts on this page:** 17\
**Page:** 2

<div class="post-metadata">

**Author:** ![L1z4rD89](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/l1z4rd89/32/1194537_2.png) [@L1z4rD89](https://forums.unrealengine.com/u/L1z4rD89)\
**Post date:** [October 24, 2022, 3:54pm UTC](https://forums.unrealengine.com/t/when-i-destroy-the-actor-it-gives-me-a-pending-kill-error-on-the-hud-widget/674643/21 "2022-10-24T15:54:54Z")

</div>

Ok, can you show where you create the HUD? Maybe you created more than 1 HUd by accident.

And can you check if the ControllerRef gets set? Place a PrintString after CreateRef

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/d/d/9ddf9696c71e801d49de1173d7d4d8ecf7f80e42.png)

---

<div class="post-metadata">

**Author:** ![RodericDarkwell](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RodericDarkwell](https://forums.unrealengine.com/u/RodericDarkwell)\
**Post date:** [October 24, 2022, 11:52pm UTC](https://forums.unrealengine.com/t/when-i-destroy-the-actor-it-gives-me-a-pending-kill-error-on-the-hud-widget/674643/22 "2022-10-24T23:52:00Z")

</div>

This is what appeared to me when I did the print string doing the process of sprinting to the damage dealer, respawning and the same thing again…

ogBlueprintUserMessages: [CharacterBP\_C\_0] Hello  
LogBlueprintUserMessages: [CharacterBP\_C\_0] Hello  
LogAudioMixer: Display: Audio Buffer Underrun (starvation) detected.  
LogAudioMixer: Display: Audio Buffer Underrun (starvation) detected.  
LogUIActionRouter: Cleaned out [0] inactive UI action bindings  
LogAudioMixer: Display: Audio Buffer Underrun (starvation) detected.  
LogAudioMixer: Display: Audio Buffer Underrun (starvation) detected.  
LogBlueprintUserMessages: [CharacterBP\_C\_1] Hello  
LogBlueprintUserMessages: [CharacterBP\_C\_1] Hello  
LogAudioMixer: Display: Audio Buffer Underrun (starvation) detected.  
LogSlate: Updating window title bar state: overlay mode, drag disabled, window buttons hidden, title bar hidden  
LogWorld: BeginTearingDown for /Game/Levels/Main\_Game/Maps/UEDPIE\_0\_StoryMap  
LogWorld: UWorld::CleanupWorld for StoryMap, bSessionEnded=true, bCleanupResources=true  
LogSlate: InvalidateAllWidgets triggered. All widgets were invalidated  
LogPlayLevel: Display: Shutting down PIE online subsystems  
LogSlate: InvalidateAllWidgets triggered. All widgets were invalidated  
LogAudio: Display: Audio Device unregistered from world ‘None’.  
LogAudioMixer: FMixerPlatformXAudio2::StopAudioStream() called  
LogAudioMixer: FMixerPlatformXAudio2::StopAudioStream() called  
LogSlate: Updating window title bar state: overlay mode, drag disabled, window buttons hidden, title bar hidden  
LogUObjectHash: Compacting FUObjectHashTables data took 6.00ms  
LogPlayLevel: Display: Destroying online subsystem :Context\_10  
LogAudioMixer: Display: Audio Buffer Underrun (starvation) detected.  
LogAudioMixer: Display: Audio Buffer Underrun (starvation) detected.

and this is were my hud is

 ![Screenshot 2022-10-25 005144](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/f/a/7fa67ff3034e495a8407bef2e99e5eb2c027929d.png)

---

<div class="post-metadata">

**Author:** ![L1z4rD89](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/l1z4rd89/32/1194537_2.png) [@L1z4rD89](https://forums.unrealengine.com/u/L1z4rD89)\
**Post date:** [October 25, 2022, 1:00am UTC](https://forums.unrealengine.com/t/when-i-destroy-the-actor-it-gives-me-a-pending-kill-error-on-the-hud-widget/674643/23 "2022-10-25T01:00:46Z")

</div>

Ok, place two PrintStrings with Set and NotSet as I showed above because, well, I don’t know where “Hello” comes from. And show me **where** you create the HUD, is it inside the PlayerController?

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/9/6/7961dd8ea6d450a12012eeee6e77d8d7f4f0512f.png)  
And when you play you can select a DebugFilter inside your character at the top. When you do this and place your mouse above one of the floats, can you see that they change?  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/f/3/4f38e9da8f7fd9748e6163b28a61d9c0b7dcfaca.png)

---

<div class="post-metadata">

**Author:** ![RodericDarkwell](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RodericDarkwell](https://forums.unrealengine.com/u/RodericDarkwell)\
**Post date:** [October 25, 2022, 2:09am UTC](https://forums.unrealengine.com/t/when-i-destroy-the-actor-it-gives-me-a-pending-kill-error-on-the-hud-widget/674643/24 "2022-10-25T02:09:29Z")

</div>

The HUD is being created on the player controller which I called MyPC

And yes I did what you told me with the debugfilter and they change but… after the actor respawns I go and see that again and they are not changing anymore…

This is before respawning

 ![Screenshot 2022-10-25 030839](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/d/a/cdaa49e7c71b9b88eed8cfaca0ff3a3a9d2637cd.png)

and this after respawning

 ![Screenshot 2022-10-25 030846](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/8/8/388e9eac84be46aea7098677eb73045388957ebb.png)

---

<div class="post-metadata">

**Author:** ![L1z4rD89](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/l1z4rd89/32/1194537_2.png) [@L1z4rD89](https://forums.unrealengine.com/u/L1z4rD89)\
**Post date:** [October 25, 2022, 2:25am UTC](https://forums.unrealengine.com/t/when-i-destroy-the-actor-it-gives-me-a-pending-kill-error-on-the-hud-widget/674643/25 "2022-10-25T02:25:38Z")

</div>

After respawning you have to select the DebugFilter again because the name of your spawned character changes (e.g. from 2 to 3):

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/9/2/b92dd972e4c02de2d527ad2c213cfbbe8783f472.png)

---

<div class="post-metadata">

**Author:** ![RodericDarkwell](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RodericDarkwell](https://forums.unrealengine.com/u/RodericDarkwell)\
**Post date:** [October 25, 2022, 3:11am UTC](https://forums.unrealengine.com/t/when-i-destroy-the-actor-it-gives-me-a-pending-kill-error-on-the-hud-widget/674643/26 "2022-10-25T03:11:04Z")

</div>

Ok I did that and yes the values change as they should but I can´t seem to understand why its working but still doesn´t show on the widget after respawn…

---

<div class="post-metadata">

**Author:** ![L1z4rD89](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/l1z4rd89/32/1194537_2.png) [@L1z4rD89](https://forums.unrealengine.com/u/L1z4rD89)\
**Post date:** [October 25, 2022, 3:37am UTC](https://forums.unrealengine.com/t/when-i-destroy-the-actor-it-gives-me-a-pending-kill-error-on-the-hud-widget/674643/27 "2022-10-25T03:37:01Z")

</div>

Then check if the controller ref gets set. Use different PrintStrings for Cast and Failed. Check if the ControllerRef gets set. If it gets set check if the funtions in the hud work with PrintStrings.  
And: Remove the Bindings from your ProgressBars in the Hud. There are still functions with GetHealth

---

<div class="post-metadata">

**Author:** ![RodericDarkwell](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RodericDarkwell](https://forums.unrealengine.com/u/RodericDarkwell)\
**Post date:** [October 25, 2022, 10:40pm UTC](https://forums.unrealengine.com/t/when-i-destroy-the-actor-it-gives-me-a-pending-kill-error-on-the-hud-widget/674643/28 "2022-10-25T22:40:54Z")

</div>

I did that and it seems it works as it should… the progressbars didnt had any bindings… the only bindings they had I deleted them to be able to replicate what u did in your example

---

<div class="post-metadata">

**Author:** ![RodericDarkwell](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RodericDarkwell](https://forums.unrealengine.com/u/RodericDarkwell)\
**Post date:** [October 25, 2022, 10:43pm UTC](https://forums.unrealengine.com/t/when-i-destroy-the-actor-it-gives-me-a-pending-kill-error-on-the-hud-widget/674643/29 "2022-10-25T22:43:35Z")

</div>

The file is too big so I can´t put it here unfortunatly…

---

<div class="post-metadata">

**Author:** ![L1z4rD89](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/l1z4rd89/32/1194537_2.png) [@L1z4rD89](https://forums.unrealengine.com/u/L1z4rD89)\
**Post date:** [October 25, 2022, 11:02pm UTC](https://forums.unrealengine.com/t/when-i-destroy-the-actor-it-gives-me-a-pending-kill-error-on-the-hud-widget/674643/30 "2022-10-25T23:02:46Z")

</div>

So

- The Reference gets set
- The values change
- The functions work

but the HUD does not get updated? Do you create the HUD by accident more than once? Is the CreateWidget still in the level blueprint?

When you play and respawn you can check this when you go into the HUD blueprint while playing and select a DebugFilter at the top. Are there multiple HUD to select from?

---

<div class="post-metadata">

**Author:** ![RodericDarkwell](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RodericDarkwell](https://forums.unrealengine.com/u/RodericDarkwell)\
**Post date:** [October 25, 2022, 11:06pm UTC](https://forums.unrealengine.com/t/when-i-destroy-the-actor-it-gives-me-a-pending-kill-error-on-the-hud-widget/674643/31 "2022-10-25T23:06:42Z")

</div>

Yes after I respawn it appers 5 HUDs on the debugfilter… I´m seeing it on the widget blueprint of course… on the level blueprint doesn´t say anything tho…

---

<div class="post-metadata">

**Author:** ![RodericDarkwell](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RodericDarkwell](https://forums.unrealengine.com/u/RodericDarkwell)\
**Post date:** [October 25, 2022, 11:38pm UTC](https://forums.unrealengine.com/t/when-i-destroy-the-actor-it-gives-me-a-pending-kill-error-on-the-hud-widget/674643/32 "2022-10-25T23:38:30Z")

</div>

This seemed to be so simple cause I thought would be a basic system to have in a game but it seems that every step I take I get a new problem…

---

<div class="post-metadata">

**Author:** ![L1z4rD89](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/l1z4rd89/32/1194537_2.png) [@L1z4rD89](https://forums.unrealengine.com/u/L1z4rD89)\
**Post date:** [October 26, 2022, 12:12am UTC](https://forums.unrealengine.com/t/when-i-destroy-the-actor-it-gives-me-a-pending-kill-error-on-the-hud-widget/674643/33 "2022-10-26T00:12:13Z")

</div>

When you right-click your HUD widget in the content browser you can select the ReferenceViewer to see where your HUD is referenced.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/e/2/2e26a13ed8c10fd2795baf39fd9d5251afa3062d.png)

And when you go to Window =\> FindInBlueprints =\> FindInBlueprints1 you can search for HUD to see all references / events.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/c/9/1c9a89f81f04f1bfc297ede8cfc3d100fc477725.png)

So now you have to serch where the HUD gets created more then once.

You can also search for “CreateWidget”

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/2/7/827d412dc1c564b376a9d5aec59a5d443948aafb.png)

---

<div class="post-metadata">

**Author:** ![RodericDarkwell](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RodericDarkwell](https://forums.unrealengine.com/u/RodericDarkwell)\
**Post date:** [October 26, 2022, 12:49am UTC](https://forums.unrealengine.com/t/when-i-destroy-the-actor-it-gives-me-a-pending-kill-error-on-the-hud-widget/674643/34 "2022-10-26T00:49:33Z")

</div>

![Screenshot 2022-10-26 014153](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/9/6/c962ee2ad611f9a422a022ae79907ea9f22068be.png)

this is where my hud is

---

<div class="post-metadata">

**Author:** ![RodericDarkwell](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RodericDarkwell](https://forums.unrealengine.com/u/RodericDarkwell)\
**Post date:** [October 26, 2022, 12:53am UTC](https://forums.unrealengine.com/t/when-i-destroy-the-actor-it-gives-me-a-pending-kill-error-on-the-hud-widget/674643/35 "2022-10-26T00:53:04Z")

</div>

An I saw where the HUD is referenced and is the same as what your picture shows

---

<div class="post-metadata">

**Author:** ![L1z4rD89](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/l1z4rd89/32/1194537_2.png) [@L1z4rD89](https://forums.unrealengine.com/u/L1z4rD89)\
**Post date:** [October 26, 2022, 12:55am UTC](https://forums.unrealengine.com/t/when-i-destroy-the-actor-it-gives-me-a-pending-kill-error-on-the-hud-widget/674643/36 "2022-10-26T00:55:14Z")

</div>

The HUD should only be inside your controller. You have it also 2 times in your character. When you double click the CreateWidget  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/b/0/7b0ef46c90eb1afb4399e2b07d4652b80805433d.png)

you can see where this event is.

---

<div class="post-metadata">

**Author:** ![RodericDarkwell](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RodericDarkwell](https://forums.unrealengine.com/u/RodericDarkwell)\
**Post date:** [October 26, 2022, 1:35am UTC](https://forums.unrealengine.com/t/when-i-destroy-the-actor-it-gives-me-a-pending-kill-error-on-the-hud-widget/674643/37 "2022-10-26T01:35:06Z")

</div>

FINALLY!!! That was it I had the hud two times and deleting the one that I had before resolved the problem, Im not sure why this would give this malfunction but im so glad it worked finally  
Thank you so much I think at least for tbhis system im more calm in mind…

[Previous page](https://forums.unrealengine.com/t/when-i-destroy-the-actor-it-gives-me-a-pending-kill-error-on-the-hud-widget/674643.md?page=1)
