Page 1 of 2

Dc_XML - FATAL ERROR

Posted: Mon Aug 08, 2011 7:37 am
by PedroAlex
Hello EveryBody!

I have a problem in Dc_XML.

I need to create a XML file for Fiscal Audit and when I read large DBFs happens this error:

FATAL ERROR LOG
Not recoverable Error!
SYS Thread-ID: 640
Module: MOM
Error Codes: EH: 1006 Sub: 0(0) OS: 0 XPP: 15
Call Stack of Thread 1 (640):
@DC_XMLNODE@I@INIT(244)
CRIA_SAFT(7103)
SAFT(6723)
(B)MENU_CONS(1291)
INICIAL(712)
MAIN(405)
Call Stack of GUI Thread (860):
Call Stack of Thread 3 (2860):
File: Z:\USER\WGESTCOM\SOURCE\PRG\WGESTCOM.EXE
TimeStamp: 20110808 15:08
End of FATAL ERROR LOG.

Any ideia what can be this.
i have only 3 day for solve this situation.
Any opinion are very important.
Thanks in advance.
Pedro.

Re: Dc_XML - FATAL ERROR

Posted: Mon Aug 08, 2011 8:10 am
by Auge_Ohr
comercial wrote:FATAL ERROR LOG
Not recoverable Error!
SYS Thread-ID: 640
Module: MOM
MOM = Memory Object Manager
* XppFatal Message: (none)
- Error Codes: "EH: 100x"/"XPP: 0"
comercial wrote:Error Codes: EH: 1006 Sub: 0(0) OS: 0 XPP: 15
EH 1006 // two many memory-objects: there are not enough
// handles

XPP 15 XPP_ERR_MEMORY_FULL Not enough memory or swapping space
available
comercial wrote:Call Stack of Thread 1 (640):
@DC_XMLNODE@I@INIT(244)
happend in Thread 1
comercial wrote:Call Stack of Thread 3 (2860):
while you "start" in Thread 3

what to do : reduce use of Memory < 2GB

other workaround : Alaska did have a Patch when using Array > 2GB and have ""Memory Handles" Problem
... do not no if it help in this Case.

Re: Dc_XML - FATAL ERROR

Posted: Mon Aug 08, 2011 8:58 am
by PedroAlex
Jimmy. Thanks for reply.

Alaska refers configurantion of memory objects.
I have no previlegies to download the hotfix 36 description.
They refere :
Solution:
Hotfix Rollup #36 carries a fix for the problem. Get in contact with
Alaska Software Technical support to request a howto on how to configure
the Xbase++ runtime to provide more then 2000000 memory objects.


How we can configure this runtime parameter?

Thanks.
best Regards.
Pedro.

Re: Dc_XML - FATAL ERROR

Posted: Mon Aug 08, 2011 9:29 am
by Auge_Ohr
comercial wrote:How we can configure this runtime parameter?
as i know you "need" a revised DLL with that Parameter so you need to renew your Subsciption to get a "Hotfix" :angry-cussingblack: .

Re: Dc_XML - FATAL ERROR

Posted: Mon Aug 08, 2011 9:38 am
by PedroAlex
Jimmy.

Thanks for Reply.

Best Regards.
Pedro

Re: Dc_XML - FATAL ERROR

Posted: Mon Aug 08, 2011 1:26 pm
by rdonnay
DC_Xml2ObjectTree() now supports either ASXML or Xb2Net as the XML parser. I have had lots of problems in the past with the ASXML parser and no problems with the Xb2net parser.

If you own Xb2net, then try using a .TRUE. as the 2nd parameter of DC_Xml2ObjectTree().

Re: Dc_XML - FATAL ERROR

Posted: Tue Aug 09, 2011 4:14 am
by skiman
Hi,

If you need to create the XML, you can create it as text. If it is really large, you can use functions as fopen()/fwrite() to create the XML file.

A quick sample to create the xml in memory.

Code: Select all

cHeader := 'header of your xml'
cFooter := 'footer of xml'
cSub := '<customer>'+CRLF+'<Name>_Name_</Name>'+CRLF+'<Address>_address_</address>'+CRLF+'</customer>'+CRLF
cLine := ''

cXml := cHeader
do while !eof()
cLine := cSub
cLine := strtran(cLine,'_name_', customer->name)
cLine := strtran(cLine,'_address_',customer->address)
cXml += cLine
dbskip(1)
enddo
cXml += cFooter

Re: Dc_XML - FATAL ERROR

Posted: Tue Aug 09, 2011 4:59 am
by Tom
Chris is absolutely right. XML is no magic, and this way to create files is the fastest. Just take care of character set conversions - if your app runs in OEM mode, write text data using ConvToAnsiCP(cXML).

Re: Dc_XML - FATAL ERROR

Posted: Tue Aug 09, 2011 8:08 am
by PedroAlex
Hi, thanks for comments.

On this moment I have very very serious problems to create a XML file.
it is a complex XML , I read a lot of Dbfs and than create a XML predefined by fiscal gouvernement.

I use Dc_XML to crate a fiscal audit file and the number of records in memory before :xmlwrite go up 2000000 and the app crash.
I have no time to create a neu routine ( fwrite(), fread() ) and I need a way to write (append ) the file before crash and release the object memory array and continue without crash.

Any ideia or workaround are welcome.


thanks to all comunity for help.
Pedro

Re: Dc_XML - FATAL ERROR

Posted: Tue Aug 09, 2011 10:18 am
by Auge_Ohr
comercial wrote:go up 2000000
as i say if you have reached Xbase++ Memory Handler Limit of OS()
comercial wrote:Any ideia or workaround are welcome.
did you work on a 32-bit System ? try it on a 64.bit OS() with 8GB RAM