You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.
I am sometimes getting a null reference error in the function public PointOctreeNode<T> ShrinkIfPossible(float minLength)
on the first line of this block if (objects.Count == 0 && children.Length == 0) { return this; }
after calling PointOctree.Remove().
Attached is a screen of MonoDevelop hitting a break point in a test block I added. It appears that "objects" can have a count of 0 and "children" can be null at the same time. Note also that inserting this block appears to prevent the issue, but I'm concerned about what side effects it might have as I don't really have a good grasp of the inner workings here.
This occurs often but not always in my scenario (perhaps 30% of the time), and usually throws null reference errors for a number of frames before stopping. This is a somewhat elaborate project with a strong possibility of timing and chance influencing the scenario here.
I regret that I don't have a clean reproduction case for you :(
The text was updated successfully, but these errors were encountered:
I think you've found a legitimate bug there. Looks like the if (objects.Count == 0 && children.Length == 0) check should also be checking whether children is null. Your objects == null part should be unnecessary as objects is assigned right away and never cleared.
I am sometimes getting a null reference error in the function
public PointOctreeNode<T> ShrinkIfPossible(float minLength)
on the first line of this block
if (objects.Count == 0 && children.Length == 0) { return this; }
after calling PointOctree.Remove().
Attached is a screen of MonoDevelop hitting a break point in a test block I added. It appears that "objects" can have a count of 0 and "children" can be null at the same time. Note also that inserting this block appears to prevent the issue, but I'm concerned about what side effects it might have as I don't really have a good grasp of the inner workings here.
This occurs often but not always in my scenario (perhaps 30% of the time), and usually throws null reference errors for a number of frames before stopping. This is a somewhat elaborate project with a strong possibility of timing and chance influencing the scenario here.
I regret that I don't have a clean reproduction case for you :(
The text was updated successfully, but these errors were encountered: