# \[4.6.1\] Calling blueprint function library function inside macro library causes crash in standalone

**URL:** <https://forums.unrealengine.com/t/4-6-1-calling-blueprint-function-library-function-inside-macro-library-causes-crash-in-standalone/303393>\
**Category:** Blueprint\
**Tags:** macro-library, function-library, unreal-engine, crash, question, Blueprint\
**Created:** [January 8, 2015, 9:23pm UTC](https://forums.unrealengine.com/t/4-6-1-calling-blueprint-function-library-function-inside-macro-library-causes-crash-in-standalone/303393 "2015-01-08T21:23:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![CombatJack](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CombatJack](https://forums.unrealengine.com/u/CombatJack)\
**Post date:** [January 8, 2015, 9:23pm UTC](https://forums.unrealengine.com/t/4-6-1-calling-blueprint-function-library-function-inside-macro-library-causes-crash-in-standalone/303393/1 "2015-01-08T21:23:45Z")

</div>

I was getting a crash in my project on launching standalone from editor and I narrowed it down to a macro in a blueprint my macro library calling a function in my blueprint function library. I was getting these log messages when it happened:

[2015.01.08-19.17.25:701][0]LogBlueprint:Error: [compiler] Error current value (/Engine/Transient.REINST\_Core2FunctionLibrary\_C\_0) of ’ Target ’ pin is invalid: /Engine/Transient.REINST\_Core2FunctionLibrary\_C\_0 isn’t a Core2FunctionLibrary\_C (specified on pin self)

I had to set a breakpoint in KismetCompilerMisc.cpp, Line 944 where error message is generated and then inspect Node to see what function it was actually talking about. My full log is in here [FullProjectLog.][1].

In order to fix it, I had to remove call to blueprint function library function and pass information into macro library macro.

Is calling blueprint library functions not allowed in macro library macros? My expectation is that it would be supported or at least prevented by editor.

I tried to repro this in SwingNinja. I could get a crash, but it doesn’t crash in same way. log for SwingNinja crash is here: [SwingNinjaLog.][2]

To repro:

1. Create a Blueprint Function Library with a function “Get Character Box Component”, taking a “Character” type input. Defined like this:

 ![26069-getcharacterboxcomponent.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/f/8/ff8d7a175292a0463b140a1137f55ddef52f9142.png)

1. Create a Macro Library based on Actor with a macro “GetMyCharcterBoxExtents” taking a “Character” type input. and Vector output. Defined like this:

 ![26070-getmycharcterboxextents.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/c/0/5c08aa3b14875ef0da181968f681a91cc53db75e.png)

1. Modify Coin blueprint after PlaySoundAtLocation call like this:

 ![26071-coin.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/8/7/687717303b4af5ba53218e79d9d83c52be8d7814.png)

1. Launch in PIE, notice print string when picking up coin is appearing and no crash.

2. Launch in Stand Alone, notice crash when picking up coin.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_33800a51](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_33800a51](https://forums.unrealengine.com/u/anonymous_user_33800a51)\
**Post date:** [January 9, 2015, 12:20am UTC](https://forums.unrealengine.com/t/4-6-1-calling-blueprint-function-library-function-inside-macro-library-causes-crash-in-standalone/303393/2 "2015-01-09T00:20:33Z")

</div>

Hi

Thanks for report! I was able to reproduce this crash internally and have created a bug report for developers to look over (UE-7334). I would expect a function from a Function Library to work inside a macro from a Macro Library as well, and it seems to work most of time but not in Standalone Game. For now, your workaround is your best bet. I will let you know when I see an update on bug report. Thanks!

---

<div class="post-metadata">

**Author:** ![Hyperloop](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hyperloop/32/1203427_2.png) [@Hyperloop](https://forums.unrealengine.com/u/Hyperloop)\
**Post date:** [January 30, 2015, 2:10am UTC](https://forums.unrealengine.com/t/4-6-1-calling-blueprint-function-library-function-inside-macro-library-causes-crash-in-standalone/303393/3 "2015-01-30T02:10:19Z")

</div>

What is status of UE-7334? I am getting identical error message every time I re open my project and it is only fixed by re-compiling function libraries in question.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_33800a51](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_33800a51](https://forums.unrealengine.com/u/anonymous_user_33800a51)\
**Post date:** [January 30, 2015, 3:02pm UTC](https://forums.unrealengine.com/t/4-6-1-calling-blueprint-function-library-function-inside-macro-library-causes-crash-in-standalone/303393/4 "2015-01-30T15:02:36Z")

</div>

There hasn’t been any update on UE-7334 yet, and I would expect it to be looked into for 4.8. That bug report may be related to issue you’re having, but it specifically looks at crash in Standalone that happens as a result, and not a compiler error. We’ll address that in your other post:

> **[Functions from function libraries give errors when re-opening project](https://forums.unrealengine.com/questions/166138/functions-from-function-libraries-give-errors-when.html)**
>
> Win 7 64 bit, UE 4.6.1. I have a couple function libraries that I make use of in a number of blueprints. Any blueprint that uses this library will fail to compile upon re-opening project. only way to solve it is to re-compile function library...

Thanks!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_c0687f281](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_c0687f281](https://forums.unrealengine.com/u/anonymous_user_c0687f281)\
**Post date:** [July 9, 2015, 5:24pm UTC](https://forums.unrealengine.com/t/4-6-1-calling-blueprint-function-library-function-inside-macro-library-causes-crash-in-standalone/303393/5 "2015-07-09T17:24:22Z")

</div>

Hi ,

just lost about 6 hours because of this (nearly went crazy about it). I was just calling a function lib inside a macro which caused editor to crash. really strange thing: It looks like it has something to do with _order_ in which individual blueprint gets compiled.

Maybe you could just throw a warning that this _could_ cause a crash? From crash log I could absolutely not tell what was actual problem here…

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_33800a51](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_33800a51](https://forums.unrealengine.com/u/anonymous_user_33800a51)\
**Post date:** [July 9, 2015, 5:53pm UTC](https://forums.unrealengine.com/t/4-6-1-calling-blueprint-function-library-function-inside-macro-library-causes-crash-in-standalone/303393/6 "2015-07-09T17:53:58Z")

</div>

Sorry about that! I believe this has already been fixed in our internal build, so it should work without crashing in 4.9, however I have yet to verify that. I’ll post here when it’s been verified.
