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"

How to debug crashes?

So I've created my game project but it seems to be crashing a lot and I'm not sure how to figure out what the cause is. The game is built entirely out of blueprints and it doesn't seem like it's very intensive but something in my script is causing the problem. How does one go about figuring out why the game is crashing? It just hard locks and I have to shut it down in the task manager.

Product Version: Not Selected
more ▼

asked Feb 22 '17 at 02:53 AM in Using UE4

avatar image

1.1k 82 112 143

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

1 answer: sort voted first

Most basic things you can do is check the logs after crash in /Saved/Logs in you project directory, UE4 if it was controlled crash (assert fail for example, engine has assertion check expection of specific state, if it's false engine will crash it self as it can't ensure stability) it will leave crash log with reason of crash, it should also leave stack trace (list of functions what function called what function) you might figure what caused crash just by look of it. In case of assert fail you will give a condition that failed in C++ code, and where that happened (file + line number) you need to search engine code and search for check() function with that condition and figure why it is false. If it was not controllable crash, cause for example by tring to call function on not existing object or any CPU level error, OS will stop execution without question and you will have cutter log that suddenly stop, because engine could not do anything, those crashes are harder to debug, thats why it has this assertion checks mentioned above.

Other solution is code debuging, you run UE4 in debugger in Visual Studio and when crash happens it will halt the code execution nad VS will tell you where crash happened and give you stack trace and you can also probe memoery for varable states. This debugging works on any crash, when OS will detect issue and halt the application, you can also put break points in the code and deugger will stop at that program point like it crash but you can resume.

But as you not doing C++ this might be hard to do, so mostly what you can do is check the log, look above in log there might be some hints what went wrong, if this won't help try to reproduce the crash so you know when it happens, the you can raport it us a bug with step by step instruction how to reproduce it and Epic or someone else can look at it, even if it's assert fail since it should not happen so submit also your log too. There no solution for random crashes sadly without proper code debugging, which will be hard wither way if you don't know when crash happens.

more ▼

answered Feb 22 '17 at 05:15 AM

avatar image

35.9k 928 169 1105

avatar image TorQueMoD Feb 22 '17 at 07:05 AM

Thanks for the detailed response. So I looked at the latest log file and couldn't see anything out of the ordinary. I deleted the log folder and I'm going to play the game until it crashes again so it will generate a new one. It seems to be crashing when I kill one of my NPCs but sadly with this game you're killing NPCs every few seconds. I am using some experimental AI functionality so that could be the problem. I'll check the new log files when they're created and see where I can go from there.

avatar image TorQueMoD Feb 22 '17 at 07:24 AM

Ok it's definitely my NPC. Opened the crash log and the first warning at the top of the log right after it says "LoadMap" reads

[2017.02.22-07.16.29:785][243]LogCharacterMovement:Warning: GetSimulationTimeStep() - Max iterations 8 hit while remaining time 0.096552 > MaxSimulationTimeStep (0.050) for 'BP_NPC_Master11', movement 'Walking'

Which is my NPC blueprint.

Then right below that I've got 26 warnings that all read

[2017.02.22-07.16.30:372][275]LogScriptCore:Warning: [2017.02.22-07.16.30:372][275]LogScriptCore:Warning: Script Msg: Attempted to access index 0 from array LastSensedStimuli of length 0! [2017.02.

Which is the experimental AI.... wonder if this is fixed in the latest version? It seems to be saying that the LastSensedStimuli array isn't actually an array. I was following a tutorial that Epic Live Streamed. I wonder if I followed a step incorrectly... You'd think if I did though that the AI wouldn't be working but it is.

(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