[xml] xmlParseDoc in thread => Segfault
- From: "Morten W. J." <morten newtec dk>
- To: xml gnome org
- Subject: [xml] xmlParseDoc in thread => Segfault
- Date: Fri, 29 Oct 2004 08:30:58 +0200
Hello.
Using kernel 2.4, gcc version 3.2, libXml2 2.6.7, libc 2.3.1 and libpthread
0.10 (Can that really be??) we have a threaded application running displaying
a user interface on a framebuffer. The user interacts with a UI_thread and
manipulates some settings which are read and stored as XML - hence the use of
libXml2. The UI system typically has a "page" for each logically portion of
the settings. "Pages" can call subpages and return to their own parent page.
The root page runs in seperate thread (the UI_thread) and the main() routine
loops infinte after spawning three threads.
Now, if we issue a xmlParseFile() ANY place within the UI_thread, that is
AFTER a spawn, the application segfaults. If we comment out that single line
the application runs without problems.
If we issue a xmlParseFile() ANY place in the main (before or after spawning,
in the main loop or before) there is no problem and the XML file gets parsed
as expected.
It seems that :
xmlParseFile, in our case, cannot be called in a thread, although only that
thread uses libXml(!!!, so it is probably not a thread problem in the common
sense)
Is anybody having any input on that case?
regards, Morten
P.S.: The file being parsed exists and is well formed xml - tests fron within
the code (open and read) confirms that.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]