Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  After update I get "ArgumentNullException: Value cannot be null"
#4
(08-12-2020, 03:26 PM)emz06 Wrote: The null argument error only happens in my current scene. But it does not happen if I open the demo scenes, or if I create a new scene, and place my prefab'ed solver from the problematic scene.

Does that give a clue of what is wrong?

Do you have references to null meshes in your scene? For instance, a MeshCollider taking no mesh as input? I think this might be a bug in Obi, caused by null meshes being passed to the collider system.

Edit: this is a bug in Obi indeed. Having a MeshCollider with no mesh input in the scene triggers it. To fix it, modify the GetOrCreateTriangleMesh() method in ObiTriangleMeshContainer.cs so that it starts like this:

Quote:ObiTriangleMeshHandle handle = new ObiTriangleMeshHandle(null);

if (source != null && !handles.TryGetValue(source, out handle))
{

Edit2: seems like this fix isn't working properly in some cases. Will spend a bit more time investigating and get back with a more robust fix.

Thanks for reporting this!
Reply


Messages In This Thread
RE: After update I get "ArgumentNullException: Value cannot be null" - by josemendez - 08-12-2020, 03:29 PM