Enrico Maria Giordano | 14 Jul 11:02 2010
Picon

Preprocessor bug?

I'm not sure if I already asked this question in the past. Anyway, in the 
following sample, why the second syntax is not accepted by the preprocessor?

#command TEST [<right: RIGHT> [<pad>]]                                  ;
              [COLOR <nClrFore> [,<nClrBack>]]                          ;
                                                                        ;
      => Test( <.right.>, <pad>, <nClrFore>, <nClrBack> )

FUNCTION MAIN()

    TEST COLOR 1, 2 RIGHT 10  // first syntax
    TEST RIGHT 10 COLOR 1, 2  // second syntax

    RETURN NIL

EMG

--
EMAG Software Homepage:     http://www.emagsoftware.it
The EMG's ZX-Spectrum Page: http://www.emagsoftware.it/spectrum
The Best of Spectrum Games: http://www.emagsoftware.it/tbosg
The EMG Music page:         http://www.emagsoftware.it/emgmusic 

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
Enrico Maria Giordano | 14 Jul 11:04 2010
Picon

Bug in RELEASE command

The following sample prints

NIL
10

instead of

NIL
NIL

FUNCTION MAIN()

    PRIVATE cVar

    ? cVar

    cVar = 10

    RELEASE ALL LIKE cVar*

    ? cVar

    INKEY( 0 )

    RETURN NIL

EMG

--
EMAG Software Homepage:     http://www.emagsoftware.it
(Continue reading)

Ella Stern | 15 Jul 11:29 2010

TXMLDocument causes EXE hung up

I've modified  xmltest.prg  found at
and I've used for testing the  xmltest.xml  file found at the same location.
 
Here is my test code:
 
 
#include "hbxml.ch"
PROCEDURE Main()
   local i, cXml, cFileName:="xmltest.xml"
//   local oDoc, oNode
   SET EXACT OFF
   CLS
   if !file( cFileName )
      wait "File not found..."
      RETURN
   ENDIF
for i:=1 to 30
   oDoc := TXmlDocument():New( cFileName )
   oNode := oDoc:CurNode
   IF oDoc:nStatus != HBXML_STATUS_OK
      wait "Error while reading file..."
      RETURN
   else
      ? "read ok"
   ENDIF
   cXml := oDoc:ToString( HBXML_STYLE_NOINDENT )
   ? cXml
   ? " <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> "
   wait str(i) + " Continue..."
  
next
RETURN
 
 
[1]  When running the test on my XP Pro SP3, after a number of loops ( usually less then 10 ) the executable do hung up, and in most cases I get the below error message on the screen:
 
Unrecoverable error 9027: Premature String Release detected: 'xml'
Called from Inkey(0)
Called from __WAIT(64)
Called from MAIN(30)
 
 
[2]  When running the test on my Vista Basic, after a number of loops ( less then 10 ) I get the generic error message "text.exe has stopped working..."
 
 
Here is my .exe.log file geberated by xBuilder:
 

Type: C >>>xhb.exe -o"tst.c" -m -n -p -q -gc0   -I"C:\xHB\include" -I"C:\xHB\include\w32" "tst.prg"<<<
xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6715)
Copyright 1999-2010, http://www.xharbour.org http://www.harbour-project.org/
Generating object output to 'tst.obj'...
Type: C >>>xlink.exe -NOEXPOBJ -MAP -FORCE:MULTIPLE -NOIMPLIB -subsystem:console -LIBPATH:"C:\xHB\lib" -LIBPATH:"C:\xHB\c_lib" -LIBPATH:"C:\xHB\c_lib\win"  "tst.obj" "xhb.lib" "dbf.lib" "nsx.lib" "ntx.lib" "cdx.lib" "rmdbfcdx.lib" "ct3comm.lib" crt.lib kernel32.lib user32.lib winspool.lib ole32.lib oleaut32.lib odbc32.lib odbccp32.lib uuid.lib wsock32.lib ws2_32.lib wininet.lib advapi32.lib shlwapi.lib msimg32.lib mpr.lib OleDlg.lib version.lib -out:"tst.exe"<<<
 
 
Ella
 
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
xHarbour-developers mailing list
xHarbour-developers@...
https://lists.sourceforge.net/lists/listinfo/xharbour-developers
Eduardo Fernandes | 15 Jul 15:27 2010
Picon

