Hello,

I wanted to create a gettext portable object template (.pot) file from
Norman Walsh's "DocBook: The Definitive Guide". Therefor I used:

xml2po -e -o book.pot book.xml

in http://docbook.svn.sourceforge.net/viewvc/docbook/trunk/defguide/en/
and received a segmentation fault. So I started gdb and got the attached
backtrace. Can any of you say, where the segmentation fault is produced
- in xml2po or libxml2/python-libxml2 - so I can file a bug-report?
xmllint validates the XML source if you fix the <tag> element in
refpages/elements/equation/refentry.xml (should be an sgmltag element).

CCing Danilo Segan, the maintainer of xml2po

Thanks for any help,
Regards, Daniel
The program being debugged has been started already.
Start it from the beginning? (y or n) Starting program: /usr/bin/python 
/usr/bin/xml2po -e -o book.pot book.xml
Failed to read a valid object file image from memory.
[Thread debugging using libthread_db enabled]
[New Thread -1209702720 (LWP 25761)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1209702720 (LWP 25761)]
0xb7bed365 in xmlSearchNs__internal_alias (doc=0xb7f8007c, node=0xb7007465, 
    nameSpace=0xb7f87510 "\buø·\buø·\020uø·\020uø·\030uø·\030uø· uø· 
uø·(uø·([EMAIL 
PROTECTED]@uø·Huø·Huø·Puø·Puø·Xuø·Xuø·`uø·`uø·huø·huø·puø·puø·xuø·xuø·\200uø·\200uø·\210uø·\210uø·\220uø·\220uø·\230uø·\230uø· uø· uø·¨uø·¨uø·°uø·°uø·¸uø·¸uø·Àuø·Àuø·Èuø·Èuø·"...)
    at tree.c:5612
5612    tree.c: No such file or directory.
        in tree.c
#0  0xb7bed365 in xmlSearchNs__internal_alias (doc=0xb7f8007c, node=0xb7007465, 
    nameSpace=0xb7f87510 "\buø·\buø·\020uø·\020uø·\030uø·\030uø· uø· 
uø·(uø·([EMAIL 
PROTECTED]@uø·Huø·Huø·Puø·Puø·Xuø·Xuø·`uø·`uø·huø·huø·puø·puø·xuø·xuø·\200uø·\200uø·\210uø·\210uø·\220uø·\220uø·\230uø·\230uø· uø· uø·¨uø·¨uø·°uø·°uø·¸uø·¸uø·Àuø·Àuø·Èuø·Èuø·"...)
    at tree.c:5612
        cur = (xmlNsPtr) 0xa5c0f40
#1  0xb7bf5524 in xmlStaticCopyNode (node=0xa5c0f40, doc=0x8156710, parent=0x0, 
extended=1) at tree.c:3931
        ulccur = <value optimized out>
        ret = <value optimized out>
#2  0xb7be84eb in xmlParseReference__internal_alias (ctxt=0xb1138a0) at 
parser.c:6202
        nw = (xmlNodePtr) 0x7369736f
        cur = (xmlNodePtr) 0xa5c0f40
        firstChild = (xmlNodePtr) 0x0
        ent = (xmlEntityPtr) 0x828e6c0
        val = <value optimized out>
#3  0xb7be6d95 in xmlParseContent__internal_alias (ctxt=0xb1138a0) at 
parser.c:8462
        cons = 19425
#4  0xb7beb09d in xmlParseElement__internal_alias (ctxt=0xb1138a0) at 
parser.c:8623
        name = (const xmlChar *) 0xb7ade351 "entry"
        prefix = <value optimized out>
        URI = <value optimized out>
        node_info = {node = 0x114, begin_pos = 2, begin_line = 222324016, 
end_pos = 3998, end_line = 0}
        line = 276
        tlen = <value optimized out>
        ret = (xmlNodePtr) 0xd44d680
        nsNr = 0
#5  0xb7be6d88 in xmlParseContent__internal_alias (ctxt=0xb1138a0) at 
parser.c:8453
        cons = 19425
#6  0xb7beb09d in xmlParseElement__internal_alias (ctxt=0xb1138a0) at 
parser.c:8623
        name = (const xmlChar *) 0xb7ade34d "row"
        prefix = <value optimized out>
        URI = <value optimized out>
        node_info = {node = 0xd406530, begin_pos = 185677984, begin_line = 
222324249, end_pos = 3217717352, end_line = 275}
        line = 276
        tlen = <value optimized out>
        ret = (xmlNodePtr) 0xd44d540
        nsNr = 0
#7  0xb7be6d88 in xmlParseContent__internal_alias (ctxt=0xb1138a0) at 
parser.c:8453
        cons = 19425
#8  0xb7beb09d in xmlParseElement__internal_alias (ctxt=0xb1138a0) at 
parser.c:8623
        name = (const xmlChar *) 0xb7ade347 "tbody"
        prefix = <value optimized out>
        URI = <value optimized out>
        node_info = {node = 0x8, begin_pos = 2, begin_line = 222324016, end_pos 
= 175, end_line = 13}
        line = 14
        tlen = <value optimized out>
        ret = (xmlNodePtr) 0xd3fc3c8
        nsNr = 0
#9  0xb7be6d88 in xmlParseContent__internal_alias (ctxt=0xb1138a0) at 
parser.c:8453
        cons = 0
#10 0xb7beb09d in xmlParseElement__internal_alias (ctxt=0xb1138a0) at 
parser.c:8623
        name = (const xmlChar *) 0xb7ade322 "tgroup"
        prefix = <value optimized out>
        URI = <value optimized out>
        node_info = {node = 0x7, begin_pos = 2, begin_line = 222324016, end_pos 
= 159, end_line = 7}
        line = 8
        tlen = <value optimized out>
        ret = (xmlNodePtr) 0xd3fbc68
        nsNr = 0
#11 0xb7be6d88 in xmlParseContent__internal_alias (ctxt=0xb1138a0) at 
parser.c:8453
        cons = 0
#12 0xb7beb09d in xmlParseElement__internal_alias (ctxt=0xb1138a0) at 
parser.c:8623
        name = (const xmlChar *) 0xb7ade314 "informaltable"
        prefix = <value optimized out>
        URI = <value optimized out>
        node_info = {node = 0x5, begin_pos = 2, begin_line = 222324016, end_pos 
= 102, end_line = 5}
        line = 7
        tlen = <value optimized out>
        ret = (xmlNodePtr) 0xd3fbbd8
        nsNr = 0
#13 0xb7be6d88 in xmlParseContent__internal_alias (ctxt=0xb1138a0) at 
parser.c:8453
        cons = 0
#14 0xb7beb09d in xmlParseElement__internal_alias (ctxt=0xb1138a0) at 
parser.c:8623
        name = (const xmlChar *) 0xb7ade487 "section"
        prefix = <value optimized out>
        URI = <value optimized out>
        node_info = {node = 0x7, begin_pos = 24, begin_line = 222324016, 
end_pos = 1, end_line = 3}
        line = 5
        tlen = <value optimized out>
        ret = (xmlNodePtr) 0xd3fb9f8
        nsNr = 0
#15 0xb7be6d88 in xmlParseContent__internal_alias (ctxt=0xb1138a0) at 
parser.c:8453
        cons = 0
#16 0xb7beb09d in xmlParseElement__internal_alias (ctxt=0xb1138a0) at 
parser.c:8623
        name = (const xmlChar *) 0xb7adeba4 "appendix"
        prefix = <value optimized out>
        URI = <value optimized out>
        node_info = {node = 0xb7cc9e38, begin_pos = 3083407199, begin_line = 
3083640376, end_pos = 3217718024, end_line = 3083409904}
        line = 1
        tlen = <value optimized out>
        ret = (xmlNodePtr) 0xd3fb7b0
        nsNr = 0
#17 0xb7be6d88 in xmlParseContent__internal_alias (ctxt=0xb1138a0) at 
parser.c:8453
        cons = 0
#18 0xb7bea7d7 in xmlParseCtxtExternalEntity__internal_alias (ctx=0x82f4a00, 
URL=0x8207db0 "appg.xml", ID=0x0, lst=0xbfca7b78)
    at parser.c:11246
        ctxt = (xmlParserCtxtPtr) 0xb1138a0
        newDoc = (xmlDocPtr) 0xd3f63b0
        newRoot = <value optimized out>
        oldsax = (xmlSAXHandlerPtr) 0x83eaeb8
        ret = <value optimized out>
        start = "<app"
        enc = <value optimized out>
        inputStream = <value optimized out>
        directory = <value optimized out>
#19 0xb7c95cc7 in xmlSAX2GetEntity__internal_alias (ctx=0x82f4a00, 
name=0x81fbffd "appg") at SAX2.c:572
        val = <value optimized out>
        children = <value optimized out>
        ctxt = <value optimized out>
        ret = (xmlEntityPtr) 0x8207d30
#20 0xb7bdf565 in xmlParseEntityRef__internal_alias (ctxt=0x82f4a00) at 
parser.c:6356
        name = (const xmlChar *) 0x81fbffd "appg"
        ent = (xmlEntityPtr) 0x0
#21 0xb7be8077 in xmlParseReference__internal_alias (ctxt=0x82f4a00) at 
parser.c:5952
        was_checked = <value optimized out>
        ent = <value optimized out>
        val = <value optimized out>
#22 0xb7be6d95 in xmlParseContent__internal_alias (ctxt=0x82f4a00) at 
parser.c:8462
        cons = 422
#23 0xb7beb09d in xmlParseElement__internal_alias (ctxt=0x82f4a00) at 
parser.c:8623
        name = (const xmlChar *) 0xb7ade289 "part"
        prefix = <value optimized out>
        URI = <value optimized out>
        node_info = {node = 0x839e8b8, begin_pos = 3083505312, begin_line = 
137887336, end_pos = 2, end_line = 17}
        line = 19
        tlen = <value optimized out>
        ret = (xmlNodePtr) 0x839ea18
        nsNr = 0
#24 0xb7be6d88 in xmlParseContent__internal_alias (ctxt=0x82f4a00) at 
parser.c:8453
        cons = 0
#25 0xb7bea7d7 in xmlParseCtxtExternalEntity__internal_alias (ctx=0x81f3030, 
URL=0x8153c78 "bookbody.xml", ID=0x0, lst=0xbfca7d28)
    at parser.c:11246
        ctxt = (xmlParserCtxtPtr) 0x82f4a00
        newDoc = (xmlDocPtr) 0x82f4e70
        newRoot = <value optimized out>
        oldsax = (xmlSAXHandlerPtr) 0x82f4be0
        ret = <value optimized out>
        start = "<!--"
        enc = <value optimized out>
        inputStream = <value optimized out>
        directory = <value optimized out>
#26 0xb7c95cc7 in xmlSAX2GetEntity__internal_alias (ctx=0x81f3030, 
name=0x81fbfad "bookbody") at SAX2.c:572
        val = <value optimized out>
        children = <value optimized out>
        ctxt = <value optimized out>
        ret = (xmlEntityPtr) 0x81a64b0
