Xdmf reader crashes: "entity reference loop"

Hello,

here’s an odd bug.

I’m trying to load a bunch of data stored in binary files via an Xdmf wrapper file.
I’ve been doing this for quite some time without much trouble, but here’s an Xdmf file that just won’t load and I have no Idea why.

A.xmf and B.xmf are loaded just fine, but A+B.xmf won’t load, although both A.xmf and B.xmf are contained in A+B.xmf.

B.xmf (81.4 KB) A.xmf (475.3 KB) A+B.xmf (479.5 KB)

01_select_file 02_select_reader

After loading A.xmf:

After loading B.xmf:

While loading A+B.xmf ParaView crashes:

/home/some/path/A+B.xmf:5645: parser error : Detected an entity reference loop
 <DataItem Dimensions="&Nx;" NumberType="Float" Precision="4" Format="XML">&xst;
                                                                               ^

Test: vary number of fields and grids

A+B.xmf contains five fields on four grids for roughly 100 times.
The number of data does not appear to be problematic, because all of the following files load fine:

Test: switch the order in which grids are written to the file

Here I switch the order in which grids are written to the file.
Interestingly, the error message points at the same line (5645) as before which is now a totally different entity. switched.xmf (500.5 KB)

/some/path/switched.xmf:5645: parser error : Detected an entity reference loop
 <DataItem Dimensions="&Nx;" NumberType="Float" Precision="4" Format="XML">&xce;
                                                                               ^

Test: without custom entities
Finally, a version identical to A+B.xmf but where grid data is explicitly written to file instead of using custom entities:
nocustomentities.xmf (11MB)
This file works just fine

Conclusion?

The handling of custom entities appears to be broken.
Anything else?

Best,
Bastian

I’ve filed an issue for this. Thanks for providing test files. I don’t know if I’ll have a chance to look at it myself, but it’s on our radar now.

1 Like