Re: TXMLDocument causes EXE hung up

Ella

I have problems with last hbxml.c file, v 1.40. I'm using previous 1.39

regards,
Eduardo

--- Em qui, 15/7/10, Ella Stern <ella.stern-NX8iSfc8tANWk0Htik3J/w@public.gmane.org> escreveu:

De: Ella Stern <ella.stern <at> xharbour.com>
Assunto: [xHarbour-developers] TXMLDocument causes EXE hung up
Para: "xharbour developer list" <xharbour-developers-5NWGOfrQmnd4wTydcyPnfg@public.gmane.orgceforge.net>
Data: Quinta-feira, 15 de Julho de 2010, 6:29

I've modified  xmltest.prg  found at
and I've used for testing the  xmltest.xml  file found at the same location.
 
Here is my test code:
 
 
#include "hbxml.ch"
PROCEDURE Main()
   local i, cXml, cFileName:="xmltest.xml"
//   local oDoc, oNode
   SET EXACT OFF
   CLS
   if !file( cFileName )
      wait "File not found..."
      RETURN
   ENDIF
for i:=1 to 30
   oDoc := TXmlDocument():New( cFileName )
   oNode := oDoc:CurNode
   IF oDoc:nStatus != HBXML_STATUS_OK
      wait "Error while reading file..."
      RETURN
   else
      ? "read ok"
   ENDIF
   cXml := oDoc:ToString( HBXML_STYLE_NOINDENT )
   ? cXml
   ? " <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> "
   wait str(i) + " Continue..."
  
next
RETURN
 
 
[1]  When running the test on my XP Pro SP3, after a number of loops ( usually less then 10 ) the executable do hung up, and in most cases I get the below error message on the screen:
 
Unrecoverable error 9027: Premature String Release detected: 'xml'
Called from Inkey(0)
Called from __WAIT(64)
Called from MAIN(30)
 
 
[2]  When running the test on my Vista Basic, after a number of loops ( less then 10 ) I get the generic error message "text.exe has stopped working..."
 
 
Here is my .exe.log file geberated by xBuilder:
 

Type: C >>>xhb.exe -o"tst.c" -m -n -p -q -gc0   -I"C:\xHB\include" -I"C:\xHB\include\w32" "tst.prg"<<<
xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6715)
Copyright 1999-2010, http://www.xharbour.org http://www.harbour-project.org/
Generating object output to 'tst.obj'...
Type: C >>>xlink.exe -NOEXPOBJ -MAP -FORCE:MULTIPLE -NOIMPLIB -subsystem:console -LIBPATH:"C:\xHB\lib" -LIBPATH:"C:\xHB\c_lib" -LIBPATH:"C:\xHB\c_lib\win"  "tst.obj" "xhb.lib" "dbf.lib" "nsx.lib" "ntx.lib" "cdx.lib" "rmdbfcdx.lib" "ct3comm.lib" crt.lib kernel32.lib user32.lib winspool.lib ole32.lib oleaut32.lib odbc32.lib odbccp32.lib uuid.lib wsock32.lib ws2_32.lib wininet.lib advapi32.lib shlwapi.lib msimg32.lib mpr.lib OleDlg.lib version.lib -out:"tst.exe"<<<
 
 
Ella
 

-----Anexo incorporado-----

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first

-----Anexo incorporado-----


 
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
xHarbour-developers mailing list
xHarbour-developers@...
https://lists.sourceforge.net/lists/listinfo/xharbour-developers
Ella Stern | 15 Jul 19:41 2010

Re: TXMLDocument causes EXE hung up

Thank you for the information,
 
Ella

On Thu, Jul 15, 2010 at 4:27 PM, Eduardo Fernandes <modalsist <at> yahoo.com.br> wrote:
Ella

