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 to Questions & Answers just mention UE-57955 in the post.

0
Login to Vote

Fixed
ComponentUE - Gameplay - Blueprint
Affects Versions4.174.184.19
Target Fix4.22
Fix Commit4522000
Main Commit4736445
Release Commit4862694
CreatedApr 19, 2018
ResolvedNov 7, 2018
UpdatedOct 3, 2019
View Jira Issue