SetPropertyValue() corrupts object?!
If I create an object and set a property using the reflection system the object becomes invalid - it fails an assert in ConditionalDestroy() - it is caused because when the BeginDestroy() function is called on the object somehow the PostLoadSubobjects() is called instead, and BeginDestory() isn't called at all.
Code I used:
In character Header:
Easiest way to reproduce:
Interesting part is the fact that the error looks totally random, but I had exactly the same results in a much more complicated environment. Did I miss something?
I think issue might be cast, void* should accept any pointer type (including function pointers) as it's ambiguous type just containing memory address and it can take it from any other pointer without casting (in other word void* is a "base class" for any pointer for compiler). you might also try using _InContainer version with index 0 i remeber i had similar isues with nomal function yet the container one worked ok.
answered Mar 09 '17 at 01:40 PM
Using SetPropertyValue_InContainer() instead of SetPropertyValue() solved the problem.
answered Mar 09 '17 at 01:36 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here