#27 0xb7bdf565 in xmlParseEntityRef__internal_alias (ctxt=0x81f3030) at 
parser.c:6356
        name = (const xmlChar *) 0x81fbfad "bookbody"
        ent = (xmlEntityPtr) 0x0
#28 0xb7be8077 in xmlParseReference__internal_alias (ctxt=0x81f3030) at 
parser.c:5952
        was_checked = <value optimized out>
        ent = <value optimized out>
        val = <value optimized out>
#29 0xb7be6d95 in xmlParseContent__internal_alias (ctxt=0x81f3030) at 
parser.c:8462
        cons = 0
#30 0xb7beb09d in xmlParseElement__internal_alias (ctxt=0x81f3030) at 
parser.c:8623
        name = (const xmlChar *) 0x81fbf83 "book"
        prefix = <value optimized out>
        URI = <value optimized out>
        node_info = {node = 0x81f9f38, begin_pos = 136261680, begin_line = 0, 
end_pos = 3217718856, end_line = 3082654365}
        line = 11
        tlen = <value optimized out>
        ret = (xmlNodePtr) 0x81a49d8
        nsNr = 0
#31 0xb7beb4ae in xmlParseDocument__internal_alias (ctxt=0x81f3030) at 
parser.c:9231
        start = "<!DO"
        enc = <value optimized out>
