I find the most common reason for a core dump when dealing with xml is the
lang settings and encoding of the files.   make sure they match - I note
the xml is utf-8 - firstly check it is indeed utf-8 and there are no upper
ascii (above 127) in there. Also make sure you have a lang setting that
matches utf-8  lang=c wont work.

hth



On 4 February 2014 14:44, Bob Little <b...@marketamerica.com> wrote:

> I'm testing some XML stuff locally on UV PE 11.2 and I've run into a
> problem I can't figure out.  I hope someone else knows what's going on here
> and has a work-around.
>
> I'm running this test on CentOS 6.5 with UniVerse PE 11.2.  I get a core
> dump as soon as I attempt the XMAPOpen.  It appears to only happen when the
> ColumnMap Node begins with a comma.  The same data, map and code works
> without problem on an AIX machine.
>
> MAP ...
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- DOCTYPE U2XMAP SYSTEM "U2UXMAP.DTD" -->
> <U2XMAP Version="1.0" Name="XMAP1">
>    <TABLECLASSMAP MapName="M1" StartNode="/RESPONSE" TableName="WEATHER">
>       <ColumnMap Node="/HOME/text()" Column="@ID" />
>       <ColumnMap Node="/FOREIGN/text()" Column="FOREIGN" />
>       <ColumnMap Node="/UNITS,text()" Column="UNITS" />
>       <ColumnMap Node="/NUMBER,text()" Column="NUMBER" />
>       <ColumnMap Node=",INFO,DATE/text()" Column="DATE" />
>       <ColumnMap Node=",INFO,CITY/text()" Column="CITY" />
>       <ColumnMap Node=",INFO,TEMP/text()" Column="TEMP" />
>    </TABLECLASSMAP>
> </U2XMAP>
>
> XML DATA...
> <RESPONSE>
>     <HOME>USA</HOME>
>     <FOREIGN>TWN</FOREIGN>
>     <UNITS>F</UNITS>
>     <NUMBER>1</NUMBER>
>     <INFO>
>        <DATE>Sun, 02 Feb 2014 19:00:00 GMT</DATE>
>        <CITY>Taipei</CITY>
>        <TEMP>40</TEMP>
>     </INFO>
>     <HOME>USA</HOME>
>     <FOREIGN>CAN</FOREIGN>
>     <UNITS>F</UNITS>
>     <NUMBER>2</NUMBER>
>     <INFO>
>        <DATE>Sun, 02 Feb 2014 19:00:00 GMT</DATE>
>        <CITY>Toronto</CITY>
>        <TEMP>35</TEMP>
>     </INFO>
> </RESPONSE>
>
> CODE...
> INCLUDE UNIVERSE.INCLUDE XML.H
> open '&XML&' to xml.file else stop
> xml.id = "temps.xml"
> map.id = "temps.map"
> read xml.rec from xml.file,xml.id else
>    crt "Can't read ":xml.id:" from &XML& file"
>    stop
> end
> convert @am to '' in xml.rec
> ERR1=XDOMOpen(xml.rec,XML.FROM.STRING,DOMH)
> IF ERR1 # XML.SUCCESS THEN
>    crt "Can't do XDOMOpen()"
>    RETURN
> END
> ERR1=XMAPOpen(xml.rec, XML.FROM.STRING, map.id, XML.FROM.FILE, XMAPhandle)
> IF ERR1 # XML.SUCCESS THEN
>    crt "XMAPOpen failed"
>    RETURN
> END
>
> This is the top part of the resulting stack dump:
> *** glibc detected *** /usr/uv/bin/uv: free(): invalid pointer: 0x0031423e
> ***
> ======= Backtrace: =========
> /lib/libc.so.6[0x98de31]
> /usr/lib/libstdc++.so.6(_ZdlPv+0x22)[0x7dee552]
>
> /usr/uv/bin/libu2xml.so(_ZN6U2XMAP10readrecordEP4XMAPPKN11xercesc_3_17DOMNodeE+0x555)[0x304a3d]
>
> /usr/uv/bin/libu2xml.so(_ZN6U2XMAP12xmaptorecordEP4XMAPPKN11xercesc_3_17DOMNodeE+0x68)[0x304b84]
> /usr/uv/bin/libu2xml.so(_ZN6U2XMAP10GenXRecordEv+0x31)[0x304cd5]
> /usr/uv/bin/libu2xml.so(U2_XMAPOpen+0xfc)[0x2fc29e]
> /usr/uv/bin/uv[0x847215e]
> /usr/uv/bin/uv[0x83128d4]
> /usr/uv/bin/uv[0x81e3a46]
> /usr/uv/bin/uv[0x81e6620]
> /usr/uv/bin/uv[0x812d188]
> /usr/uv/bin/uv[0x8063a1d]
> /usr/uv/bin/uv[0x81b1a78]
> /usr/uv/bin/uv[0x805f7a2]
> /usr/uv/bin/uv[0x804f397]
> /usr/uv/bin/uv[0x804d475]
> /lib/libc.so.6(__libc_start_main+0xe6)[0x933d26]
> /usr/uv/bin/uv[0x804c831]
>
>
> bob little
> applications architect
> independent contractor
> market america, inc.
> 1302 pleasant ridge rd.
> greensboro, nc  27409
> Phone: 336-698-4367
> Cell: 248-675-5515
> Skype: boblittle904
>
> _______________________________________________
> U2-Users mailing list
> U2-Users@listserver.u2ug.org
> http://listserver.u2ug.org/mailman/listinfo/u2-users
>
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to