Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  After update I get "ArgumentNullException: Value cannot be null"
#5
(08-12-2020, 03:29 PM)josemendez Wrote: 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:


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!

Thanks for that.
I did check all my mesh colliders, and I didn't find one which was null.

Even with your modification, I am getting a NullReferenceException *at the same moment* that I press the Play button (that is: BEFORE the scene is played):
(then I get this exception once per frame)


NullReferenceException: Object reference not set to an instance of an object
Obi.ObiParticleRenderer.get_ParticleMeshes () (at Assets/Obi/Scripts/Common/Rendering/ObiParticleRenderer.cs:27)
Obi.FluidRenderingUtils.VolumeReconstruction (UnityEngine.Rendering.CommandBuffer cmd, Obi.FluidRenderingUtils+FluidRenderTargets renderTargets, UnityEngine.Material thickness_Material, UnityEngine.Material colorMaterial, Obi.ObiParticleRenderer[] renderers) (at Assets/Obi/Scripts/Fluid/Rendering/FluidRenderingUtils.cs:137)
Obi.ObiFluidRenderer.UpdateFluidRenderingCommandBuffer () (at Assets/Obi/Scripts/Fluid/Rendering/ObiFluidRenderer.cs:118)
Obi.ObiBaseFluidRenderer.OnPreRender () (at Assets/Obi/Scripts/Fluid/Rendering/ObiBaseFluidRenderer.cs:80)
UnityEngine.GUIUtility: ProcessEvent(Int32, IntPtr) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:197)

EDIT:
I think it has to do with the script ObiKinematicVelocities.cs, which seems to have been removed in the new version.

I was using this on one of the objects, because I had a fast moving platform, moving sideways, and I wanted to translate the particles on that platform. 
Is there an alternative to ObiKinematicVelocities.cs?
Reply


Messages In This Thread
RE: After update I get "ArgumentNullException: Value cannot be null" - by emz06 - 08-12-2020, 04:52 PM