Hi:
I'm using=20
gcc 3.3.2
libxml++ 0.26/0.27
commonc++2 / ptypes (pthread)
libxml2 v2.5.11.=20
I having a segmentation fault when using any kind of DomParser in a =
Thread code. The get_document returns a valid pointer (no-NULL), but =
get_root_node always returns NULL. (The xml document is valid) And i =
don't have more than one thread running.
If i execute the same code outside any thread it works.=20
I have also tried to use the xmlInitParser in the first instruction =
of my main, but nothing changes.
Any clue about this extrange behaviour?
Thanks in advance.
=20
From: Christophe de V. <cde...@al...> - 2003-11-12 17:33:14
gr...@te... wrote:
> Hi:
>
> I'm using
> gcc 3.3.2
> libxml++ 0.26/0.27
> commonc++2 / ptypes (pthread)
> libxml2 v2.5.11.
I've just upgraded to this version of libxml2 and I got the same problem :-(
I currently investigating this.
Cheers
Christophe
From: Christophe de V. <cde...@al...> - 2003-11-13 08:38:53
Christophe de VIENNE wrote:
> gr...@te... wrote:
>
>> Hi:
>>
>> I'm using
>> gcc 3.3.2
>> libxml++ 0.26/0.27
>> commonc++2 / ptypes (pthread)
>> libxml2 v2.5.11.
>
>
>
> I've just upgraded to this version of libxml2 and I got the same
> problem :-(
> I currently investigating this.
>
I found... When --with-threads is on in libxml2, which is the default
since 2.5.7, the callbacks we set in Init are set only for the main thread.
To enable them in all threads we have to use
xmlThrDefRegisterNodeDefault and xmlThrDefDeregisterNodeDefault in
addition to xmlRegisterNodeDefault and xmlDeregisterNodeDefault.
I will commit the patch in the CVS in a few minutes...
Cheers
Christophe
From: Fredrik A. <e97_far@e.kth.se> - 2003-11-12 21:15:56
On 2003.11.10 22:27, gr...@te... wrote:
> I have also tried to use the xmlInitParser in the first
> instruction of my main, but nothing changes.
xmlInitParser is called in Document::Init::Init(), so that should not
be necessary.
/Fredrik Arnerup