[xmlsec] xmlInitParser() crashes when timer functions are used like CreateTimerQueueTimer()

Yeshwanth C cyeshwanth at gmail.com
Thu Jan 4 21:38:01 PST 2007


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 <cyeshwanth at gmail.com> 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 <aleksey at aleksey.com> 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
> > > xmlsec at aleksey.com
> > > http://www.aleksey.com/mailman/listinfo/xmlsec
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.aleksey.com/pipermail/xmlsec/attachments/20070105/d0421afd/attachment-0002.htm


More information about the xmlsec mailing list