|
发表于 2024-8-13 14:59:00
|
查看: 1002 |
回复: 2
关键代码:WindowsPlatformMisc.cpp中PureCallHandler这个函数
HoloLensMisc.cpp中也包含了PureCallHandler这个静态函数
extern CORE_API bool GEdSelectionLock;
extern CORE_API bool GIsClient;
extern CORE_API bool GIsServer;
extern CORE_API bool GIsCriticalError;
extern CORE_API TSAN_ATOMIC(bool) GIsRunning;
extern CORE_API bool GIsDuplicatingClassForReinstancing;
if( GIsRunning )
{
FMessageDialog::Open( EAppMsgType::Ok, NSLOCTEXT("Core", "PureVirtualFunctionCalledWhileRunningApp", "Pure virtual function being called while application was running (GIsRunning == 1).") );
}
static void PureCallHandler()
{
static bool bHasAlreadyBeenCalled = false;
UE_DEBUG_BREAK();
if (bHasAlreadyBeenCalled)
{
// Call system handler if we're double faulting.
if (DefaultPureCallHandler)
{
DefaultPureCallHandler();
}
}
else
{
bHasAlreadyBeenCalled = true;
if (GIsRunning)
{
FMessageDialog::Open(EAppMsgType::Ok, NSLOCTEXT("Core", "PureVirtualFunctionCalledWhileRunningApp", "Pure virtual function being called while application was running (GIsRunning == 1)."));
}
UE_LOG(LogTemp, Fatal, TEXT("Pure virtual function being called"));
}
}
static void PureCallHandler()
{
static bool bHasAlreadyBeenCalled = false;
UE_DEBUG_BREAK();
if( bHasAlreadyBeenCalled )
{
// Call system handler if we're double faulting.
if( DefaultPureCallHandler )
{
DefaultPureCallHandler();
}
}
else
{
bHasAlreadyBeenCalled = true;
if( GIsRunning )
{
FMessageDialog::Open( EAppMsgType::Ok, NSLOCTEXT("Core", "PureVirtualFunctionCalledWhileRunningApp", "Pure virtual function being called while application was running (GIsRunning == 1).") );
}
UE_LOG(LogWindows, Fatal,TEXT("Pure virtual function being called") );
}
}
|
游戏安全课程 学员办理咨询联系QQ150330575 手机 139 9636 2600 免费课程 在 www.bilibili.com 搜 郁金香灬老师
|
|