Paraview crash when opening xdmf file

Hello,

I have been looking for solutions to this problem on the forum but cannot find anything that works. I am using the dolfinx 0.8.0 docker image and Paraview 5.12.1, I generate a simple xdmf file with the following code but Paraview crashes when I try to render the results. Any help is appreciated.

import dolfinx
from mpi4py import MPI


mesh = dolfinx.mesh.create_unit_square(MPI.COMM_WORLD, 10, 10)

file = dolfinx.io.XDMFFile(
    mesh.comm,
    "example.xdmf",
    "w",
    encoding=dolfinx.io.XDMFFile.Encoding.ASCII
)

V = dolfinx.fem.functionspace(mesh, ("CG", 1))
v = dolfinx.fem.Function(V)
file.write_mesh(mesh)

v.name = "velocity"
file.write_function(v)
file.close()

I can reproduce the error on my system with paraview 5.13.0, but only if I load it with the XDMF Reader if I open with Xdmf3 Reader S then it opens without issue…

The readerT works in Paraview 5.11.0, but it is important to specify the encoding… thanks as usual @Stein for the help.

As far as I am aware, the DOLFINx XDMF output follows the Xdmf3 Read T schema, as we set blocks per time stamp, as discussed in: XMDF Reader names + XDMF2 Reader - #2 by Dave_DeMarle - ParaView Support - ParaView