MantisBT - ParaView
View Issue Details
0009582ParaViewBugpublic2009-09-22 03:342009-09-23 11:22
jhgoebbert 
Utkarsh Ayachit 
normalcrashalways
closedfixed 
3.6 
3.8 
0009582: XDMF with GeometryType="X_Y_Z" and Topology="3dRectMesh" fails
The following example segfaults - but it should not.

<?xml version="1.0" ?>
<!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" []>
<Xdmf Version="2.0">
  <Domain Name="test_geom">
    <Grid Name="SpatialCollection"
          GridType="Collection"
          CollectionType="Spatial">
      <Grid Name="1-1-1_t0.0" Type="Uniform">
        <Topology TopologyType="3DRectMesh"
                  NumberOfElements="512 512 512">
        </Topology>
        <Geometry GeometryType="X_Y_Z">
          <DataItem Name="X"
                    Format="HDF"
                    NumberType="Float"
                    Precision="8"
                    Dimensions="512">
                      test_geom.h5:/coordx
          </DataItem>
          <DataItem Name="Y"
                    Format="HDF"
                    NumberType="Float"
                    Precision="8"
                    Dimensions="512">
                      test_geom.h5:/coordy
          </DataItem>
          <DataItem Name="Z"
                    Format="HDF"
                    NumberType="Float"
                    Precision="8"
                    Dimensions="512">
                      test_geom.h5:/coordz
          </DataItem>
        </Geometry>
      </Grid>
    </Grid>
  </Domain>
</Xdmf>
I checked the same test-case without hdf5 but simple xml-dataitem => same segfault :(
No tags attached.
? test_geom.xmf (1,330) 2009-09-22 03:34
https://www.vtk.org/Bug/file/7478/test_geom.xmf
? test_geom.h5 (15,136) 2009-09-22 03:35
https://www.vtk.org/Bug/file/7479/test_geom.h5
Issue History
2009-09-22 03:34jhgoebbertNew Issue
2009-09-22 03:34jhgoebbertFile Added: test_geom.xmf
2009-09-22 03:35jhgoebbertFile Added: test_geom.h5
2009-09-22 10:39Utkarsh AyachitStatusbacklog => tabled
2009-09-22 10:39Utkarsh AyachitAssigned To => Utkarsh Ayachit
2009-09-22 10:39Utkarsh AyachitNote Added: 0017702
2009-09-22 10:39Utkarsh AyachitStatustabled => @80@
2009-09-22 10:39Utkarsh AyachitFixed in Version => 3.8
2009-09-22 10:39Utkarsh AyachitResolutionopen => fixed
2009-09-22 22:15Alan ScottNote Added: 0017723
2009-09-22 22:15Alan ScottStatus@80@ => @20@
2009-09-22 22:15Alan ScottResolutionfixed => reopened
2009-09-23 04:27jhgoebbertNote Added: 0017725
2009-09-23 08:47Utkarsh AyachitNote Added: 0017727
2009-09-23 08:53Utkarsh AyachitNote Added: 0017728
2009-09-23 08:53Utkarsh AyachitStatus@20@ => @80@
2009-09-23 08:53Utkarsh AyachitResolutionreopened => fixed
2009-09-23 11:22Alan ScottNote Added: 0017733
2009-09-23 11:22Alan ScottStatus@80@ => closed

Notes
(0017702)
Utkarsh Ayachit   
2009-09-22 10:39   
Complain when RectMesh does not have the correct type of
geometry instead of segfaulting. Also added support for geometry types VXVY and
DXDY.

/cvsroot/ParaView3/ParaView3/Utilities/Xdmf2/vtk/vtkXdmfHeavyData.cxx,v <-- Utilities/Xdmf2/vtk/vtkXdmfHeavyData.cxx
new revision: 1.11; previous revision: 1.10
(0017723)
Alan Scott   
2009-09-22 22:15   
Why are you writing to the calling xterm, shouldn't this output be sent to the output window? If a user is on XP, and is running ParaView from the GUI, she will never see the error. How about sending to the output window?
(0017725)
jhgoebbert   
2009-09-23 04:27   
What do you mean with "Complain when RectMesh does not have the correct type of
geometry instead of segfaulting."?

Will 3DRectMesh not support geometry type X_Y_Z (if yes, why not)?
(0017727)
Utkarsh Ayachit   
2009-09-23 08:47   
This reader is still under active development and hence all the error messages are still on xterm. A final step in finishing of the reader will be post these error messages as standard VTK errors.
(0017728)
Utkarsh Ayachit   
2009-09-23 08:53   
Rectilinear mesh will not support X_Y_Z. You actually don't need X_Y_Z for rectilinear meshes, you are indeed specifying the locations along the 3 axes right, not the point coordinates for each point location. In that case you indeed want to use VXVYVZ.

X_Y_Z is used for 3 arrays with point location for each and every point, in which case you'll need (512*512*512) elements in each of your arrays. For rectilinear grids, you don't do that. You simply specify the locations along each axis, hence you only need 512 elements in each array -- which is what you are doing and that should be denoted using geometry type VXVYVZ.

In your example, just change to GeometryType="VXVYVZ" and it loads just fine in ParaView.
(0017733)
Alan Scott   
2009-09-23 11:22   
Tested, code doesn't seg fault - but rather complains as expected.

Tested local server, trunk.