It appears that if the thread is switched to some other thread, these calls
to libxml2 all fail.
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.
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?
Regards
Yeshwanth
On 1/5/07, Yeshwanth C <[EMAIL PROTECTED]> wrote:
I just debugged the code.
The error occurs at the following locations:-
xmlGenericErrorFunc *
__xmlGenericError(void) {
if (IS_MAIN_THREAD)
return (&xmlGenericError);
else
return (&xmlGetGlobalState()->xmlGenericError);
}
It goes there from here:-
" if ((xmlGenericError == xmlGenericErrorDefaultFunc) ||
(xmlGenericError == NULL))" inside xmlInitParser()
Regards
Yesh
On 1/5/07, Yeshwanth C <[EMAIL PROTECTED]> wrote:
>
> 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?
> Because if I call TimerRoutine directly from some function but not via
> CALLBACK it works ok.
>
>
>
> On 1/4/07, Aleksey Sanin <[EMAIL PROTECTED] > wrote:
> >
> > Well, I don't know exact reasons but it might be some
> > problems with MS initialization from time callback.
> > Can you find out where exactly does it crash?
> >
> > Aleksey
> >
> >
> > Yeshwanth C wrote:
> > > Hi
> > > When I use the timer functions :
> > > if (!CreateTimerQueueTimer(
> > > &hTimer, hTimerQueue, TimerRoutine, &arg , 10000, 0, 0))
> > > The TimerRoutine is fired.
> > > But TimerRoutine calls xmlInitParser via a function in a dll.
> > > xmlInitParser crashes with the following message:
> > > "The instruction at 0x7c8396d0 referenced memory at 0x00000014. The
> >
> > > memory could not be read"
> > >
> > > Any help greatly appreciated
> > > Regards
> > > Yesh
> > >
> > >
> > >
> > ------------------------------------------------------------------------
> > >
> > > _______________________________________________
> > > xmlsec mailing list
> > > [email protected]
> > > http://www.aleksey.com/mailman/listinfo/xmlsec
> >
>
>
_______________________________________________
xmlsec mailing list
[email protected]
http://www.aleksey.com/mailman/listinfo/xmlsec