I have problems with last hbxml.c file, v 1.40. I'm using previous 1.39

regards,
Eduardo

--- Em qui, 15/7/10, Ella Stern <ella.stern-NX8iSfc8tANWk0Htik3J/w@public.gmane.org> escreveu:

De: Ella Stern <ella.stern-NX8iSfc8tANWk0Htik3J/w@public.gmane.org>
Assunto: [xHarbour-developers] TXMLDocument causes EXE hung up
Para: "xharbour developer list" <xharbour-developers <at> lists.sourceforge.net>
Data: Quinta-feira, 15 de Julho de 2010, 6:29


I've modified  xmltest.prg  found at
and I've used for testing the  xmltest.xml  file found at the same location.
 
Here is my test code:
 
 
#include "hbxml.ch"
PROCEDURE Main()
   local i, cXml, cFileName:="xmltest.xml"
//   local oDoc, oNode
   SET EXACT OFF
   CLS
   if !file( cFileName )
      wait "File not found..."
      RETURN
   ENDIF
for i:=1 to 30
   oDoc := TXmlDocument():New( cFileName )
   oNode := oDoc:CurNode
   IF oDoc:nStatus != HBXML_STATUS_OK
      wait "Error while reading file..."
      RETURN
   else
      ? "read ok"
   ENDIF
   cXml := oDoc:ToString( HBXML_STYLE_NOINDENT )
   ? cXml
   ? " <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> <at> "
   wait str(i) + " Continue..."
  
next
RETURN
 
 
[1]  When running the test on my XP Pro SP3, after a number of loops ( usually less then 10 ) the executable do hung up, and in most cases I get the below error message on the screen:
 
Unrecoverable error 9027: Premature String Release detected: 'xml'
Called from Inkey(0)
Called from __WAIT(64)
Called from MAIN(30)
 
 
[2]  When running the test on my Vista Basic, after a number of loops ( less then 10 ) I get the generic error message "text.exe has stopped working..."
 
 
Here is my .exe.log file geberated by xBuilder:
 

Type: C >>>xhb.exe -o"tst.c" -m -n -p -q -gc0   -I"C:\xHB\include" -I"C:\xHB\include\w32" "tst.prg"<<<
xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6715)
Copyright 1999-2010, http://www.xharbour.org http://www.harbour-project.org/
Generating object output to 'tst.obj'...
Type: C >>>xlink.exe -NOEXPOBJ -MAP -FORCE:MULTIPLE -NOIMPLIB -subsystem:console -LIBPATH:"C:\xHB\lib" -LIBPATH:"C:\xHB\c_lib" -LIBPATH:"C:\xHB\c_lib\win"  "tst.obj" "xhb.lib" "dbf.lib" "nsx.lib" "ntx.lib" "cdx.lib" "rmdbfcdx.lib" "ct3comm.lib" crt.lib kernel32.lib user32.lib winspool.lib ole32.lib oleaut32.lib odbc32.lib odbccp32.lib uuid.lib wsock32.lib ws2_32.lib wininet.lib advapi32.lib shlwapi.lib msimg32.lib mpr.lib OleDlg.lib version.lib -out:"tst.exe"<<<
 
 
Ella
 

-----Anexo incorporado-----


------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first

-----Anexo incorporado-----

 

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
xHarbour-developers mailing list
xHarbour-developers@...
https://lists.sourceforge.net/lists/listinfo/xharbour-developers
Augusto Infante | 15 Jul 19:33 2010

TXMLDocument causes EXE hung up

Hello

 

Sometime ago some changes where applied to xHarbour and XML code that makes our xml app crash sometimes without a valid error message and sometimes with the following one:

 

Unrecoverable error 9009:  

hb_xrealloc can't reallocate memory 

  

Called from HBXML_NODE_TO_STRING(0)

Called from TXMLNODE(93)

Called from TXMLNODE:TOSTRING(0)

Called from TXMLDOCUMENT(427)

Called from TXMLDOCUMENT:TOSTRING(0) 

 

If a self contained sample is required, xharbour\tests\xmltest\xmltest.prg produces the same error/GPF than our app.

 

