<div>It appears that if the thread is switched to some other thread, these calls to libxml2 all fail.</div>
<div>Because when I ran the same code in a loop and checked the thread id, for successful runs, the thread ids were all the same.</div>
<div>Could you tell me some way how to switch the thread back to the original thread before calling these methods? or suggest some other solution?</div>
<div>Regards</div>
<div>Yeshwanth<br><br> </div>
<div><span class="gmail_quote">On 1/5/07, <b class="gmail_sendername">Yeshwanth C</b> <<a href="mailto:cyeshwanth@gmail.com">cyeshwanth@gmail.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>I just debugged the code.</div>
<div>The error occurs at the following locations:-</div>
<div> </div>
<div>xmlGenericErrorFunc *<br>__xmlGenericError(void) {<br> if (IS_MAIN_THREAD)<br> return (&xmlGenericError);<br> else<br> return (&xmlGetGlobalState()->xmlGenericError);<br>}</div>
<div> </div>
<div>It goes there from here:-</div>
<div>" if ((xmlGenericError == xmlGenericErrorDefaultFunc) ||<br> (xmlGenericError == NULL))" inside xmlInitParser()</div>
<div> </div>
<div>Regards</div>
<div>Yesh</div>
<div><span class="e" id="q_10ff0c37ea5c8b0c_1">
<div><br><br> </div>
<div><span class="gmail_quote">On 1/5/07, <b class="gmail_sendername">Yeshwanth C</b> <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:cyeshwanth@gmail.com" target="_blank">cyeshwanth@gmail.com</a>
> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>TimerRoutine is the CALLBACK function where xmlInitParser() is called. Now at the particular time interval say 10 seconds TimerRoutine is called. When xmlInitParser() call is reached it gives the error. If the callback comes on a different thread, will xmlInitParser() crash?
</div>
<div>Because if I call TimerRoutine directly from some function but not via CALLBACK it works ok.</div>
<div><span>
<div><br><br> </div>
<div><span class="gmail_quote">On 1/4/07, <b class="gmail_sendername">Aleksey Sanin</b> <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:aleksey@aleksey.com" target="_blank">aleksey@aleksey.com</a>
> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Well, I don't know exact reasons but it might be some<br>problems with MS initialization from time callback.
<br>Can you find out where exactly does it crash?<br><br>Aleksey<br><br><br>Yeshwanth C wrote:<br>> Hi<br>> When I use the timer functions :<br>> if (!CreateTimerQueueTimer(<br>> &hTimer, hTimerQueue, TimerRoutine, &arg , 10000, 0, 0))
<br>> The TimerRoutine is fired.<br>> But TimerRoutine calls xmlInitParser via a function in a dll.<br>> xmlInitParser crashes with the following message:<br>> "The instruction at 0x7c8396d0 referenced memory at 0x00000014. The
<br>> memory could not be read"<br>><br>> Any help greatly appreciated<br>> Regards<br>> Yesh<br>><br>><br>> ------------------------------------------------------------------------<br>><br>
> _______________________________________________<br>> xmlsec mailing list<br>> <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:xmlsec@aleksey.com" target="_blank">xmlsec@aleksey.com</a><br>
> <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.aleksey.com/mailman/listinfo/xmlsec" target="_blank">http://www.aleksey.com/mailman/listinfo/xmlsec </a><br></blockquote></div><br></span></div>
</blockquote></div><br></span></div></blockquote></div><br>