Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Possible memory leak?
#2
(24-03-2021, 03:11 AM)LogaNRV Wrote: Hi

I recently found that a memory leak in my scene stops if I disable the Obi solver.
I intend to try to reproduce this in a new smaller scene later, to do a better report, but for now I would like your opinion about this.

I'm using the last Obi version, in the last Unity 2019.4.22, and Windows 7 (64 bit).
My scene has 3 Obi clothes, each near an Obi Spherical Force (to simulate wind), and also around 20 gameobjects with Obi colliders and Obi rigidbodies (all of them Non Kinematic to particles).
I also have the Obi rope an Obi softbody assets in the project, but haven't added any of those elements yet.

The solver is configured like this:


The Obi force is like this: (if I disable the gameobjects with these forces the leak still happens, so I don't think they are related)


The leak happens in the editor and in PC builds, and you could say that it "eats" 1GB of ram in something like 200 seconds, so the application ends crashing after some time.

Hi there!


I'm unable to spot any leaks in my tests. Can you share a screenshot of the profiler in memory mode? I can't think of any potential memory leaks, specially not when using the Burst backend as everything is C#. Data arrays for the solver are lazily allocated once when first used, then destroyed together with the solver. There's no native allocations being made every frame.

(24-03-2021, 03:11 AM)LogaNRV Wrote: This is for some of the objects that have Obi colliders and Obi rigidbodies.
If you have an Obi solver maybe you need to have at least some Obi particles in the scene?

It shouldn't matter whether you have particles or not in the solver, it's not required. These errors don't seem to be related to the solver or particles, but the ObiRigidbody component.

Setting invalid (Infinite, NaN) velocity values to a rigidbody will cause Unity to spew these errors. Every frame ObiRigidbody reads the velocity value, adds or subtracts from it, then assigns it back. If the value was invalid to begin with, this error will also be triggered upon trying to assign the velocity back. Can you describe how are your rigidbodies set up? (do they have joints of any kind, are there other scripts setting forces/impulses/velocities?)
Reply


Messages In This Thread
Possible memory leak? - by LogaNRV - 24-03-2021, 03:11 AM
RE: Possible memory leak? - by josemendez - 24-03-2021, 08:54 AM
RE: Possible memory leak? - by LogaNRV - 25-03-2021, 03:07 AM
RE: Possible memory leak? - by josemendez - 26-03-2021, 08:59 AM
RE: Possible memory leak? - by LogaNRV - 27-03-2021, 02:15 AM
RE: Possible memory leak? - by josemendez - 29-03-2021, 09:57 AM
RE: Possible memory leak? - by LogaNRV - 29-03-2021, 11:04 PM
RE: Possible memory leak? - by flintza - 13-01-2022, 01:24 PM
RE: Possible memory leak? - by josemendez - 14-01-2022, 08:48 AM
RE: Possible memory leak? - by litefeel - 07-03-2022, 01:13 PM
RE: Possible memory leak? - by josemendez - 07-03-2022, 01:23 PM
RE: Possible memory leak? - by SpiralCircus - 14-03-2022, 02:27 PM
RE: Possible memory leak? - by josemendez - 14-03-2022, 02:38 PM
RE: Possible memory leak? - by SpiralCircus - 14-03-2022, 02:57 PM
RE: Possible memory leak? - by josemendez - 17-03-2022, 09:38 AM