BP_TBall is a blueprint derives from a C++ class(which derives from AActor).
BP_TBall is spawned at runtime.
BP_ProtoChar03 is a character blueprint derives from a C++ class(which derives from ACharacter).
If I reference BP_ProtoChar03 within BP_TBall(e.g. by adding a local var of type BP_ProtoChar03 to BP_TBall), everything looks fine, and the game plays as I expected. But, the editor will always crash on the next startup.
Here’s the [crash report][2].
It really troubles me for a while, is this issue encountered by anyone?
Issue solved. The crash is due to cycling references.
A simplified description:
Blueprint Bar has an event DoSth()
defined on it.
Blueprint Foo calls Bar.DoSth(),
which implies Foo holds a reference
to Bar.
Trying to obtain a reference to Foo
in Bar will cause cycling
references.
Obviously UE4 does not handle cycling references very well. If the the reference cycle is in pure blueprints, then you would expect a situation where compiling Bar will mark Foo dirty, and compiling Foo will mark Bar dirty.
Even worse, if the reference cycle involves with native C++ code(as it is in my case), the game plays well at first glance, then the editor would crash on the next startup, leaving you clueless of what goes wrong(as you might have done tons of stuff before the crash and have no idea which step you take actually causes the crash).
Hope this is helpful to those who have this kind of questions.
BTW, I am using UE 4.4.3.