lodo1995 / experimental.xml

A replacement of Phobos std.xml
https://lodo1995.github.io/experimental.xml
Boost Software License 1.0
20 stars 8 forks source link

Infinity loop #35

Closed anton-dutov closed 8 years ago

anton-dutov commented 8 years ago

Some times, got infinity loop

import std.stdio;
import std.experimental.xml;

void main()
{
    auto content = import("1.xml");
    auto domBuilder = chooseParser!content.cursor.domBuilder;

    domBuilder.setSource(content);
    domBuilder.buildRecursive;

    auto dom = domBuilder.getDocument;
    auto lst = dom.getElementsByTagName("eb:MessageHeader");

    writeln(lst.length);
}
lodo1995 commented 8 years ago

I guess it's inside getElementsByTagName. Does it fail consistently when fed the same file? If the input file that causes the issues is small, could you upload it?

anton-dutov commented 8 years ago

Complex example from https://developer.sabre.com, stuck every time DMD64 D Compiler v2.071.2 dependency "std-experimental-xml" version="~>0.1.2"

1.xml.zip

jmdavis commented 7 years ago

Oh. I just ran into this issue. Thanks for fixing it. :)

It would be nice if we could get another tagged release one of these days soon though, since dub now seems allergic to using ~master and complains when you do.