fairygui / FairyGUI-unreal

A flexible UI framework for Unreal Engine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

编辑器下启动概率性crash

mingxxming opened this issue · comments

UE4Editor-Engine.dll!FTimerManager::InternalSetTimerForNextTick(FTimerUnifiedDelegate && InDelegate) 行 523 C++
[内联框架] UE4Editor-FairyGUI.dll!FTimerManager::SetTimerForNextTick(const TDelegate<void cdecl(void),FDefaultDelegateUserPolicy> &) 行 242 C++
UE4Editor-FairyGUI.dll!UFairyApplication::DelayCall<UGComponent,bool>(FTimerHandle & InOutHandle, UGComponent * InUserObject, void(UGComponent::*)(bool) inTimerMethod, bool <Vars_0>) 行 170 C++
UE4Editor-FairyGUI.dll!UGComponent::BuildNativeDisplayList(bool bImmediatelly) 行 707 C++
UE4Editor-FairyGUI.dll!UGComponent::ConstructFromResource(TArray<UGObject *,TSizedDefaultAllocator<32>> * ObjectPool, int PoolIndex) 行 1109 C++
UE4Editor-FairyGUI.dll!UGComponent::ConstructFromResource(TArray<UGObject *,TSizedDefaultAllocator<32>> * ObjectPool, int PoolIndex) 行 1013 C++
[内联框架] UE4Editor-FairyGUI.dll!UUIPackage::CreateObject(const TSharedPtr<FPackageItem,0> &) 行 284 C++
UE4Editor-FairyGUI.dll!UUIPackage::CreateObject(const FString & ResourceName, UObject * WorldContextObject) 行 274 C++
UE4Editor-FairyGUI.dll!UUIPackage::execCreateObject(UObject * Context, FFrame & Stack, void * const Z_Param__Result) 行 59 C++
UE4Editor-CoreUObject.dll!UFunction::Invoke(UObject * Obj, FFrame & Stack, void * const Z_Param__Result) 行 5588 C++
UE4Editor-CoreUObject.dll!UObject::ProcessEvent(UFunction * Function, void * Parms) 行 1992 C++
UE4Editor-JsEnv.dll!puerts::FFunctionTranslator::Call(v8::Isolate * Isolate, v8::Localv8::Context & Context, const v8::FunctionCallbackInfov8::Value & Info) 行 124 C++
UE4Editor-JsEnv.dll!puerts::FFunctionTranslator::Call(const v8::FunctionCallbackInfov8::Value & Info) 行 89 C++
[外部代码]
UE4Editor-JsEnv.dll!puerts::FFunctionTranslator::CallJs(v8::Isolate * Isolate, v8::Localv8::Context & Context, v8::Localv8::Function JsFunction, v8::Localv8::Value This, void * Params) 行 178 C++
UE4Editor-JsEnv.dll!puerts::FJsEnvImpl::InvokeJsCallabck(UDynamicDelegateProxy * Proxy, void * Parms) 行 1422 C++
UE4Editor-JsEnv.dll!UDynamicDelegateProxy::ProcessEvent(UFunction * formal, void * Parms) 行 20 C++
[内联框架] UE4Editor-View.dll!FGameModeStartDelegate_DelegateWrapper(const TScriptDelegate &) 行 26 C++
[内联框架] UE4Editor-View.dll!FGameModeStartDelegate::ExecuteIfBound(const int InParam1) 行 26 C++
UE4Editor-View.dll!ACoreGameMode::StartPlay() 行 16 C++
UE4Editor-Engine.dll!UWorld::BeginPlay() 行 4342 C++
UE4Editor-Engine.dll!UEngine::LoadMap(FWorldContext & WorldContext, FURL URL, UPendingNetGame * Pending, FString & Error) 行 13098 C++
UE4Editor-Engine.dll!UEngine::Browse(FWorldContext & WorldContext, FURL URL, FString & Error) 行 12303 C++
UE4Editor-Engine.dll!UEngine::TickWorldTravel(FWorldContext & Context, float DeltaSeconds) 行 12501 C++
UE4Editor-UnrealEd.dll!UEditorEngine::Tick(float DeltaSeconds, bool bIdleMode) 行 1692 C++
UE4Editor-UnrealEd.dll!UUnrealEdEngine::Tick(float DeltaSeconds, bool bIdleMode) 行 426 C++
UE4Editor.exe!FEngineLoop::Tick() 行 4836 C++
[内联框架] UE4Editor.exe!EngineTick() 行 62 C++
UE4Editor.exe!GuardedMain(const wchar_t * CmdLine) 行 169 C++
UE4Editor.exe!WinMain(HINSTANCE * hInInstance, HINSTANCE
* hPrevInstance, char * __formal, int nCmdShow) 行 257 C++
[外部代码]

