Trying to access a property causes blueprint runtime error

Just ran into this error in 4.24.3 This is the first time we’ve seen it. It has happened on a character which is accessing a variable through a blueprint derived from a custom actor component. This appears to not be happening every time, but at random. We are using VS 2019 if that helps at all, but I suspect not.

I’m getting this specifically for a “pure” function on a widget. Some PIEs it works, sometimes it doesn’t (and really lags the framerate to the point of being unplayable after 30 s, and with 30K+ errors). Very annoying. I’ve put valid checks in, but that doesn’t seem to help. Even when I try re-compiling the problem blueprints, I get a crash frequently about EXCEPTION_ACCESS_VIOLATION reading address 0x00000019.

I’m facing this in 4.27 :slight_smile:

Well I’m also having this issue in version 5.0 with Live Coding. Doesn’t always happen but when it does I need to restart the editor and it does happen often. Even small changes in the .h can trigger it.

Also doing right click the Blueprint → Asset Actions → Reload straight up crashes the editor every time with an error saying it’s unable to do something about a DEAD_PACKAGE file related to that blueprint.

I’ve had the same problem. I think in my case it occurred because I was accessing private variables from the cpp class directly from the blueprint via the BlueprintReadWrite macro. I made those variables truly private and removed any UPROPERTY macros, instead, I set up public getter functions with UFUNCTION(BlueprintCallable) macros, and access the functions thru those getter functions. Now I can call them right after I compile cpp files, without having to compile blueprints again. And in general, exposing the private variables of a class thru getter and setter functions is better coding practice anyways.