The last working version we have is from March 1st, 2010.

 

Thanks

Augusto Infante

 

 

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
xHarbour-developers mailing list
xHarbour-developers@...
https://lists.sourceforge.net/lists/listinfo/xharbour-developers
Peter Rees | 19 Jul 10:06 2010
Picon

ChangeLog, v 1.6720 2010/07/19 08:04:37 peterrees Exp


2010-07-19 20:00 UTC+1200 Peter Rees <peter(AT)rees.co.nz>
   * source\rtl\winreg.prg
     * added error checking to WinRegQueryValueEx()/GetRegistry()

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
Peter Rees | 19 Jul 10:06 2010
Picon

ChangeLog, v 1.6720 2010/07/19 08:04:37 peterrees Exp


2010-07-19 20:00 UTC+1200 Peter Rees <peter(AT)rees.co.nz>
   * source\rtl\winreg.prg
     * added error checking to WinRegQueryValueEx()/GetRegistry()

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
Enrico Maria Giordano | 24 Jul 12:52 2010
Picon

Bug in DirChange()

The following sample

FUNCTION MAIN() 

    ? DIRCHANGE( "Notfound" )

   INKEY( 0 ) 

   RETURN NIL

gives the following result:

Clipper 5.3b:

3

xHarbour:

2

EMG

--
EMAG Software Homepage:     http://www.emagsoftware.it
The EMG's ZX-Spectrum Page: http://www.emagsoftware.it/spectrum
The Best of Spectrum Games: http://www.emagsoftware.it/tbosg
The EMG Music page:         http://www.emagsoftware.it/emgmusic

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
Ron Pinkas | 24 Jul 21:37 2010

Re: Preprocessor bug?

Enrico,

This is NOT a bug, and it's 100% Clipper compatible. This can be corrected 
to work like this:

-----------------------------------------------------------------------------
#command TEST <right: RIGHT> [<pad>]]                                  ;
              [COLOR <nClrFore> [,<nClrBack>]]                          ;
                                                                        ;
      => Test( <.right.>, <pad>, <nClrFore>, <nClrBack> )

FUNCTION MAIN()

    TEST COLOR 1, 2 RIGHT 10  // first syntax
    TEST RIGHT 10 COLOR 1, 2  // second syntax

    RETURN NIL
-----------------------------------------------------------------------------

The problem is the Clipper PP does NOT consider RESTRICTED MATCH MARKER a 
STOPPER when skipping over OPTIONAL input. I'm sorry that I don't have a 
more descriptive explanation as this is very technical. If you tried to 
develop a Clipper compatible Pre-Processor it would become crystal clear.

Ron

--------------------------------------------------
From: "Enrico Maria Giordano" <e.m.giordano@...>
Sent: Wednesday, July 14, 2010 2:02 AM
To: "xHarbour Developers Mailing List" 
<xharbour-developers@...>
Subject: [xHarbour-developers] Preprocessor bug?

> I'm not sure if I already asked this question in the past. Anyway, in the
> following sample, why the second syntax is not accepted by the 
> preprocessor?
>
> #command TEST [<right: RIGHT> [<pad>]]                                  ;
>              [COLOR <nClrFore> [,<nClrBack>]]                          ;
>                                                                        ;
>      => Test( <.right.>, <pad>, <nClrFore>, <nClrBack> )
>
>
> FUNCTION MAIN()
>
>    TEST COLOR 1, 2 RIGHT 10  // first syntax
>    TEST RIGHT 10 COLOR 1, 2  // second syntax
>
>    RETURN NIL
>
> EMG
>
> --
> EMAG Software Homepage:     http://www.emagsoftware.it
> The EMG's ZX-Spectrum Page: http://www.emagsoftware.it/spectrum
> The Best of Spectrum Games: http://www.emagsoftware.it/tbosg
> The EMG Music page:         http://www.emagsoftware.it/emgmusic
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> xHarbour-developers mailing list
> xHarbour-developers@...
> https://lists.sourceforge.net/lists/listinfo/xharbour-developers
> 

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first

Gmane