# XDMF3 reader fails to read X\_Y\_Z Geometry

**URL:** https://discourse.paraview.org/t/xdmf3-reader-fails-to-read-x-y-z-geometry/1530
**Category:** ParaView Support
**Created:** [March 26, 2019, 12:49pm UTC](https://discourse.paraview.org/t/xdmf3-reader-fails-to-read-x-y-z-geometry/1530 "2019-03-26T12:49:08Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Marcin\_Krotkiewski](https://discourse.paraview.org/user_avatar/discourse.paraview.org/marcin_krotkiewski/32/2185_2.png) [@Marcin\_Krotkiewski](https://discourse.paraview.org/u/Marcin_Krotkiewski)
#### Post date: [March 26, 2019, 12:49pm UTC](https://discourse.paraview.org/t/xdmf3-reader-fails-to-read-x-y-z-geometry/1530/1 "2019-03-26T12:49:08Z")

</div>

The following problem is observed using Paraview 5.5.1. The attached file defines a single-cell quadrilateral grid. The Geometry is specified using separate arrays for each coordinate (`X_Y_Z`). This loads just fine with the version 2 reader, but fails with the XDMF3 reader with the following segfault:

```auto
Skipping unrecognized array type [None]
Segmentation fault (core dumped)

```

[bad\_xyz.xdmf](https://discourse.paraview.org/uploads/default/original/2X/3/3e270c504b73baf2f04f897ac92c0404a58b5ed7.xdmf) (712 Bytes)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [March 29, 2019, 10:34am UTC](https://discourse.paraview.org/t/xdmf3-reader-fails-to-read-x-y-z-geometry/1530/2 "2019-03-29T10:34:37Z")

</div>

Your .xdmf file does not validate against [Xdmf.dtd](https://gitlab.kitware.com/xdmf/xdmf/blob/master/Xdmf.dtd)

`bad_xyz.xdmf:5: element Topology: validity error : No declaration for attribute NumberOfElements of element Topology`

Once again, it looks like Xdmf2 reader may be just more lenient here.  
The segfault is still not good anyway, and should be fixed.

---

<div class="post-metadata">

### Author: ![Marcin\_Krotkiewski](https://discourse.paraview.org/user_avatar/discourse.paraview.org/marcin_krotkiewski/32/2185_2.png) [@Marcin\_Krotkiewski](https://discourse.paraview.org/u/Marcin_Krotkiewski)
#### Post date: [March 29, 2019, 11:58am UTC](https://discourse.paraview.org/t/xdmf3-reader-fails-to-read-x-y-z-geometry/1530/3 "2019-03-29T11:58:17Z")

</div>

@mwestphal The `NumberOfElements` attribute of the `Topology` element is copied directly from an example in the [xdmf documentation](http://xdmf.org/index.php/XDMF_Model_and_Format)

```auto
<Topology TopologyType="Quadrilateral" NumberOfElements="2">
    <DataItem Format="XML" DataType="Int" Dimensions="2 4">
[...]
    </DataItem>
</Topology>

```

So either the doc is wrong, or the DTD. Still, when I remove this attribute, nothing changes in Paraview’s behavior:

```auto
Skipping unrecognized array type [None]
Segmentation fault (core dumped)

```

[bad\_xyz\_fix1.xdmf](https://discourse.paraview.org/uploads/default/original/2X/6/6a6778bbea240f7112b71ee95b03bd108c3be0c2.xdmf) (691 Bytes)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [March 29, 2019, 2:00pm UTC](https://discourse.paraview.org/t/xdmf3-reader-fails-to-read-x-y-z-geometry/1530/4 "2019-03-29T14:00:45Z")

</div>

maybe @Dave_DeMarle knows.
