[xml] Crashes trying XPath stuff with Python bindings
- From: Andreas Pakulat <apaku gmx de>
- To: xml gnome org
- Subject: [xml] Crashes trying XPath stuff with Python bindings
- Date: Fri, 9 Jun 2006 19:10:41 +0200
Hi,
I'm not sure I'm doing the right thing here, thus I'm not (yet) filing a
bugreport. I want to use the python bindings for libxml2 and thus
installed libxml2 (2.6.26) and libxslt (1.1.17). Now doing my first
steps results in crashes of the python interpreter:
import libxml2
doc=libxml2.parseFile('/home/andreas/temp/file1.xml')
xpath=libxml2.xpathContext(doc)
result=xpath.xpathEvalExpression('//body')
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1210804544 (LWP 10980)]
xmlDictReference__internal_alias (dict=0x1) at dict.c:389
389 dict->ref_counter++;
(gdb) bt
#0 xmlDictReference__internal_alias (dict=0x1) at dict.c:389
#1 0xb7893e66 in xmlXPathNewParserContext__internal_alias (
str=0xb7cda1d4 "//body", ctxt=0xb7993a4c) at xpath.c:5837
#2 0xb78a0d76 in xmlXPathEvalExpression__internal_alias (str=0x81a0dc8 "",
ctxt=0xb7993a4c) at xpath.c:14358
#3 0xb79695a8 in libxml_xmlXPathEvalExpression (self=0x0, args=0x81a0dc8)
at libxml2-py.c:6184
#4 0x080bb19e in PyEval_EvalFrame (f=0x81808b4) at Python/ceval.c:3563
#5 0x080bba25 in PyEval_EvalFrame (f=0x8176cdc) at Python/ceval.c:3645
#6 0x080bc10e in PyEval_EvalCodeEx (co=0xb7d3ed20, globals=0xb7d22824,
locals=0xb7d22824, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0,
defcount=0, closure=0x0) at Python/ceval.c:2736
#7 0x080bc349 in PyEval_EvalCode (co=0x81a0dc8, globals=0x81a0dc8,
locals=0x81a0dc8) at Python/ceval.c:484
#8 0x080de3c5 in PyRun_InteractiveOneFlags (fp=0x81a0dc8,
filename=0x8108818 "<stdin>", flags=0xbfadc954) at Python/pythonrun.c:1265
#9 0x080de4e0 in PyRun_InteractiveLoopFlags (fp=0xb7e7f740,
filename=0x8108818 "<stdin>", flags=0xbfadc954) at Python/pythonrun.c:695
#10 0x080dec32 in PyRun_AnyFileExFlags (fp=0xb7e7f740,
filename=0x8108818 "<stdin>", closeit=0, flags=0xbfadc954)
at Python/pythonrun.c:658
#11 0x08055af8 in Py_Main (argc=0, argv=0xbfadc9e4) at Modules/main.c:493
#12 0xb7d5feb0 in __libc_start_main () from /lib/tls/libc.so.6
#13 0x08054f41 in _start () at ../sysdeps/i386/elf/start.S:119
(gdb)
#0 xmlDictReference__internal_alias (dict=0x1) at dict.c:389
#1 0xb7893e66 in xmlXPathNewParserContext__internal_alias (
str=0xb7cda1d4 "//body", ctxt=0xb7993a4c) at xpath.c:5837
#2 0xb78a0d76 in xmlXPathEvalExpression__internal_alias (str=0x81a0dc8 "",
ctxt=0xb7993a4c) at xpath.c:14358
#3 0xb79695a8 in libxml_xmlXPathEvalExpression (self=0x0, args=0x81a0dc8)
at libxml2-py.c:6184
#4 0x080bb19e in PyEval_EvalFrame (f=0x81808b4) at Python/ceval.c:3563
#5 0x080bba25 in PyEval_EvalFrame (f=0x8176cdc) at Python/ceval.c:3645
#6 0x080bc10e in PyEval_EvalCodeEx (co=0xb7d3ed20, globals=0xb7d22824,
locals=0xb7d22824, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0,
defcount=0, closure=0x0) at Python/ceval.c:2736
#7 0x080bc349 in PyEval_EvalCode (co=0x81a0dc8, globals=0x81a0dc8,
locals=0x81a0dc8) at Python/ceval.c:484
#8 0x080de3c5 in PyRun_InteractiveOneFlags (fp=0x81a0dc8,
filename=0x8108818 "<stdin>", flags=0xbfadc954) at Python/pythonrun.c:1265
#9 0x080de4e0 in PyRun_InteractiveLoopFlags (fp=0xb7e7f740,
filename=0x8108818 "<stdin>", flags=0xbfadc954) at Python/pythonrun.c:695
#10 0x080dec32 in PyRun_AnyFileExFlags (fp=0xb7e7f740,
filename=0x8108818 "<stdin>", closeit=0, flags=0xbfadc954)
at Python/pythonrun.c:658
#11 0x08055af8 in Py_Main (argc=0, argv=0xbfadc9e4) at Modules/main.c:493
#12 0xb7d5feb0 in __libc_start_main () from /lib/tls/libc.so.6
#13 0x08054f41 in _start () at ../sysdeps/i386/elf/start.S:119
Any help appreciated.
Andreas
--
Reply hazy, ask again later.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]