x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Packaged: Assertion Failed: IsInGameThread

Hi there,

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:

alt text

Code

Basically, the following function returns false, causing the game to crash, if this is of any help:

 FORCEINLINE bool IsInGameThread()
 {
     if(GIsGameThreadIdInitialized)
     {
         const uint32 CurrentThreadId = FPlatformTLS::GetCurrentThreadId();
         return CurrentThreadId == GGameThreadId;
     }
 
     return true;
 }


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.

Product Version: UE 4.19
Tags:
more ▼

asked May 08 '18 at 12:19 AM in C++ Programming

avatar image

CyanBalloon
75 9 12 16

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Disabling Async Loading fixed the problem. We're gonna go with that for now.

more ▼

answered May 08 '18 at 04:48 PM

avatar image

CyanBalloon
75 9 12 16

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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:

https://en.wikipedia.org/wiki/Assertion_(software_development)

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

more ▼

answered May 08 '18 at 04:20 AM

avatar image

Shadowriver
36.6k 930 169 1111

avatar image CyanBalloon May 08 '18 at 03:11 PM

Problem is, our project is pretty much blueprint-only with two minor C++ class, that are not called on level loading, so what am I supposed to look at here?

Also, how can I get the call stack on a packaged project? We can look at the crash log, but it's not giving much relevant info. It doesn't crash if it's not packaged.

avatar image delcasda Jun 07 '18 at 08:37 PM

I suppose you fixed it already but for the record I was having the same error after an asynchronous call back with the result of showing a rewarded video on Android. No matter what was the next node, there was an error thread error. Just a simple delay solved the problem

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question