Currently I’m experiencing a crash that only manifests itself on a shipping build - ah the worst! I would’ve loved to try and reproduce this crash on a blank project, but I have no leads to even guess where it might begin as we have no context as to what could be causing the issue. I have been unsuccessful trying to get this crash to occur in a development build, so we are at a loss as to what to do in order to debug our shipping build.
At Epic and the community, please advise us how do you go about debugging a crash that only happens in a shipping build without a useful dump file or logs? Any advice or suggestions would be greatly appreciated!
First thing: turn on logging with a shipping build. To do that, add “bUseLoggingInShipping = true;” to your Target.cs file. Get that log generated and we’ll see if that helps narrow things down.
Thanks for the swift reply! We’ve added this flag to our Target.cs.file. However we found out that on UE4 4.17.2 this causes an packaging error as confirmed by this thread. We found out that 4.18 P2 has a fix for it, so we pulled that commit through Github on our custom UE4 engine. However, even with that changelist (UE-49632), it still produces the same packaging error. So that options seems closed for the time being. Once again, thanks for taking the time to respond to this thread!
That sucks. I mistyped above, in 4.18 it’s just “bUseLoggingInShipping = true;” - I updated it.
I can build my game server with that flag enabled. I’m using 4.18.1, can you try that?
If not, this is just a guess but you could try going into the gen.cpp file(s) and changing “FLogCategoryLogClass LogClass;” to “FLogCategory LogClass;” It looks like the cpp generator got a bit broken for a few versions. (Edit:To do this you’ll need to edit the gen.cpp file, set it to read only, and change the associated .h file so it gets rebuilt.)
Hey Jin_VE, update this morning! As it turns out we turned on this flag on the build file rather than the target.cs.file you pointed out! Oops. I just checked the latest shipping build, and we’re generating logs now! Thank you so much for your help!!!
Cool beans. GL tracking down the bug.
You want the crash, minidump, and trace logs. Post whatever you find, and what you have already couldn’t hurt. You should make a full debug build. It will give more info in the logs and you can also debug it in VS and (hopefully) see where it fails in the code.
Hey Jin_VE! If I could summon your help once more here. So up until now we’ve talked about getting logs for the shipping build which works nicely (thanks again). Unfortunately, the logs haven’t revealed why the crash is happening (we’ve cleared every error/warning leading up until the crash which happens during level streaming). I would like to ask if you know of any way to obtain a call stack or make use of the dump files created from a shipping build crash. Thanks in advance!