<div>I did that also i.e. call xmlInitParser only once in the constructor, but internally i.e xmlParseFile() calls xmlInitParser() and the application crashes. Kindly advise</div>
<div>regards</div>
<div>Yesh<br><br> </div>
<div><span class="gmail_quote">On 1/5/07, <b class="gmail_sendername">Daniel Veillard</b> <<a href="mailto:veillard@redhat.com">veillard@redhat.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">On Fri, Jan 05, 2007 at 11:22:15AM +0530, Yeshwanth C wrote:<br>> It appears that if the thread is switched to some other thread, these calls
<br>> to libxml2 all fail.<br>> Because when I ran the same code in a loop and checked the thread id, for<br>> successful runs, the thread ids were all the same.<br>> Could you tell me some way how to switch the thread back to the original
<br>> thread before calling these methods? or suggest some other solution?<br><br>Read !<br> <a href="http://xmlsoft.org/threads.html">http://xmlsoft.org/threads.html</a><br>xmlInitParser() must be called *only once* *in the main thread* !
<br>So please forget about calling it repeatedly on a timer loop on<br>different threads, it's completely wrong... and has nothing to do<br>with xmlsec, just the fact you didn't read the documentation, so<br>stop sending tons of mails about this on the list.
<br><br>Daniel<br><br>--<br>Red Hat Virtualization group <a href="http://redhat.com/virtualization/">http://redhat.com/virtualization/</a><br>Daniel Veillard | virtualization library <a href="http://libvirt.org/">http://libvirt.org/
</a><br><a href="mailto:veillard@redhat.com">veillard@redhat.com</a> | libxml GNOME XML XSLT toolkit <a href="http://xmlsoft.org/">http://xmlsoft.org/</a><br><a href="http://veillard.com/">http://veillard.com/</a> | Rpmfind RPM search engine
<a href="http://rpmfind.net/">http://rpmfind.net/</a><br></blockquote></div><br>