Using blueprint macro library causes crash

Here’s a link to project with reproducing bug:

On an empty project, you can do this to reproduce:

  1. Create a blueprint (I’ve used Player Controller) with a variable.
  2. Create a blueprint macro library. Add a macro that uses said variable (mine just prints it to log)
  3. Create a widget blueprint with a single TextBlock
  4. Bind a function to TextBlock’s content. This function should call macro from step 2.
  5. Add widget to game (I’ve used GameMode’s BeginPlay event)
  6. Change blueprint from step 1. Simply adding a second variable will do.
  7. Run game using UE4Editor.exe myproject.uproject -game command line. game would crash.

log says something along lines of:

‘TestPlayerController_C_0’ is of class ‘TestPlayerController_C’ however property ‘BoolProperty_22’ belongs to class ‘TRASHCLASS_TestPlayerController_39’

It would seem that blueprint for player controller got recompiled, but macro that referenced it somehow retained reference to old, pre-recompilation property. And crashed when trying to access it.

I’ve been able to reproduce this easily with widget blueprints. Using macros in regular blueprints seems to generally work, however, in bigger project I’m working on, I have a regular blueprint with this behaviour. I can’t reproduce it in a sample project, however.

I confirm that blueprint does get recompiled by BlueprintGeneratedClass::ConditionalRecompileClass (and during recompilation property is moved to trash class by KismetCompiler::CleanAndSanitizeClass). problem is that TestPlayerController is recompiled after TestWidget. Sadly, I don’t know UE internals enough to be able to create a fix for this bug.

Hey Nevermind,

Thanks for report! We have assigned this issue to a member of our support staff, and they will begin investigation as soon as possible. If we are unable to reproduce issue, or we need additional information, our staff member will comment here with additional questions. Otherwise, we will post an ‘Answer’ once we have logged issue in our bug database or we have a solution for it.

In meantime, please be sure to review our suggestions for how to report a bug, and feel free to edit your post if you have additional information to provide:

For a crash, we generally like to get a crash log and dump file for project. Please and attach files here.


Hello Nevermind,

I was unable to reproduce issue that you stated above. I could not get your blueprints to compile because your binding was not a pure function. After checking following check box I was able to compile and game launched smoothly. Could you tell me what version of engine it is that you are using?

Hi Rudy,

I’m using 4.5.1, but I’ve also asked a coworker (Slonopotamus) to confirm crash on latest version from github, which he did. On my version at least, blueprint compiles even without “Pure” checkbox; I’ve tried checking it and crash happens anyway.

Please note that it’s not editor that crashes - only game. I.e. you have to launch it with -game command line .

I’m also attaching log and dmp files from crash, just in case.
link text

Hi, Rudy. Any progress with this bug?

Hello Slonopotamus,

I was unable to reproduce this issue. Have you tried to reproduce this in current version of engine (4.6.1)?

I make widget function pure (4.5 → 4.6 migration) and upload project:

Uploaded project reproduce this bug with -game flag.

Hello Nevermind,

I meant to get back to you sooner. I was able to reproduce issue that you were describing in your post. A report (UE-8314) was submitted to developers for further consideration. I will provide updates with any pertinent information as it becomes available.

Make it a great day

This problem is still present on master version of April 21, 2015.

Hello ,

I went ahead and double checked on this issue for you. However, this issue’s status has not been updated to resolved at this time. I will be sure to bump up community interest for this issue. Thank you for your time and information.

Make it a great day

It is very sad that this report is 6 months old and its still not fixed.
I had a hard time finding this post and figuring out what causes my continous crashes. I spent my whole day with this :S

After replacing all macros in my 10+ blueprints. (They were quite big)
project is no longer crashing.

‘WhyIsThisNotWorkingGameMode_C_0’ is of class ‘WhyIsThisNotWorkingGameMode_C’ however property ‘ObjectProperty_1795’ belongs to class ‘TRASHCLASS_WhyIsThisNotWorkingGameMode_497’


Hello ,

We are still looking into this issue, however we do not have any new information to provide regarding its status. I will be sure to bump community interest for this report. Thank you for your information and time.

Make it a great day

Just lost 6 hours due to that bug, almost went crazy. Was a simple wrapper which used a reference to player pawn inside. Used that macro in a class referenced from same player pawn. This lead to a random crash depending on order of when I recompiled individual blueprints.

Still broken in 4.8 and 4.9.

Hello Slonopotamus,

I went ahead and double checked on this issue for you and you are correct. This issue’s status has not been updated to fixed as of this time. However, I have bumped up community interest for this issue. Thank you for your time and information.

Make it a great day