Re: libxml++: interactive read state loop



You subscribe here: https://mail.gnome.org/mailman/listinfo/libxmlplusplus-list

I made some quick tests with the libxml++ example program at https://git.gnome.org/browse/libxml++/tree/examples/textreader

I added code to see the node type and read state after each call to reader.read():
      std::cout << "node_type: " << reader.get_node_type() << std::endl;
      std::cout << "read_state: " << reader.get_read_state() << std::endl;

When a small file is read, the state is EndOfFile all the time. Probably the program reads a block of data from the input file, and reader.read() then reads a node at a time from internal memory. When I added some kilobytes of blank space here and there in the input file, the state is Interactive most of the time, until it becomes EndOfFile. Interactive seems to be the normal state until the last block has been read from the file. Have you seen other read states when your program does not run into an infinite loop?

Kjell

2014-03-12 10:53, Aleksei Artemev skrev:
Hi Kjell,

I am not subscribed I think and also not sure why it was delayed :( How can I? Anyway, I have not done any fix yet to handle type None, but the problem is what I cant provide you with the input file (buffer) since we did not log it when we've got into such condition. I believe Interactive state is one of the keys to that root cause. So far, our server did not enter same loop again, but it can happen anytime. How Interactive state is triggered in the library?

PS. Thanks for your response!

Aleksei.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]