Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  Null Ref error for some of 6.3 demos
#1
Hi.
I keep getting null ref errors from some of 6.3 demos. Right after importing the assets, they seemed to work but now I am receiving errors in some scenes and cannot run them properly. (Can play scenes but nothing rendered.)
The error I get is as below:

Quote: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.ThicknessBufferPass.Execute (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.RenderingData& renderingData) (at Assets/Obi/Scripts/Fluid/Rendering/URP/ObiFluidRendererFeature.cs:131)
UnityEngine.Rendering.Universal.ScriptableRenderer.ExecuteRenderPass (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.ScriptableRenderPass renderPass, UnityEngine.Rendering.Universal.RenderingData& renderingData) (at Library/PackageCache/com.unity.render-pipelines.universal@11.0.0/Runtime/ScriptableRenderer.cs:732)
UnityEngine.Rendering.Universal.ScriptableRenderer.ExecuteBlock (System.Int32 blockIndex, UnityEngine.Rendering.Universal.ScriptableRenderer+RenderBlocks& renderBlocks, UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.RenderingData& renderingData, System.Boolean submit) (at Library/PackageCache/com.unity.render-pipelines.universal@11.0.0/Runtime/ScriptableRenderer.cs:706)
UnityEngine.Rendering.Universal.ScriptableRenderer.Execute (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.RenderingData& renderingData) (at Library/PackageCache/com.unity.render-pipelines.universal@11.0.0/Runtime/ScriptableRenderer.cs:561)
UnityEngine.Rendering.Universal.UniversalRenderPipeline.RenderSingleCamera (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.CameraData cameraData, System.Boolean anyPostProcessingEnabled) (at Library/PackageCache/com.unity.render-pipelines.universal@11.0.0/Runtime/UniversalRenderPipeline.cs:391)
UnityEngine.Rendering.Universal.UniversalRenderPipeline.RenderSingleCamera (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Camera camera) (at Library/PackageCache/com.unity.render-pipelines.universal@11.0.0/Runtime/UniversalRenderPipeline.cs:301)
UnityEngine.Rendering.Universal.UniversalRenderPipeline.Render (UnityEngine.Rendering.ScriptableRenderContext renderContext, System.Collections.Generic.List`1[T] cameras) (at Library/PackageCache/com.unity.render-pipelines.universal@11.0.0/Runtime/UniversalRenderPipeline.cs:256)
UnityEngine.Rendering.RenderPipeline.InternalRender (UnityEngine.Rendering.ScriptableRenderContext context, System.Collections.Generic.List`1[T] cameras) (at <f7f0a900fdf94a2a9316bb3d4c5aa3e8>:0)
UnityEngine.Rendering.RenderPipelineManager.DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset pipe, System.IntPtr loopPtr, System.Collections.Generic.List`1[T] renderRequests, Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle safety) (at <f7f0a900fdf94a2a9316bb3d4c5aa3e8>:0)
UnityEngine.GUIUtilityLenguarocessEvent(Int32, IntPtr, Boolean&)
I confirmed all fluid demo still work without issue.

Do you have any idea what is causing this?

Unity 2021.1.18f1 URP
Obi 6.3
Reply
#2
Hi there!

I'm unable to reproduce this, haven't had any other reports either. All sample scenes of all 4 Obi assets work fine for me in Unity 2021, could you please send a repro project to support(at)virtualmethodstudio.com so that I can take a look?

thanks!
Reply
#3
The project contains only four obi assets and XR related packages but its' size is already exceed 1.8 GB so it is pretty difficult for me to upload it with my poor network connection.
I might try if I can reproduce it with smaller project when I have enough time though.

Now I am testing 6.3 with Unity 2019 and they are just great. While I was installing obi assets to Unity 2019, I was reminded that the Unity Editor had asked me to update obsoleted(or depreached) APIs of obi 6.3 assets and I had allowed to update. Do you think it relates to the issues I have in obi 6.3 in Unity 2021 URP?


Quote:All sample scenes of all 4 Obi assets work fine for me in Unity 2021,
Good news for me because I would like to use URP ver.10 or above since URP ver.7 lacks some essential features.

Could you please specify the exact version of Unity Editor, Burst and Jobs your are running obi 6.3 on? 
Reply
#4
(04-12-2021, 03:19 AM)Snail921 Wrote: The project contains only four obi assets and XR related packages but its' size is already exceed 1.8 GB so it is pretty difficult for me to upload it with my poor network connection.
I might try if I can reproduce it with smaller project when I have enough time though.

Now I am testing 6.3 with Unity 2019 and they are just great. While I was installing obi assets to Unity 2019, I was reminded that the Unity Editor had asked me to update obsoleted(or depreached) APIs of obi 6.3 assets and I had allowed to update. Do you think it relates to the issues I have in obi 6.3 in Unity 2021 URP?


Good news for me because I would like to use URP ver.10 or above since URP ver.7 lacks some essential features.

Could you please specify the exact version of Unity Editor, Burst and Jobs your are running obi 6.3 on? 

I'm experiencing this frustrating bug too unfortunately. I tried with several meshes including the simplest possible cube. Read/Write is enabled. Every time I push 'Generate' I get the NullReferenceException error at line 32 of ObiSoftbodyBlueprintBase which seems to be the first access to the positions array:

Code:
Vector3 v1 = positions[e1.endVertex]; // incrimiated line

Obi version is 6.4 in Unity 2019.4.35f
Reply
#5
(29-07-2022, 12:55 PM)TheRitcher Wrote: I'm experiencing this frustrating bug too unfortunately. I tried with several meshes including the simplest possible cube. Read/Write is enabled. Every time I push 'Generate' I get the NullReferenceException error at line 32 of ObiSoftbodyBlueprintBase which seems to be the first access to the positions array:

Code:
Vector3 v1 = positions[e1.endVertex]; // incrimiated line

Hi,

ObiSoftbodyBlueprintBase is an abstract class, so it doesn't implement any method (has only 10 lines). There's no line similar to the one you point to in either ObiSoftbodyBlueprintBase.cs or ObiSoftbodySurfaceBlueprint.cs.

Could you paste the entire error message you're getting? thanks!
Reply
#6
(29-07-2022, 12:59 PM)josemendez Wrote: Hi,

ObiSoftbodyBlueprintBase is an abstract class, so it doesn't implement any method (has only 10 lines). There's no line similar to the one you point to in either ObiSoftbodyBlueprintBase.cs or ObiSoftbodySurfaceBlueprint.cs.

Could you paste the entire error message you're getting? thanks!

Apologies, I wish I could undo my (first) post at this point. I was looking at the wrong class and we found the issue depended on an experimental modification we did to an Obi class. Thanks for responding anyway
Reply
#7
(29-07-2022, 02:44 PM)TheRitcher Wrote: Apologies, I wish I could undo my (first) post at this point. I was looking at the wrong class and we found the issue depended on an experimental modification we did to an Obi class. Thanks for responding anyway

No worries! let me know if I can be of any help.
Reply