Description

If you use "Set Array Elem" on a vector array but leave "Item" at the default value of (0,0,0) then you'll end up using a temporary uninitialised vector instead of (0,0,0) when it's nativized.

Workaround: The current workaround is to create a (0,0,0) vector variable and plugging it into the Set Array Element node to override the default.

Steps to Reproduce
  1. Open the editor
  2. Enable Nativize Blueprint Assets (Edit->Project Settings->Packaging)
  3. Create a new actor blueprint
  4. Add a new Vector array variable
  5. Get a reference to the array variable
  6. On begin play, set array element (leave the Item at the default value of 0,0,0).

Result: When the project is packaged out using Nativize Blueprint Assets, the vector will instead be a temporary uninitialized vector instead of (0,0,0).

FVector bpv__Temp_struct_Variable3__pf{}; ... intervening code then first use ... 
FCustomThunkTemplates::Array_Set(/out/ bpv__EnvironmentForces__pf
bpv__Temp_int_Array_Index_Variable3__pf, /out/ bpv__Temp_struct_Variable3__pf, true);

Expected: The vector would be (0,0,0)

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-33883 in the post.

0
Login to Vote

Fixed
ComponentUE - Gameplay - Blueprint Runtime
Affects Versions4.12
Target Fix4.13
Fix Commit3085418
Main Commit3092051
Release Commit3085418
CreatedJul 28, 2016
ResolvedAug 11, 2016
UpdatedApr 27, 2018
View Jira Issue