Page 2 of 3
Re: FWH64 : ERROR SE SALE DEL SISTEMA
Posted: Wed Aug 21, 2024 7:04 am
by Antonio Linares
Carlos,
Investigando en el error de xHarbour 64, no es tanto por el uso de hb_gcAll() sino por estas dos líneas en tu función CheckConect()
IsQry:= oServer:Query("Select 1")
IsQry:End()
Si comentas esas dos líneas, hb_gcAll() funciona bien
Estamos más cerca de resolverlo...
Re: FWH64 : ERROR SE SALE DEL SISTEMA
Posted: Wed Aug 21, 2024 8:05 am
by Enrico Maria Giordano
I need a minimal PRG sample to reproduce the problem here, sorry. Carlos, can you provide it?
Re: FWH64 : ERROR SE SALE DEL SISTEMA
Posted: Fri Aug 23, 2024 4:28 pm
by CARLOS ATUNCAR
Antonio, lo cambie de esta forma
if oServer:ping()
IsQry:= oServer:QueryResult("Select 1")
Else
lConn := .F.
Endif
y descomente HB_GCALL( .F. ) // limpiamos la memoria
y si trabaja sin problema, pero con las lib que enviastes no he probado con las lib de la descarga
Re: FWH64 : ERROR SE SALE DEL SISTEMA
Posted: Fri Aug 23, 2024 4:50 pm
by CARLOS ATUNCAR
Antonio, he creado este ejemplo y lo he compilado con buildx64.bat y si funciona lo anterior
Code: Select all | Expand
#include "fivewin.ch"
Static oServer
Function Main
oServer := connect()
If CheckConect()
?"EXISTE CONEXION AL SERVIDOR"
Endif
OServer:End()
Return nil
Static Function Connect
LOCAL oServer
LOCAL cServer, cUser, cPassword, cDBName
cServer := GetPvProfString("mysql","host" ," " ,".\connect.ini")
cUser := GetPvProfString("mysql","user" ," " ,".\connect.ini")
cPassword := GetPvProfString("mysql","psw" ," " ,".\connect.ini")
cDBName := GetPvProfString("mysql","dbname" ," " ,".\connect.ini")
// abrimos la conexion
TRY
FWCONNECT oServer HOST cServer ;
USER cUser ;
PASSWORD cPassword ;
DATABASE cDBName
CATCH oErr
oServer:ShowError()
END
Return oServer
Function CheckConect
local IsQry,aWait
local lConn:= .T.
Try
if oServer:ping()
IsQry := oServer:Query("Select 1 AS num")
IsQry:End()
Else
lConn := .F.
Endif
Catch o
Try
oServer:ReConnect()
SysRefresh()
Catch e
lConn := .F.
oServer:Showerror()
End
End
return lConn
Re: FWH64 : ERROR SE SALE DEL SISTEMA
Posted: Fri Aug 23, 2024 4:57 pm
by CARLOS ATUNCAR
Con este ejemplo no llega al A2 salvo que comente la linea 104 oWait:end()
Code: Select all | Expand
#include "fivewin.ch"
Static oServer
Function Main
local owait
WaitOn("Espere un momento....",@oWait )
HB_GCALL( .F. )
oServer := connect()
If CheckConect()
?"A1"
WaitOff( @oWait )
?"A2"
?"EXISTE CONEXION AL SERVIDOR"
Endif
OServer:End()
Return nil
Static Function Connect
LOCAL oServer
LOCAL cServer, cUser, cPassword, cDBName
cServer := GetPvProfString("mysql","host" ," " ,".\connect.ini")
cUser := GetPvProfString("mysql","user" ," " ,".\connect.ini")
cPassword := GetPvProfString("mysql","psw" ," " ,".\connect.ini")
cDBName := GetPvProfString("mysql","dbname" ," " ,".\connect.ini")
// abrimos la conexion
TRY
FWCONNECT oServer HOST cServer ;
USER cUser ;
PASSWORD cPassword ;
DATABASE cDBName
CATCH oErr
oServer:ShowError()
END
Return oServer
Function CheckConect
local IsQry,aWait
local lConn:= .T.
Try
if oServer:ping()
IsQry := oServer:Query("Select 1 AS num")
IsQry:End()
Else
lConn := .F.
Endif
Catch o
Try
oServer:ReConnect()
SysRefresh()
Catch e
lConn := .F.
oServer:Showerror()
End
End
return lConn
function waitOn( cCaption, oWait, cTitle ) //simula un waiton de grump
LOCAL nWidth
local lVal := .t.
local oBrush
local oImage, lSetAlpha := .t.
local bAction := { || .t. }
default cTitle := "Usuario, un momento por favor"
DEFINE BRUSH oBrush COLOR RGB( 192, 216, 255 ) //rosa
IF cCaption == NIL
DEFINE DIALOG oWait ;
FROM 0,0 TO 5, Len( cTitle ) + 4 ;
STYLE nOr( DS_MODALFRAME, WS_POPUP ) TRANSPARENT //BRUSH oBrush
ELSE
DEFINE DIALOG oWait ;
FROM 0,0 TO 6, Max( Len( cCaption ), Len( cTitle ) ) + 4 ;
TITLE cTitle ;
STYLE DS_MODALFRAME TRANSPARENT //BRUSH oBrush
ENDIF
oWait:cMsg := cCaption
nWidth := oWait:nRight - oWait:nLeft
ACTIVATE DIALOG oWait CENTER ;
ON PAINT oWait:Say( 1, 0, xPadC( oWait:cMsg, nWidth ) ) ;
NOWAIT
SysRefresh()
return (lVal)
//------------------------------------------------------------------------------
function WaitOff( oWait )
IF valtype(oWait) != 'U' /* waiton has to be called first! */
oWait:end()
oWait := NIL
ENDIF
sysRefresh()
RETURN NIL
Re: FWH64 : ERROR SE SALE DEL SISTEMA
Posted: Fri Aug 23, 2024 5:03 pm
by Antonio Linares
Estimado Carlos,
Es que el método End() al llamar o oWait:End() llama a hb_gcAll()
Enrico ya ha localizado el bug en xHarbour y esta trabajando para arreglarlo
Re: FWH64 : ERROR SE SALE DEL SISTEMA
Posted: Fri Aug 23, 2024 5:07 pm
by CARLOS ATUNCAR
ok si sirve de ayuda con este cambio si funciona
Code: Select all | Expand
#include "fivewin.ch"
Static oServer
Function Main
local owait
WaitOn("Espere un momento....",@oWait )
HB_GCALL( .F. )
oServer := connect()
If CheckConect()
?"A1"
WaitOff( @oWait )
?"A2"
?"EXISTE CONEXION AL SERVIDOR"
Endif
OServer:End()
Return nil
Static Function Connect
LOCAL oServer,o
LOCAL cServer, cUser, cPassword, cDBName
cServer := GetPvProfString("mysql","host" ," " ,".\connect.ini")
cUser := GetPvProfString("mysql","user" ," " ,".\connect.ini")
cPassword := GetPvProfString("mysql","psw" ," " ,".\connect.ini")
cDBName := GetPvProfString("mysql","dbname" ," " ,".\connect.ini")
// abrimos la conexion
TRY
FWCONNECT oServer HOST cServer ;
USER cUser ;
PASSWORD cPassword ;
DATABASE cDBName
CATCH o
oServer:ShowError()
END
Return oServer
Function CheckConect
local IsQry,aWait,o,e
local lConn:= .T.
Try
if oServer:ping()
IsQry := oServer:QueryResult("Select 1 AS num")
*IsQry:End()
Else
lConn := .F.
Endif
Catch o
Try
oServer:ReConnect()
SysRefresh()
Catch e
lConn := .F.
oServer:Showerror()
End
End
return lConn
function waitOn( cCaption, oWait, cTitle ) //simula un waiton de grump
LOCAL nWidth
local lVal := .t.
local oBrush
local oImage, lSetAlpha := .t.
local bAction := { || .t. }
default cTitle := "Usuario, un momento por favor"
DEFINE BRUSH oBrush COLOR RGB( 192, 216, 255 ) //rosa
IF cCaption == NIL
DEFINE DIALOG oWait ;
FROM 0,0 TO 5, Len( cTitle ) + 4 ;
STYLE nOr( DS_MODALFRAME, WS_POPUP ) TRANSPARENT //BRUSH oBrush
ELSE
DEFINE DIALOG oWait ;
FROM 0,0 TO 6, Max( Len( cCaption ), Len( cTitle ) ) + 4 ;
TITLE cTitle ;
STYLE DS_MODALFRAME TRANSPARENT //BRUSH oBrush
ENDIF
oWait:cMsg := cCaption
nWidth := oWait:nRight - oWait:nLeft
ACTIVATE DIALOG oWait CENTER ;
ON PAINT oWait:Say( 1, 0, xPadC( oWait:cMsg, nWidth ) ) ;
NOWAIT
SysRefresh()
return (lVal)
//------------------------------------------------------------------------------
function WaitOff( oWait )
IF valtype(oWait) != 'U' /* waiton has to be called first! */
?"ANTES DE FALLAR"
oWait:end()
oWait := NIL
ENDIF
sysRefresh()
RETURN NIL
Re: FWH64 : ERROR SE SALE DEL SISTEMA
Posted: Sat Aug 24, 2024 9:09 am
by Enrico Maria Giordano
What about removing all the calls to hb_gcall() from your program? Do you see any visible negative effect?
Re: FWH64 : ERROR SE SALE DEL SISTEMA
Posted: Sat Aug 24, 2024 9:36 am
by Antonio Linares
Dear Enrico,
We need to fix the xHarbour hb_gcAll() bug
Re: FWH64 : ERROR SE SALE DEL SISTEMA
Posted: Sat Aug 24, 2024 10:02 am
by Enrico Maria Giordano
I'm not sure it is a bug in xHarbour. However, I absolutely cannot fix it. I wrote to Ron in the xHarbour newsgroup. He's the only one that could understand the problem.
Re: FWH64 : ERROR SE SALE DEL SISTEMA
Posted: Sat Aug 24, 2024 11:09 am
by Antonio Linares
Dear Enrico,
> I wrote to Ron in the xHarbour newsgroup
Could you please provide the url to the posted msg ? many thanks
Re: FWH64 : ERROR SE SALE DEL SISTEMA
Posted: Sat Aug 24, 2024 12:05 pm
by Enrico Maria Giordano
There is no url for usenet. You have to use a news client (I'm using Thunderbird) and subscribe to a news server (I'm using eternal-september.org).
Re: FWH64 : ERROR SE SALE DEL SISTEMA
Posted: Sat Aug 24, 2024 12:07 pm
by Antonio Linares
Is it in google groups ?
thank you
Re: FWH64 : ERROR SE SALE DEL SISTEMA
Posted: Sat Aug 24, 2024 1:02 pm
by Enrico Maria Giordano
Google Groups is not updated with new usenet messages since February (Google decision).
Re: FWH64 : ERROR SE SALE DEL SISTEMA
Posted: Sun Sep 08, 2024 4:36 am
by CARLOS ATUNCAR
Saludos Antonio, algún avance ?