Summary
Been trying to store some objects at construction time but I can’t seem to be able to
Here’s the repro :
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
var SomeStoredObjects : weak_map(session, []some_class) = map{}
GetSomeStoredObjects()<reads>:[]some_class=
SomeStoredObjects[GetSession()] or array{}
some_class := class:
block:
option:
set SomeStoredObjects[GetSession()] = (SomeStoredObjects[GetSession()] or array{}) + array{Self}
test_weak_maps := class(creative_device):
SomeObject : some_class = some_class{}
Error Log
We hit an error while cooking this content
errors.com.epicgames.content-service.cook_failure
CookJobId:07d4b88e-379b-44ad-86af-8ab118e5d26c
An error occurred while communicating with the game servers (failed to cook module a127ce0f-4bee-4716-43c8-e99771b187b3 (artifact 50365d91-5893-4310-9a8d-03ec2f3c6cd4:linux-server) (cookJobId 07d4b88e-379b-44ad-86af-8ab118e5d26c) with error code errors.com.epicgames.cookplugin.cookfailure).
LogWindows: Error: appError called: Can’t save ‘C:/Temp/Temp/Cook/Cooked/LinuxServer/FortniteGame/Plugins/GameFeatures/a127ce0f-4bee-4716-43c8-e99771b187b3/Content/_Verse.uasset’: Illegal reference to private object: ‘Level /a127ce0f-4bee-4716-43c8-e99771b187b3/GameManager.GameManager:PersistentLevel’ referenced by ‘Default___Root’ (at ‘/a127ce0f-4bee-4716-43c8-e99771b187b3/_Verse’) in its ‘__verse_0x9D62C0F0_SomeStoredObjects’ property (private object belongs to an external map).
Please select what you are reporting on:
Verse
What Type of Bug are you experiencing?
Stability
Steps to Reproduce
See repro
Expected Result
Shouldn’t crash
Observed Result
Crashes
Platform(s)
PC