XDMF File Crashing in Paraview

Dear All,

I’m facing the issue that everytime i open the xdmf file in Paraview it crashes. I know many others have also faced this issue , I tried their remedies but it doesn’t seem to work. I’m using the fenics version-2019.10 . I’ve attached the relevant part of the code below:

mesh=df.UnitSquareMesh(64,64)
FS=df.FunctionSpace(mesh,‘P’,1)
phi_0=df.Function(FS)
phi_1=df.Function(FS)
v=df.TestFunction(FS)

ConcFile=df.XDMFFile(‘conc.xdmf’)
ConcFile.parameters[“flush_output”]=True
for steps in range(num_steps):
t+=dt
df.solve(form==0,phi_1)
phi_0.assign(phi_1)
if(num_steps%100==0):
ConcFile.write(phi_0,t)
test<<(phi_0,t)

Which reader are you using (see: Saving multiple functions in one file to visualize it - #7 by dokken) and what version of paraview?

@dokken I’m using paraview-5.10.1 and xdmf reader -S and T both seem to crash. While xdmf reader does not crash but cannot read the data.

I once faced the same issue. It was due to a too long folder name, that i saved the xdmf and h5 files in.

Looking at similar issues with Fenicsx and came across this
Cannot open .xdmf files in legacy version of fenics + latest Paraview
which might be helpful for you.

I agree that this might be the issue, to confirm this, we would need to see the content of the xdmf file.