Re: [xml] xmlParseFile crashes with segmentation fault in Multithreaded Application



On 4/18/05, Manoj Kumar <manoj2kb yahoo co in> wrote:
Hi, 
  
Thank you for your reply. 
  
But no we don't use any such call. The first XML call that we make is
xmlParseFile from one of the sub threads it fails. Just to test if something
is wrong with our method we moved the call to main thread it works prefectly
fine. But our main thread is not supposed do any  xml related calls. Hence
we start using xml only in the subthread.  But we get segmentation fault
there. we also tried using xmlInitParser() in hte main thread even that does
not help. 

xmlInitParser() should always be called from the main thread
(http://xmlsoft.org/threads.html). Can you reproduce your problem with
a minimal example?

Best regards,
Aron

On Mon, 2005-04-18 at 01:20 -0700, Manoj Kumar wrote:
Hello everyone,

we have a multithreaded application. When we try call the xmlParseFile
function from the subthreads the call fails with segmentation fault.
However the call succeeds if done from the main thread. 

Can anybody help us around this problem and tell us how to and what
are the things to be followed when using xml in multithreaded
applications

Do you use xmlCleanupParser() in the thread's code? If yes, then
try to search for this function in the archives (e.g. [1]). It's
intended to be called only once in the main thread.

[1]
http://mail.gnome.org/archives/xml/2003-September/msg00241.html

Regards,

Kasimier


 ________________________________
Do you Yahoo!?
 Yahoo! Mail - Helps protect you from nasty viruses. 


_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xml gnome org
http://mail.gnome.org/mailman/listinfo/xml






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