# Weakmap Runtime Errors W/ Player.IsActive\[\] passing.

**URL:** <https://forums.unrealengine.com/t/weakmap-runtime-errors-w-player-isactive-passing/2663610>\
**Category:** Issues and Bug Reporting\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, fixed, fortnite\
**Created:** [October 9, 2025, 4:16am UTC](https://forums.unrealengine.com/t/weakmap-runtime-errors-w-player-isactive-passing/2663610 "2025-10-09T04:16:25Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jpt96](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jpt96](https://forums.unrealengine.com/u/Jpt96)\
**Post date:** [October 9, 2025, 4:16am UTC](https://forums.unrealengine.com/t/weakmap-runtime-errors-w-player-isactive-passing/2663610/1 "2025-10-09T04:16:25Z")

</div>

### Summary

Getting a concerning amount of these errors

```auto
Verse unrecoverable error: ErrRuntime_WeakMapInvalidKey: Invalid key used to access persistent `var` `weak_map`. (Invalid key used to access persistent `var` `weak_map`.) (Callstack unavailable)

```

Every single one of my `weak_maps` is marked `<internal>` inside of modules only allowing read / write via `<public>` functions that ensure `InPlayer.IsActive[]` before doing anything this leads me to believe that `IsActive[]` is passing when it should not. Please see the example below.

```auto
Module_Example <public> := module:

    some_class <public> := class<final><persistable><concrete>:
        some_flag <public> : logic = false
        some_data <public> : int = 0

    var SomeInternalWeakMap <internal> : weak_map(player, some_class) = map{}

    GetSomeClass<public>(Agent:agent)<transacts><decides>:some_class=
        Player := player[Agent]
        Player.IsActive[]
        SomeClass := SomeInternalWeakMap[Player]
        return SomeClass

    UploadSomeClass<public>(Agent:agent, SomeClass:some_class)<transacts><decides>:void=
        Player := player[Agent]
        Player.IsActive[]
        FitsInPlayerMap[SomeClass]
        set SomeInternalWeakMap[Player] = SomeClass

```

### Please select what you are reporting on:

Verse

### What Type of Bug are you experiencing?

Stability

### Steps to Reproduce

Copy Snippet & Publish

### Expected Result

`Player.IsActive[]` passing not leading to runtime errors

### Observed Result

`Player.IsActive[]` either passes when it shouldn’t or something is wrong with `player` `weak_map`’s

### Platform(s)

Windows

### Island Code

6872-6995-0659

### Additional Notes

I am using 3 total player weakmaps, not one them is accessible directly, they all go through the exact same process provided in the snippet.

---

<div class="post-metadata">

**Author:** ![Vath](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/vath/32/752388_2.png) [@Vath](https://forums.unrealengine.com/u/Vath)\
**Post date:** [October 9, 2025, 4:51pm UTC](https://forums.unrealengine.com/t/weakmap-runtime-errors-w-player-isactive-passing/2663610/3 "2025-10-09T16:51:30Z")

</div>

Hey @Jpt96 i have a couple questions that will help us reproduce and get a potential fix in

Does this runtime eror occur in a Edit Session?

Do you have a Runtime Error Code you can share?

Thanks!

---

<div class="post-metadata">

**Author:** ![Jpt96](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jpt96](https://forums.unrealengine.com/u/Jpt96)\
**Post date:** [October 9, 2025, 5:09pm UTC](https://forums.unrealengine.com/t/weakmap-runtime-errors-w-player-isactive-passing/2663610/4 "2025-10-09T17:09:22Z")

</div>

I have not been able to reproduce it in edit sessions, but it has happened in a playtest code once.

I do have a report id from the runtime errors in the portal

**Report ID** ``[844f7fe161671b9d8d675256cab2b425]``

`Modules ` **`f02876b0-432b-1958-aa59-068c5e484924 v927`**

---

<div class="post-metadata">

**Author:** ![sonictke](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sonictke/32/924209_2.png) [@sonictke](https://forums.unrealengine.com/u/sonictke)\
**Post date:** [December 3, 2025, 7:20pm UTC](https://forums.unrealengine.com/t/weakmap-runtime-errors-w-player-isactive-passing/2663610/9 "2025-12-03T19:20:45Z")

</div>

Hi @Jpt96 apologies for the delayed response on this. I do see that you made some updates to the Verse code with `IsActive[]` checks to guard against potential invalid accesses of disconnected `player`s and indexing into the `weak_map`, which will trigger a Verse runtime error. Are you still running into this issue since then?

---

<div class="post-metadata">

**Author:** ![PharaohCM](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pharaohcm/32/1131302_2.png) [@PharaohCM](https://forums.unrealengine.com/u/PharaohCM)\
**Post date:** [December 3, 2025, 8:13pm UTC](https://forums.unrealengine.com/t/weakmap-runtime-errors-w-player-isactive-passing/2663610/10 "2025-12-03T20:13:16Z")

</div>

Hi @sonictke We had to ensure the `FortCharacter` was moving prior to initializing the `weak_map` for the player. That was our workaround for the time being. It did seem to fix the issue currently. This issue has been also happening for Join In Progress players.

---

<div class="post-metadata">

**Author:** ![Bug-Reporter](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bug-reporter/32/1223650_2.png) [@Bug-Reporter](https://forums.unrealengine.com/u/Bug-Reporter)\
**Post date:** [December 12, 2025, 9:42pm UTC](https://forums.unrealengine.com/t/weakmap-runtime-errors-w-player-isactive-passing/2663610/12 "2025-12-12T21:42:22Z")

</div>

FORT-989854 is ‘Closed’ as ‘Fixed’. The issue will be addressed in 40.00.

---

<div class="post-metadata">

**Author:** ![unluckyshubh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@unluckyshubh](https://forums.unrealengine.com/u/unluckyshubh)\
**Post date:** [January 30, 2026, 10:17am UTC](https://forums.unrealengine.com/t/weakmap-runtime-errors-w-player-isactive-passing/2663610/13 "2026-01-30T10:17:22Z")

</div>

we are having the same issue , we are using Player.IsActive[] before all the functions of weakmap , also i want to know if this happens due to we are calling weak map on player removed event or not

 ![Screenshot 2026-01-30 144852](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/a/8/2a8de4ecd75d5c7698297388fd8df967d257769d.png)

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [April 7, 2026, 4:16am UTC](https://forums.unrealengine.com/t/weakmap-runtime-errors-w-player-isactive-passing/2663610/14 "2026-04-07T04:16:59Z")

</div>

This topic was automatically closed after 180 days. New replies are no longer allowed.
