New animationGroup.stop() approach causes complete tab freeze

Hello there! Recently I ran into problem with stopping the animationGroup in my application.

I’m not sure what actually happens, but after stopping the animationGroup with stop() method the tab gets completely crashed and I barely can close it. May sound like a memory leak to me but again I’m not sure about it.

When I faced this issue after updating the babylonjs package I started digging the release log and I actually have found the change that caused my problem - https://github.com/BabylonJS/Babylon.js/pull/13641. I tried to rework this approach a bit and eventually found the way in which my application doesn’t get completely messed up and of course I’ve considered the main idea behind the pull request and haven’t used the dispose method, but I don’t know if it’s worth a pull request since this problem is more likely to be an edge case and it’s actually caused by my code.

As you may understand I wasn’t able to reproduce this behaviour in the playground. Rely on your knowledge of the codebase and let me know if you need any additional info on this.

Adding @Deltakosh here who did the PR but it would be great if you could detail a bit the part which is hanging for you if you can not share a repro ???

I want to address it ASAP so anything would help here @noone :slight_smile:

Maybe this PR fixes your problem?

1 Like

YES! Just checked it locally and the fix is working on my end. Huge thanks to you @Evgeni_Popov and looking forward to new release.