List View crashes UE4 unless I copy objects before adding them

So I’m trying to add an array of objects to a List View.

This simple, obvious solution crashes the editor all the way to the desktop.

While this stupid, verbose thing works just fine.

And I have absolutely no idea WHY or what’s going on. These blocks are rooted from the same array of UInventoryItemDataObject references. Both the ForEach and the Construct UInventoryItemData have the same types in their return.

Is it because of the owner is otherwise not this widget? How would I get around that?

Old question but my best guess is you’re adding the same objects to the list multiple times, which the ListView doesn’t like and triggers a crash. Constructing new objects like you show would workaround this issue which makes me think that’s your problem. You want to make sure you’re clearing the existing items in the list before adding these (if you do this add multiple times like on construct), and also make sure the list you’re adding from doesn’t contain any duplicates.