#32 0xb7cf539a in libxml_xmlParseDocument () from 
/var/lib/python-support/python2.4/libxml2mod.so
No symbol table info available.
#33 0x080b9475 in PyEval_EvalFrame (f=0x8182744) at ../Python/ceval.c:3568
        arg = <value optimized out>
        stack_pointer = <value optimized out>
        next_instr = (unsigned char *) 0xb7da7ee3 "}\001"
        opcode = <value optimized out>
        oparg = <value optimized out>
        why = WHY_NOT
        err = 0
        x = (PyObject *) 0xb7e16680
        v = <value optimized out>
        w = <value optimized out>
        u = <value optimized out>
        t = <value optimized out>
        stream = (PyObject *) 0x18
        fastlocals = (PyObject **) 0x8182890
        freevars = (PyObject **) 0x8182898
        retval = (PyObject *) 0x0
        tstate = (PyThreadState *) 0x81461b0
        co = (PyCodeObject *) 0xb7da5f60
        instr_ub = -1
        instr_lb = <value optimized out>
        instr_prev = -1
        first_instr = (unsigned char *) 0xb7da7ed4 "t"
        names = (PyObject *) 0xb7da7efc
        consts = (PyObject *) 0xb7da868c
#34 0x080b9204 in PyEval_EvalFrame (f=0x814af0c) at ../Python/ceval.c:3651
        f = (PyFrameObject *) 0x8182744
        tstate = (PyThreadState *) 0x81461b0
        stack = (PyObject **) 0x7369736f
        i = -1211460110
        stack_pointer = <value optimized out>
        next_instr = (unsigned char *) 0x81a50be "\001eR"
        opcode = <value optimized out>
        oparg = <value optimized out>
        why = WHY_NOT
        err = 0
        x = (PyObject *) 0x0
        v = <value optimized out>
        w = <value optimized out>
        u = <value optimized out>
        t = <value optimized out>
        stream = (PyObject *) 0xffffffec
        fastlocals = (PyObject **) 0x814b058
        freevars = (PyObject **) 0x814b058
        retval = (PyObject *) 0x0
        tstate = (PyThreadState *) 0x81461b0
        co = (PyCodeObject *) 0xb7d113a0
        instr_ub = -1
        instr_lb = <value optimized out>
        instr_prev = -1
        first_instr = (unsigned char *) 0x81a4a94 "d"
        names = (PyObject *) 0x819b7b4
        consts = (PyObject *) 0x8155b24
