I have built an UE5.6 project with ASan on Windows. The project was built by clang. But after I debugged the project, the crash happened and I can’t open the editor. I am not sure what’s going on and not sure if ASan truely works in UE5.
Hi,
We don’t run/test ASAN with the Editor and according to your callstack you are running the Editor. So if you want to run ASAN for the Windows Editor, it doesn’t work out of the box. If you wanted to run ASAN with your Win64 game though, it should work. Depending how you built and how you enabled ASAN, I suspect you have compiled both the game and the Editor with it enabled? Ensure you turn ASAN on only for the target you want.
This can be done in your game (or client) target.cs as below. You pass -EnableAsan when you compile your game target from the command line.
Ex: e:\UE_5.7\Samples\Games\Lyra\Source\LyraGame.Target.cs
public LyraGameTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Game;
WindowsPlatform.bEnableAddressSanitizer = true;
ExtraModuleNames.AddRange(new string[] { "LyraGame" });
LyraGameTarget.ApplySharedLyraTargetSettings(this);
}
Regards,
Patrick
