Packaged: Assertion Failed: IsInGameThread
We've recently upgraded to 4.19, and we've stumbled upon the crash described below.
When does it happen?
The game opens up the Main Menu map fine, which contains a small 3D environment with an animation sequence and a basic UI interface for new game and such.
Then, when clicking on New Game, the game is supposed to simply load the starting level, but we receive the following error:
Basically, the following function returns false, causing the game to crash, if this is of any help:
Does anyone have any insight as to where to begin to debug this crash?
Any help would be hugely appreciated.
EDIT: The project is blueprint-only with the exception of two minor C++ class that aren't called on level loading. One if for taking screenshot on game save, the other one of for changing culture for localization.
Disabling Async Loading fixed the problem. We're gonna go with that for now.
answered May 08 '18 at 04:48 PM
UE4 has design around assertion, it a concept that assums that it is better to crash program when you things aren't way you expected rether then let it randomly crash which is a lot harder to debug. You can read more about it here:
So in UE4 you state that you expect to be or expect to cause cause instability before executing specific sequence of code by placing check() function with bool statement (same as you use if ifs), if it's false it will crash engine and put failed statement in log. In your case is just IsInGameThread() function which return false if code is not running on game thread, which means you or engine code called a function which not suppose to run anywhere else then game thread, the usally culprit is rendering thread, you can also get asset crash of something that not suppose to run on game thread or only in render thread.
So best way to debug assertion failed is to simply look on call stack which is effectively list of sequence of functions which cause crash, search if your code is not in there and if there try to move the code to function which will be called by game thread or avoid calling function that cause crash, sometimes there special version of function for render thread so try to search for that. If it's not and it's engine code then it's most likely a bug, cause even if it's cause of your doing without C++ it should not crash from assertion. If you can reproduce it then bug raport
answered May 08 '18 at 04:20 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here