Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.26.2 Python 3.7 Crash When call bind_event in uep #873

Open
zhuqhang opened this issue Nov 20, 2021 · 2 comments
Open

4.26.2 Python 3.7 Crash When call bind_event in uep #873

zhuqhang opened this issue Nov 20, 2021 · 2 comments

Comments

@zhuqhang
Copy link

This is my Crash log
[2021.11.20-09.47.42:845][301]LogWindows: Error: [Callstack] 0x00007fff1bf6ac13 UE4Editor-UnrealEnginePython-0001.dll!ue_bind_pyevent() [F:\Ue4Project\UePythonTutorial\UePythonTutorial\Plugins\UnrealEnginePython-20210923\Source\UnrealEnginePython\Private\UEPyModule.cpp:4471] [2021.11.20-09.47.42:845][301]LogWindows: Error: [Callstack] 0x00007fff1bfbb1cf UE4Editor-UnrealEnginePython-0001.dll!py_ue_bind_event() [F:\Ue4Project\UePythonTutorial\UePythonTutorial\Plugins\UnrealEnginePython-20210923\Source\UnrealEnginePython\Private\UObject\UEPyObject.cpp:1760]

debug found this
FORCEINLINE TArray(const TArray& Other) { CopyToEmpty(Other.GetData(), Other.Num(), 0, 0); }
then crashed ??
How fix it?? Please help me !

@F-DR
Copy link

F-DR commented Feb 26, 2022

i has the same situation

@kprimo
Copy link

kprimo commented Mar 21, 2022

try this to fix the problem:

  1. find the cpp file UEPyModule.cpp, replace if (auto casted_prop = Cast<UMulticastDelegateProperty>(u_property)){...} code around line#3064 to these code:
if (auto casted_prop = Cast<UMulticastDelegateProperty>(f_property))
{
	FScriptDelegate script_delegate;
	UPythonDelegate* py_delegate = FUnrealEnginePythonHouseKeeper::Get()->NewDelegate(u_obj->ue_object, py_callable, casted_prop->SignatureFunction);
	// fake UFUNCTION for bypassing checks
	script_delegate.BindUFunction(py_delegate, FName("PyFakeCallable"));

	casted_prop->AddDelegate(script_delegate, u_obj->ue_object);
}

refer to #801 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants