16-02-2022, 09:41 AM
(14-02-2022, 08:59 PM)pdinklag Wrote: I should probably also note that I recently disabled domain reloading; I made sure my entire project supports this and it works fine, but of course, I don't know about the effect this may have on Obi.
Domain reload disabling support has only been recently added in Obi 6.4. See:
http://obi.virtualmethodstudio.com/faq.html
Quote:Does it support Configurable Enter Play Mode?
Obi 6.4 and above do. Older versions do not support configurable enter play mode, since disabling domain reloading requires special handling of static data which wasn't available back then
Prior to 6.4 disabling domain reload would cause in runtime errors complaining about null collider/rigidbody references. It's unlikely that this is related to the issue at hand though. What Obi version are you using?
(14-02-2022, 08:59 PM)pdinklag Wrote: I see. I'm not sure what Unity does by itself, but the only unmanaged code I'm using apart from libOni (or the Burst backend) is the Steamworks API, and that wasn't being used (to my knowledge - I'll make sure about it). So whatever memory corruption occurs should be caused by Obi or Steamworks, I'm not that deep into Unity's Mono that I'd know what managed code could possibly cause this (I am not using any other Burst code either).
There's a pretty high chance that Obi is the culprit, however we can't rule out other reasons. I once had a specially nasty bug that only happened when installing Obi and Aura 2 together in the same project, had to be fixed by the Aura team.
(14-02-2022, 08:59 PM)pdinklag Wrote: I'm not enabling and disabling in FixedUpdate necessarily, but pretty much whenever. May this be an issue?
A long as you're not destroying colliders while Obi is updating the simulation (which happens during the ObiFixedUpdater's FixedUpdate() method) it should be fine. The only way to do this is during the solver's OnSubstep event. Are you using any of Obi's
callback events?
(14-02-2022, 08:59 PM)pdinklag Wrote: I keep the ObiRigidbodies enabled. Should I disable them as well?No need, colliders reference rigidbodies, not the other way around. A rigidbody that's referenced by no active collider isn't even accessed at runtime.
(14-02-2022, 08:59 PM)pdinklag Wrote: There may be occasions where I enable or disable an ObiCollider and they are destroyed in the same frame, at least I can't rule it out now. Could this cause desyncs of sort?Not that I'm aware of, Obi updates its internal collider/rigidbody representation once per FixedUpdate(). If you enable/disable colliders in the same Update for instance, Obi's physics engine will not even know.
(14-02-2022, 08:59 PM)pdinklag Wrote: I spotted some code for my characters that synchronizes the ObiRigidbodyies' kinematicForParticles flags with the rigidbodies' isKinematic state. That is leftover code which I just removed, because I decided I don't want any rope interaction when rigidbodies are kinematic. This also happened as often as characters were switching between control and ragdoll.
The difference between a kinematic rigidbody and a non-kinematic one is just the inertia tensor/mass values. Memory layout does not change so there's a very slim chance that this has anything to do with the issue.
I'm going to try and replicate this on an empty project, by creating a scene that generates lots of colliders and randomly enables/disables them at runtime. It's very unlikely this will successfully reproduce the issue, so if necessary would it be possible for you to share the project where this is happening so that I can take a closer look at it?
kind regards,