-
Notifications
You must be signed in to change notification settings - Fork 671
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
Crash inUSProjectileMovementComponent::Reset() #12
Comments
Thanks for reaching out!
Have you made sure the class you're working with has the Pooling Interface
implemented?
…On Tue, Dec 5, 2023, 9:45 a.m. mss10001 ***@***.***> wrote:
Due to the pooling system you can get a crash in
USProjectileMovementComponent::Reset(). We need to check with
HasbeenInitialized() if the movement component is already initialized
before initializating it again.
// Properly resets velocities and rotations
if (HasBeenInitialized())
{
UninitializeComponent();
}
InitializeComponent();
—
Reply to this email directly, view it on GitHub
<#12>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQJCQNK5X4AMGYSUJECNIWTYH3UL7AVCNFSM6AAAAABAHL664GVHI2DSMVQWIX3LMV43ASLTON2WKOZSGAZDKNZXG42DANA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I recently cloned the project and have not changed anything just testing the latest version where i got the crash shortly after start. |
Hi! How are you able to create this crash. I tried spawning hundreds of them and have yet to crash on this. |
Thanks for the additional info, this is helpful. I still haven't been able to reach this crash myself. I'll keep an eye on this since I'd like to find out why this could even fail rather than just adding that safety check without fully understanding why it's not properly uninitializing. |
Due to the pooling system you can get a crash in USProjectileMovementComponent::Reset(). We need to check with HasbeenInitialized() if the movement component is already initialized before initializating it again.
// Properly resets velocities and rotations
if (HasBeenInitialized())
{
UninitializeComponent();
}
The text was updated successfully, but these errors were encountered: