"Does Armory3D’s physics engine have a memory leak issue?! Has it been fixed now?"

“Does Armory3D’s physics engine have a memory leak issue?! Has it been fixed now?”
I’m developing a billiards game, but once during testing, I stepped away and came back to find an “out of memory” error. When I checked Task Manager, I saw the memory usage kept climbing until it crashed the game. After some research, I learned this is called a “memory leak.” Is this an issue with my personal setup, or is it a bug in the engine? While a single game might not exhaust the memory, over time—even if I do nothing—the game eventually crashes with an error. Could any experts here advise me on how to resolve this? I’d be incredibly grateful for your help! :sob: :scream:

Maybe it’s my fault—or maybe it’s an issue with my programming approach. Could there be an infinite loop running somewhere? Or is it a problem with the physics engine? I honestly have no idea. :thinking:

But after thinking about it for a long time, I’ve fixed the issue where memory kept rising until the program crashed due to insufficient memory. Now, every time I aim, I remove the rigidbody components from all objects instead of just setting them all to static. Before hitting the ball, I restore all the rigidbodies. :rofl:

After testing, even when left running for a long time, the memory usage stays stable. So far, this solution seems to work. But what about games like pinball, where rigidbodies need to be in constant collision? :roll_eyes:

Is it really just my problem? I’m a bit too excited—I’ve finally finished my first game!
:face_with_hand_over_mouth:

:face_with_monocle:It appears that the “Rigid Body” in Armory3D’s logic nodes functions differently from Blender’s rigid body system. Armory3D’s version includes angular friction but lacks interpolation. Additionally, the rigid body properties in the logic nodes must have “CCD” (Continuous Collision Detection) enabled to correctly handle bouncing effects. If you only configure the rigid body using Blender’s native settings, errors may occur. Could the memory leak I encountered earlier be caused by using Blender’s built-in rigid body properties instead?
:thinking:

After testing, I found the issue was on my end. If I use the rigid body nodes in Armory3D for setup, there won’t be any memory leaks. I’ll remember this: Don’t use Blender’s built-in rigid body physics system, as it causes memory leaks. :tired_face:

I’ve encountered another strange issue. If I minimize the current program, both CPU usage and memory usage start to rise continuously, even after all rigid body properties of objects in the scene have been removed.

When I restore the window, the CPU usage returns to normal, but the memory usage stops increasing. However, it doesn’t get released. Each time I minimize the window, the memory increase accumulates and continues to grow, eventually leading to insufficient memory. What could be the cause of this?

Does anyone know and would be willing to explain it to me?
:sob: