Dtd_property' expected, found `entities(_)'

Hello,

I have a program analyzing some 1000 files using concurrent_maplist. It worked fine until recently, but now I get from time to time such an error in random places:

Domain error: dtd_property’ expected, found entities(_37838)'

I don’t see where this is coming from, because I don’t read or write XML code. HTML I just write using format. So I suppose it may some SWI internal issue introduced with a recent version?

I’m now using:

SWI-Prolog version 9.0.4 for x86_64-linux

1 Like

I just found, that I use xml_quote_cdata in one place. So it may be related to the issue.

I can’t say what you are using, but the error comes from dtd_property/2, which surely is not used by xml_quote_cdata/3. xml_quote_cdata/3 is thread safe, but dtd_property/2 turned out to have a race condition when used for the first time from multiple threads that explains this error. Pushed a fix.

2 Likes