Crash when extending UCharacterMovementComponent:

I’m trying to incorporate a plugin on github called PredictedMovement to a small project of mine, which extends the CMC and derives from UCharacterMovementComponent and ACharacter to include abilities such as to sprint, prone, and to have stamina.

If you read the source code of the plugin on github, I followed the link branch and read the README to set-up things correctly. I have my custom character class inheriting from ASprintCharacter, and I’m using AStaminaMovement as my movement component.

The project builds successfully, but when I start a game (PIE) with a listen server and a client, I immediately crash during the assembly, the only thing I get from the debugger is that it encountered an exception, access violation reading location… And on the threads, I notice FRootMotionSourceGroup::HasActiveRootMotionSources(void)const __ptr64 0x00007ffb31efda20.

I know it’s not easy to determine what exactly is causing it, especially when I’m not showing my own code, but that’s due to it being thousands of lines, but I would like to at least understand what doesFRootMotionSourceGroup::HasActiveRootMotionSources(void)const __ptr64 0x00007ffb31efda20 have to do with the crash if it even does, that way, I can probably get closer to where I messed up.

image

Greetings @Spesful

I’d be happy to take a look at the crash and see if we can find a solution. Do you have a crash log for this? Thanks! I’ll monitor the thread.

Hi there, sorry I missed your reply! The problem turned out to be due to the character blueprint I used being corrupted, where this UCharacterMovementComponent lived. I don’t recall exactly what corrupted it. But anyway, once I made a new character bp (of course inheriting from my C++ class), I didn’t encounter the crash. Hopefully this’ll help someone in the future.

Awesome! I’m glad that you got it fixed. Thanks for posting!