Description

FCustomThunkTemplates::Array_Get() fails to properly initialize a default item when the index is invalid:

Item = U{};

That will leave the item uninitialized (e.g. UDS types). Should be using the TArray's Inner property to call InitializeValue() instead.

Steps to Reproduce

(See UDN thread)

Basically, set up a BP in which you have an array of user-defined struct elements, and then use a 'Get' node to attempt to access an invalid index. The "default" item returned will not be fully initialized in the nativized build.

Have Comments or More Details?

There's no existing public thread on this issue, so head over toAnswerHub just mention UE-57955 in the post.

0
Login to Vote

Fixed
ComponentGameplay - Blueprint
Affects Versions4.174.184.19
Target Fix4.22
Fix Commit4522000
CreatedApr 19, 2018
ResolvedNov 7, 2018
UpdatedNov 7, 2018