#35 0x080ba735 in PyEval_EvalCodeEx (co=0xb7d113a0, globals=0xb7e2f824, 
locals=0xb7e2f824, args=0x0, argcount=0, kws=0x0, kwcount=0, 
    defs=0x0, defcount=0, closure=0x0) at ../Python/ceval.c:2741
        m = 0
        f = (PyFrameObject *) 0x814af0c
        retval = <value optimized out>
        fastlocals = (PyObject **) 0x814b058
        freevars = (PyObject **) 0x814b058
        tstate = (PyThreadState *) 0x81461b0
        x = <value optimized out>
        u = (PyObject *) 0x0
#36 0x080ba799 in PyEval_EvalCode (co=0xb7d113a0, globals=0xb7e2f824, 
locals=0xb7e2f824) at ../Python/ceval.c:484
No locals.
#37 0x080dd147 in PyRun_FileExFlags (fp=0x8146008, filename=0xbfca9953 
"/usr/bin/xml2po", start=257, globals=0xb7e2f824, 
    locals=0xb7e2f824, closeit=1, flags=0xbfca83d4) at 
../Python/pythonrun.c:1285
        n = (node *) 0xb7e162c0
#38 0x080dd344 in PyRun_SimpleFileExFlags (fp=0x8146008, filename=0xbfca9953 
"/usr/bin/xml2po", closeit=1, flags=0xbfca83d4)
    at ../Python/pythonrun.c:869
        buf = "#!"
        m = <value optimized out>
        d = (PyObject *) 0xb7e2f824
        v = <value optimized out>
        ext = 0xbfca995e "l2po"
#39 0x08055ba8 in Py_Main (argc=5, argv=0xbfca8494) at ../Modules/main.c:493
        v = <value optimized out>
        c = <value optimized out>
        sts = 0
        command = 0x0
        filename = 0x7369736f <Address 0x7369736f out of bounds>
        module = 0x0
        fp = (FILE *) 0x8146008
        p = <value optimized out>
        inspect = 0
        unbuffered = 0
        skipfirstline = 0
        stdin_is_interactive = 1
        help = 0
        version = 0
        saw_inspect_flag = 0
        saw_unbuffered_flag = 0
        cf = {cf_flags = 0}
#40 0x08055032 in main (argc=7105912, argv=0x6e6b6e55) at ../Modules/python.c:23
No locals.
The program is running.  Exit anyway? (y or n) 
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to