paraview crashing when using D3 filter

Hello,
I am having a strange behavior, I have a simulation with lagrangian particles in a parallel OpenFoam case, and I have the following script (end of post). as I want to eliminate the internal boundaries done by the processors, I wanted to use the D3 filter.
the thing is, that in my script if I use D3 filter over my data and show it (using the eye) for example use the ‘play’ button in paraview (once the script was runned in the python console) paraview crashes with the following error:

( 28.411s) [paraview ] vtkKdTree.cxx:789 ERR| vtkPKdTree (0xa252e40): vtkKdTree::BuildLocator - No cells to subdivide
error: exception occurred: Segmentation fault

if instead I use the object created from the OpenFOAMReader the issue does not happen.
the thing is that If i do this process in the GUI directly paraview does not crash, so it is a direct issue with my script, but with no information on the error I dont know where to beging.
the only culprit I can imagine is that one of the lagrangian particles (there are two groups) is non-existent (as it is a bubbling surface) in some time steps and this could generate problems.
outside of that I dont understant where is the issue (I am adding the data in the end of the post also but 100% that is something that I might have not defined or something in my script)

#######
# importing libraries
#######
from paraview.simple import *
import numpy as np
import os
import time
import sys
import subprocess
from paraview.servermanager import *
from vtk.numpy_interface import dataset_adapter as dsa
from paraview import python_view
imageResolution=[2832, 1053]

#######
# definition of variables
#######
foamFile='sim.foam'
casePath=str(__file__).replace('\\','/')
casePath=casePath.replace(casePath.split('/')[-1],'')
path=casePath+foamFile

#######
# creating different filters and reading case data
#######
simfoam = OpenFOAMReader(registrationName=foamFile, FileName=path)
try:
    simfoam.MeshRegions = ['internalMesh', 'lagrangian/cellCloud', 'lagrangian/bubbleCloud']
except:
    simfoam.MeshRegions = ['internalMesh', 'lagrangian/cellCloud']
    sys.exit(0)

try:
    os.makedirs(casePath+'/screenshots')
except:
    pass

animationScene1 = GetAnimationScene()
renderView1 = GetActiveViewOrCreate('RenderView')
renderView1.ResetActiveCameraToPositiveY()
renderView1.ResetCamera(-0.5, 0.5, -0.007799999788403511, 0.0, 0.0, 0.6899999976158142, True, 0.9)
renderView1.OrientationAxesVisibility = 0
renderView1.ViewSize = imageResolution

# recovering time step from args of script
try:
    timeForImage=float(sys.argv[1])
    animationScene1.AnimationTime = timeForImage
    fileName=sys.argv[1]
    print('setting time step to '+fileName)
except:
    # if no extra arg was given, it goes to last time step
    animationScene1.GoToLast()
    fileName='test'
    pass

# filter for removing internal boundaries in a parallel mesh
d31 = D3(registrationName='D31', Input=simfoam)

If I run this script select ‘show’ in the D3 filter and click over the play button paraview crashes with the error I quoted before, if I run exactly the same script with the D3 filter commented (last line) and repeat the operation there is no issue. something that I am missing in defining the D3 filter? (in a trace script i dont see anything different in regard to the D3 filter)
what I am missing?
here is the data:
https://filesender.renater.fr/?s=download&token=35a46012-723a-4cc5-b93e-e16a576db340

thanks in advance

Hi @otaolafr . It sounds to me like you are using D3 to generate ghost cells. As D3 is a legacy filter slated for removal in a future version of ParaView, I suggest trying Ghost Cells Generator instead for this purpose to see if it meets your needs and avoids the crash.

hello Cory,
I am using D3 to remove the internal boundaries of the processors in a openfoam decomposed case,
the ghost cell generator does not do this, here you can see the volumetric case (parallel) loaded, and in the left the .foam object (and the same visualization after ghost cell generator) and in the right the D3 filter.

regards

hello @cory.quammen any input in this regard? I have found that merge blocks filter solves this for this particular case when there are lagrangian particles and the mesh, but if there is only the mesh after merge blocks the processor boundaries are still there…

Hello,
after some months, and having back this problem, I looked again for a solution. it is not a clean one but it works. using the filter merge blocks will solve the issue of the display (if we display the mergeBlock geometry instead of the original openfoam case). on the side note to this, mergeBlock filter will not work if the internal mesh is loaded alone (actually if only one whatever block it is, is loaded) so, what we can do, is load a patch of the openfoam case among the internal mesh, then the mergeBlock filter will be possible to use, and then we can make the ‘clean’ display when the opacity is different to 0.
regards.