Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  Invalid memory access using Burst backend
#8
(18-02-2022, 11:41 AM)pdinklag Wrote: IMO, the real issue here is that the materialIndex of a collider shape is (auto-)initialized as zero - a completely invalid value in my case where I don't use Obi collision materials - when it should be -1 to indicate "none (yet)". This can easily be fixed in ObiColliderHandle.CreateCollider. I just tried this and was unable to provoke the error again, so that may be the simple solution. I'll do a longer playtest in a build later.

Code:
colliderShapes.Add(new ColliderShape() { materialIndex = -1 });

It's been quite a while now and I have never experienced this crash again, so this actually seems to have been the problem. It also explains why both Burst and libOni were affected. Luckily, the fix is that easy and you may want to incorporate this into Obi. Thanks for the hints to get to the bottom of this!
Reply


Messages In This Thread
RE: Invalid memory access using Burst backend - by pdinklag - 24-04-2022, 08:51 AM