VitorCantao / ZeldaBotwClimbingSystem

Code used on the Climbing System Tutorial for Unreal C++.
https://www.vitorcantao.com/
MIT License
76 stars 20 forks source link

UE5 - Crash when moving character #2

Open arkanos opened 1 year ago

arkanos commented 1 year ago

Hi! First of all, thank you so much for sharing such a great system!

I was trying to implement it on a new UE5 project but after doing all the setup, adding the character BP to the map and trying to move ingame, engine crashes with the following error:

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000000000001c4

UnrealEditor_Dwarf!UClimbComponent::IsClimbing() [D:\Unreal Projects\DWARF\Source\Dwarf\CustomComponents\ClimbComponent.cpp:471]
UnrealEditor_Dwarf!ADwarfCharacter::MoveRight() [D:\Unreal Projects\DWARF\Source\Dwarf\DwarfCharacter.cpp:110]
UnrealEditor_Dwarf!TBaseUObjectMethodDelegateInstance<0,ADwarfCharacter,void __cdecl(float),FDefaultDelegateUserPolicy>::Execute() [D:\UE_5.0\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:594]
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
kernel32
ntdll

It seems that somehow, MovementComponent (ClimbComponent in my case) is null when Character class tries to make use of it.

I've checked the comments in the blog about it but with no avail, as no answer on how they fixed it was available, unfortunately.

Any idea what could be wrong?

I'm adding the code in here just in case I've missed something.

https://gist.github.com/arkanos/d5edbd60afc11a5931f96eae66038535

Any help would be very much appreciated!

why470 commented 4 months ago

did you ever fix this? I am having the same issue