commented

这是堆栈,crash的信息是什么

引发了异常: 读取访问权限冲突。
this->World->OwningGameInstance 是 0x20100010100。

commented

CreateObject传入的WorldContextObject是不是有问题

要没人遇到,我自己再查一下。

我也遇到了

启动和频繁切换level会出现
原因:在UFairyApplication::Get中缓存了World,后续使用了被删除的World
改进:使用GameInstance去取World

commented

启动和频繁切换level会出现
原因:在UFairyApplication::Get中缓存了World,后续使用了被删除的World
改进:使用GameInstance去取World

怎么改进?可以指导一下吗。编辑器下启动Level,我测试了很多次,没有发现问题。你说的切换level,会切换GameWorld吗?

启动和频繁切换level会出现
原因:在UFairyApplication::Get中缓存了World,后续使用了被删除的World
改进:使用GameInstance去取World

怎么改进?可以指导一下吗。编辑器下启动Level,我测试了很多次,没有发现问题。你说的切换level,会切换GameWorld吗?

出现的次数并不多,不太好重现,出现的点在启动编辑器,和切换level的时候,切换Level之后GameWorld也被删除了
修改

1 定义 static UGameInstance* GameInstance;在FairyApplication.h中
2 赋值 GameInstance = World->GetGameInstance(); 在FairyApplication.cpp/UFairyApplication::Get(){}中
3 修改 virtual UWorld* GetWorld() const override {return GameInstance->GetWorld(); };在FairyApplication.h中
4 修改 后续的报错全部替换成GetWorld()

commented

启动和频繁切换level会出现
原因:在UFairyApplication::Get中缓存了World,后续使用了被删除的World
改进:使用GameInstance去取World

怎么改进?可以指导一下吗。编辑器下启动Level,我测试了很多次,没有发现问题。你说的切换level,会切换GameWorld吗?

出现的次数并不多,不太好重现,出现的点在启动编辑器,和切换level的时候,切换Level之后GameWorld也被删除了
修改

1 定义 static UGameInstance* GameInstance;在FairyApplication.h中
2 赋值 GameInstance = World->GetGameInstance(); 在FairyApplication.cpp/UFairyApplication::Get(){}中
3 修改 virtual UWorld* GetWorld() const override {return GameInstance->GetWorld(); };在FairyApplication.h中
4 修改 后续的报错全部替换成GetWorld()

我按照这种方案改了一下,请大家再测试一下。

引发了异常: 读取访问权限冲突。
this 是 nullptr。

UE4Editor-Engine.dll!UGameInstance::GetWorld() 行 65 C++
UE4Editor-Engine.dll!UEngine::GetWorldFromContextObject(const UObject * Object, EGetWorldErrorMode ErrorMode) 行 11181 C++
UE4Editor-UnrealEd.dll!UEditorEngine::OnScriptExecutionStart(const FBlueprintContextTracker & ContextTracker, const UObject * ContextObject, const UFunction * ContextFunction) 行 2142 C++
[内联框架] UE4Editor-UnrealEd.dll!Invoke(void(UEditorEngine::*)(const FBlueprintContextTracker &, const UObject *, const UFunction )) 行 65 C++
[内联框架] UE4Editor-UnrealEd.dll!UE4Tuple_Private::TTupleBase<TIntegerSequence>::ApplyAfter(void(UEditorEngine::
)(const FBlueprintContextTracker &, const UObject *, const UFunction *) &) 行 299 C++
UE4Editor-UnrealEd.dll!TBaseUObjectMethodDelegateInstance<0,UEditorEngine,void __cdecl(FBlueprintContextTracker const &,UObject const *,UFunction const *),FDefaultDelegateUserPolicy>::ExecuteIfSafe(const FBlueprintContextTracker & <Params_0>, const UObject * <Params_1>, const UFunction * <Params_2>) 行 611 C++
[内联框架] UE4Editor-CoreUObject.dll!TMulticastDelegate<void __cdecl(FBlueprintContextTracker const &,UObject const *,UFunction const *),FDefaultDelegateUserPolicy>::Broadcast(const FBlueprintContextTracker &) 行 955 C++
UE4Editor-CoreUObject.dll!FBlueprintContextTracker::EnterScriptContext(const UObject * ContextObject, const UFunction * ContextFunction) 行 232 C++
UE4Editor-CoreUObject.dll!UObject::ProcessEvent(UFunction * Function, void * Parms) 行 1879 C++
UE4Editor-JsEnv.dll!puerts::FFunctionTranslator::Call(v8::Isolate * Isolate, v8::Localv8::Context & Context, const v8::FunctionCallbackInfov8::Value & Info) 行 226 C++
UE4Editor-JsEnv.dll!puerts::FFunctionTranslator::Call(const v8::FunctionCallbackInfov8::Value & Info) 行 187 C++
[外部代码]
UE4Editor-JsEnv.dll!puerts::FFunctionTranslator::CallJs(v8::Isolate * Isolate, v8::Localv8::Context & Context, v8::Localv8::Function JsFunction, v8::Localv8::Value This, void * Params) 行 280 C++
UE4Editor-JsEnv.dll!puerts::FJsEnvImpl::InvokeJsCallabck(UDynamicDelegateProxy * Proxy, void * Parms) 行 1123 C++
UE4Editor-JsEnv.dll!UDynamicDelegateProxy::ProcessEvent(UFunction * __formal, void * Parms) 行 20 C++
[内联框架] UE4Editor-FairyGUI.dll!TScriptDelegate::ProcessDelegate(void *) 行 247 C++
UE4Editor-FairyGUI.dll!TMulticastScriptDelegate::ProcessMulticastDelegate(void * Parameters) 行 488 C++
[内联框架] UE4Editor-FairyGUI.dll!FGUIEventDynMDelegate_DelegateWrapper(const TMulticastScriptDelegate &) 行 149 C++
[内联框架] UE4Editor-FairyGUI.dll!FGUIEventDynMDelegate::Broadcast(UEventContext *) 行 149 C++
UE4Editor-FairyGUI.dll!UGObject::InvokeEventDelegate(UEventContext * Context) 行 651 C++
[内联框架] UE4Editor-FairyGUI.dll!UFairyApplication::InternalBubbleEvent(const FName &) 行 280 C++
[内联框架] UE4Editor-FairyGUI.dll!UFairyApplication::BubbleEvent(const FName &) 行 267 C++
UE4Editor-FairyGUI.dll!UFairyApplication::OnWidgetMouseButtonDown(const TSharedRef<SWidget,0> & Widget, const FGeometry & MyGeometry, const FPointerEvent & MouseEvent) 行 486 C++
UE4Editor-FairyGUI.dll!SDisplayObject::OnMouseButtonDown(const FGeometry & MyGeometry, const FPointerEvent & MouseEvent) 行 176 C++
[内联框架] UE4Editor-Slate.dll!FSlateApplication::RoutePointerDownEvent::__l5::<lambda_3008f576504c0c19c83032846bbd2c02>::operator()(const FArrangedWidget) 行 4715 C++
UE4Editor-Slate.dll!FEventRouter::Route<FReply,FEventRouter::FBubblePolicy,FPointerEvent,<lambda_3008f576504c0c19c83032846bbd2c02>>(FSlateApplication * ThisApplication, FEventRouter::FBubblePolicy RoutingPolicy, FPointerEvent EventCopy, const FSlateApplication::RoutePointerDownEvent::l5::<lambda_3008f576504c0c19c83032846bbd2c02> & Lambda, ESlateDebuggingInputEvent DebuggingInputEvent) 行 378 C++
UE4Editor-Slate.dll!FSlateApplication::RoutePointerDownEvent(const FWidgetPath & WidgetsUnderPointer, const FPointerEvent & PointerEvent) 行 4701 C++
UE4Editor-Slate.dll!FSlateApplication::ProcessMouseButtonDownEvent(const TSharedPtr<FGenericWindow,0> & PlatformWindow, const FPointerEvent & MouseEvent) 行 4651 C++
UE4Editor-Slate.dll!FSlateApplication::ProcessTouchStartedEvent(const TSharedPtr<FGenericWindow,0> & PlatformWindow, const FPointerEvent & InTouchEvent) 行 5868 C++
UE4Editor-Slate.dll!FSlateApplication::OnTouchStarted(const TSharedPtr<FGenericWindow,0> & PlatformWindow, const FVector2D & Location, float Force, int TouchIndex, int ControllerId) 行 5856 C++
UE4Editor-Slate.dll!FSlateApplication::OnMouseDown(const TSharedPtr<FGenericWindow,0> & PlatformWindow, const EMouseButtons::Type Button, const FVector2D CursorPos) 行 4535 C++
UE4Editor-ApplicationCore.dll!FWindowsApplication::ProcessDeferredMessage(const FDeferredWindowsMessage & DeferredMessage) 行 2182 C++
UE4Editor-ApplicationCore.dll!FWindowsApplication::DeferMessage(TSharedPtr<FWindowsWindow,0> & NativeWindow, HWND
* InHWnd, unsigned int InMessage, unsigned __int64 InWParam, int64 InLParam, int MouseX, int MouseY, unsigned int RawInputFlags) 行 2638 C++
UE4Editor-ApplicationCore.dll!FWindowsApplication::ProcessMessage(HWND
* hwnd, unsigned int msg, unsigned __int64 wParam, int64 lParam) 行 1042 C++
UE4Editor-ApplicationCore.dll!FWindowsApplication::AppWndProc(HWND
* hwnd, unsigned int msg, unsigned int64 wParam, int64 lParam) 行 874 C++
[外部代码]
[内联框架] UE4Editor-ApplicationCore.dll!WinPumpMessages() 行 108 C++
UE4Editor-ApplicationCore.dll!FWindowsPlatformApplicationMisc::PumpMessages(bool bFromMainLoop) 行 130 C++
UE4Editor.exe!FEngineLoop::Tick() 行 4748 C++
[内联框架] UE4Editor.exe!EngineTick() 行 62 C++
UE4Editor.exe!GuardedMain(const wchar_t * CmdLine) 行 169 C++
UE4Editor.exe!WinMain(HINSTANCE * hInInstance, HINSTANCE
* hPrevInstance, char * __formal, int nCmdShow) 行 257 C++
[外部代码]

更新完,注册了ontouchstart 就挂了

FairyApplication 的GetTouchPosition(idx, 0); 调用这个导致的
onplay时将FAPP 存下来调用,不crash了 。
但是ontouchmove 事件不生效了。

commented

怎样重现,我看demo都运行正常

目前测下来我没有crash了。功能相关的问题,我再确定一下,有问题再另开好了