[fpc-pascal] Strange issue with TXMLConfig
Vojtěch Čihák
vojtech.cihak at atlas.cz
Thu Jan 18 00:30:41 CET 2018
Hi, I can only say that TDOMNode from Laz2_DOM in trunk has function CompareName.
V.
______________________________________________________________
> Od: Darius Blaszyk <dhkblaszyk at zeelandnet.nl>
> Komu: FPC-Pascal users discussions <fpc-pascal at lists.freepascal.org>
> Datum: 18.01.2018 00:11
> Předmět: [fpc-pascal] Strange issue with TXMLConfig
>
All of a sudden I get a crash in my app trying to read a path from an XML file. The crash comes from the function TDOMNamedNodeMap.Find that crashes on this line:
C := TDOMNode(FList.List^[I]).CompareName(name);
The strange thing is that a simplified example app does not crash! In any case I'm 100% sure the path exists and either way even if it didn't XMLConfig should not crash. The message form the lazarus code inspector is: Type TDOMNODE has no component named COMPARENAME.The code also never reaches the CompareName function when I set a breakpoint.
I'm at a loss. Is any one capable to understand what is happening?
Rgds, Darius
My code is:
c := cache.GetValue('filelist/item_1/crc', 0);
The XML is:
<?xml version="1.0" encoding="utf-8"?>
<CONFIG>
<filelist type="filecache" count="1">
<item_1 crc="30150" filename="C:\myfile.txt"/>
</filelist>
</CONFIG>
The BT is:
An unhandled exception occurred at $0000000100033BA4:
EAccessViolation: Access violation
$0000000100033BA4 line 1783 of fcl-xml/src/dom.pp
$0000000100033C75 line 1802 of fcl-xml/src/dom.pp
$000000010003707D line 3159 of fcl-xml/src/dom.pp
$000000010002EC28 line 195 of xmlconf.pp
----------
_______________________________________________
fpc-pascal maillist - fpc-pascal at lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal <http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20180118/131e8dfc/attachment.html>
More information about the fpc-pascal
mailing list