Re: [xml] XPath - crashing using xmlXPathCompiledEval (problem within xmlXPathCtxtCompile?) - long
- From: Daniel Veillard <veillard redhat com>
- To: Andrew Nelson <andyfaff gmail com>
- Cc: xml gnome org
- Subject: Re: [xml] XPath - crashing using xmlXPathCompiledEval (problem within xmlXPathCtxtCompile?) - long
- Date: Tue, 5 Feb 2008 03:51:46 -0500
On Mon, Nov 19, 2007 at 02:15:37PM +1100, Andrew Nelson wrote:
Dear List,
I am using the latest version of libxml2 (2.6.30) to provide XML
support for a program called IGOR Pro on Win32 + MacOSX. This
project takes the form of a C plugin.
Replying to this very old mail...
-I compiled the libxml2 source myself.
-My test XML file is:
_______________________
<?xml version="1.0"?>
<XMLutils/>
_______________________
-the code fragment I have in my plugin is listed below. When we get
to this stage doc is a valid xmlDocPtr, and xpathExpr = BAD_CAST ("/
XMLutils")
_____________________________________________________
[...]
If I run this fragment on the console it works fine. However, it
crashes everytime in my plugin. The stacktrace is
0 libxml2.2.dylib 0x17ba9561 xmlPatternMaxDepth +
111 (pattern.c:2545)
1 libxml2.2.dylib 0x17b0d261 xmlXPathRunStreamEval
+ 69 (xpath.c:14043)
2 libxml2.2.dylib 0x17b0d823 xmlXPathRunEval + 296
(xpath.c:14295)
3 libxml2.2.dylib 0x17b0e281
xmlXPathCompiledEvalInternal + 233 (xpath.c:14681)
4 libxml2.2.dylib 0x17b0e3d2 xmlXPathCompiledEval +
46 (xpath.c:14745)
5 com.apple.carbonbundletemplate 0x179e5186
execute_xpath_expression(_xmlDoc*, unsigned char*, unsigned char*,
int*) + 180 (XMLevaluateXPathExpression.cpp:126)
I investigated the cause of the crash and it appears that in
xmlPatternMaxDepth(pattern.c:2545) the pointer comp->stream is
Are you sure when running in your plugin environment you are not
linking to a *different* libxml2 shared library with different options
compiled in ? This sounds the most probable source of the problem.
Daniel
--
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard | virtualization library http://libvirt.org/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]