Page 1 of 2
CheckRes()
Posted: Mon Mar 09, 2020 2:44 pm
by russimicro
Buen dia.
Obtengo este reporte con CheckRes(), pregunto me afecta el sistema, si es así como lo soluciono
03/09/2020 09:32:46: DeleteObject( ::hBrush ) failed from TBrush:End() 437262946
03/09/2020 09:32:46: DeleteObject( ::hFont ) failed from TFont:End() -2029381914 0 .T.
03/09/2020 09:32:46: DeleteObject( ::hBrush ) failed from TBrush:End() 420485739
03/09/2020 09:32:46: DeleteObject( ::hBrush ) failed from TBrush:End() -686811063
03/09/2020 09:32:46: DeleteObject( ::hBrush ) failed from TBrush:End() 370152901
03/09/2020 09:32:46: DeleteObject( ::hBrush ) failed from TBrush:End() 1779439999
03/09/2020 09:32:46: DeleteObject( ::hBrush ) failed from TBrush:End() -2079320386
03/09/2020 09:32:46: DeleteObject( ::hBrush ) failed from TBrush:End() 1561336356
03/09/2020 09:32:46: DeleteObject( ::hBrush ) failed from TBrush:End() 1091569933
03/09/2020 09:32:46: DeleteObject( ::hBrush ) failed from TBrush:End() -602924865
Saludos
JONSSON RUSSI
FIVEWIN : 15.02
Re: CheckRes()
Posted: Mon Mar 09, 2020 7:37 pm
by karinha
Muestre cómo está cerrando las FUENTES o haga esto:
Code: Select all
FUNCTION Salida()
FreeResources()
SysRefresh()
RELEASE All
Hb_GCAll( .T. )
CLEAR MEMORY
PostQuitMessage( 0 )
__QUIT()
RETURN NIL
Re: CheckRes()
Posted: Mon Mar 09, 2020 9:01 pm
by russimicro
SET RESOURCES TO
ResAllFree( )
MEMORY( - 1 )
DbCommitAll()
DbUnLockAll()
DbCloseAll()
FreeResources()
Release All
SysRefresh()
HB_GCALL( .T. )
CLEAR MEMORY
CheckRes()
PostQuitMessage( 0 )
__QUIT()
Re: CheckRes()
Posted: Tue Mar 10, 2020 11:15 am
by karinha
Y en el módulo como estás cerrando las fuentes y el brush()?
Saludos.
Re: CheckRes()
Posted: Tue Mar 10, 2020 2:53 pm
by russimicro
Code: Select all
DEFINE BRUSH oBrush FILE cNomFon RESIZE
IF oBrush <> NIL
oMetPri:SetBrush( oBrush )
oBrush:End()
ENDIF
FUNCTION SALIR()
IF oBrush <> NIL
oBrush:End()
ENDIF
oMetro:End()
Re: CheckRes()
Posted: Tue Mar 10, 2020 3:22 pm
by karinha
No use PUBLIC en el FONT o BRUSH.
Intenta con:
Code: Select all
// oBrush:End()
// oFont:End()
ó
RELEASE BRUSH oBrush
RELEASE FONT oFont
ó
DeleteObject( oFont )
DeleteObject( oBrush )
Saludos.
Re: CheckRes()
Posted: Tue Mar 10, 2020 4:43 pm
by russimicro
Se mantiene el reporte en resources.txt
Code: Select all
SetResDebug(.t.)
DEFINE ICON oIco FILENAME "IMAGENES\zeruswin.ico"
M->cTitVenPri := HB_OEMTOANSI("Russoft ERP. Sistema de Gesti¢n Empresarial " +"(Versi¢n : "+m->cFecVerZer+")"+ " | "+ cCiaAct +" - "+ cCiaNom )
DEFINE WINDOW oWnd FROM 0, 0 TO 46, 128 ;
TITLE M->cTitVenPri ;
ICON oIco ;
MENU MenuPrincipal(oWnd)
oMetPri := MakeMetroPanelPrincipal( oWnd,oBrush )
IF FILE(cNomFon)
IF M->SW_FONDO
DEFINE BRUSH oBrush FILE cNomFon RESIZE
IF oBrush <> NIL
oMetPri:SetBrush( oBrush )
//oBrush:End()
RELEASE BRUSH oBrush
ENDIF
ENDIF
ENDIF
m->oMetWin := oMetPri
LINEAESTADOFW(oWnd)
ACTIVATE WINDOW oWnd MAXIMIZED ;
VALID ( TerminarMetro(oBrush,oMetPri), .T. ) ;
ON INIT ( oMetPri:Show() ) // ServerSocket(), , XTimers_2() oTimer := XTimers()
return nil
//******************
FUNCTION TerminarMetro(oBrush,oMetro)
IF oBrush <> NIL
//oBrush:End()
RELEASE BRUSH oBrush
ENDIF
oMetro:End()
SET RESOURCES TO
ResAllFree( )
MEMORY( - 1 )
DbCommitAll()
DbUnLockAll()
DbCloseAll()
FreeResources()
Release All
SysRefresh()
HB_GCALL( .T. )
CLEAR MEMORY
CheckRes()
PostQuitMessage( 0 )
__QUIT()
RETURN NIL
Re: CheckRes()
Posted: Tue Mar 10, 2020 5:33 pm
by karinha
C:\FWH..\SAMPLES\RUSMICRO.PRG
Code: Select all
#include "FiveWin.ch"
STATIC oWnd
FUNCTION Main()
LOCAL oBrush, oIco, oFont, oFnt // etc.
M->cTitVenPri := HB_OEMTOANSI( "Russoft ERP. Sistema de Gesti¢n Empresarial " + ;
"(Versi¢n : " + m->cFecVerZer + ")" + " | " + ;
cCiaAct + " - " + cCiaNom )
SetResDebug( .T. )
DEFINE BRUSH oBrush FILE cNomFon RESIZE
DEFINE ICON oIco FILENAME "IMAGENES\zeruswin.ico"
DEFINE WINDOW oWnd FROM 0, 0 TO 46, 128 ;
TITLE M->cTitVenPri ;
ICON oIco ;
MENU MenuPrincipal( oWnd )
oMetPri := MakeMetroPanelPrincipal( oWnd, oBrush )
m->oMetWin := oMetPri
LINEAESTADOFW( oWnd )
ACTIVATE WINDOW oWnd MAXIMIZED ;
VALID ( TerminarMetro( oBrush, oMetPri ), .T. ) ;
ON INIT ( oMetPri:Show() )
RETURN nil
//-> Finalizar el sistema
FUNCTION TerminarMetro( oBrush, oMetro )
DeleteObject( oBrush )
// oMetro:End()
DeleteObject( oMetro )
/* // NOS SE USA + EN 32 BITS.
ResAllFree( ) // 16 BITS
MEMORY( - 1 )
*/
DbCommitAll()
DbUnLockAll()
DbCloseAll()
FreeResources()
RELEASE ALL
SysRefresh()
HB_GCALL( .T. )
CLEAR MEMORY
IF FILE( "checkres.txt" )
FErase( "checkres.txt" )
ENDIF
CheckRes() // CREA UN NUEVO.
PostQuitMessage( 0 )
__QUIT()
RETURN NIL
Re: CheckRes()
Posted: Tue Mar 10, 2020 8:31 pm
by russimicro
karinha, gracias por su ayuda, ya no genera el resources.txt
si activo SetResDebug(.t.),
se genera el res.log con este contenido
487194999
FONT
/*,-+0,*0/
FONT
/-.,),-,/,
FONT
/(,./)+'0
BMP
/,+'.(/.(-
BMP -> ResizeImg
/*)/0)).)
FONT
/'/..*)*(+
BMP
(+,+(/*(.
BRUSH
/0).*(*''(
BRUSH
/*,-//)-/.
BRUSH
/.),0/((**
BRUSH
1729110706
BRUSH
/.),)-/)'(
BMP
1577395166
BMP
117775849
BMP -> ResizeImg
1292902918
BRUSH
-+/.*,0,(
BRUSH
1862599288
BMP
1930437456
BRUSH
/(-,'-/.'
BRUSH
.*)-)(00-
BRUSH
1460675545
BRUSH
890250262
BRUSH
+-+(./)00
BRUSH
/(/0((+,(+
BRUSH
722476323
BRUSH
654645849
BMP
.+0*00)('
BRUSH
1343231695
BRUSH
1192231692
BRUSH
.0/../0.0-
BRUSH
605037281
BRUSH
303047311
BRUSH
1778721611
BMP
/,)+--),0*
BRUSH
1192237450
BRUSH
1124407679
BMP
1426397617
BMP
1510281827
BMP
1896159201
BMP
/''+,-0'//
BRUSH
1041241192
BRUSH
2080707817
BMP
335877166
BMP
1074795043
BRUSH
100994062
BMP
84217519
BMP
()/-*+-/'
BRUSH
.*)-(+'0+
BRUSH
134552618
BMP
1543832734
BMP
/(,..0(*/
BMP
.(,/*--*+
BRUSH
1594884821
BRUSH
1208296303
BMP
/,.+).*+*+
BMP
2114986728
BRUSH
2098209420
BRUSH
1258627810
BMP
/0(',*/*'/
BRUSH
268771977
BMP
'('+.0)*'
BMP
1074797505
BRUSH
/0(',*-,)(
BRUSH
637868945
BMP
'++'**+(*
BMP
/',+(.-/)-
BMP
1845828265
BMP
./))*',,+
BMP
1779435471
BRUSH
,+.*++(/(
BMP
/+0**+,0*
BMP
').0.('/)
BRUSH
/))(0+.*-/
BMP
/(*/./-.)+
BRUSH
').),-+/-
BMP
2031099257
BRUSH
1912937342
BMP
/).))/'.*+
BMP
.0.('(+,'(
BRUSH
0
BMP -> MakeBkBmpEx
/0.-0)-,/'
BMP
755311581
BMP
**))./-(
BMP
/,.+00*'-.
BRUSH
521149771
BRUSH
0
BRUSH
0
BMP
0
BRUSH
0
PAL
0
BMP
0
PAL
0
BMP
0
PAL
0
BMP
1980768907
BRUSH
0
BMP
0
BMP
0
BMP
0
BMP
0
BRUSH
0
BMP
0
BMP
0
BMP
0
BMP
0
BMP
0
BMP
0
BMP
0
BMP
0
BMP
0
BMP
0
BMP
0
BMP
0
BRUSH
0
PAL
0
BMP
0
PAL
0
BMP
0
PAL
0
BMP
0
BMP
0
BMP
0
BMP
0
BMP
0
BMP
0
BMP
0
BMP
0
BMP
0
PAL
0
BMP
0
BMP
0
BMP
0
PAL
0
BMP
0
PAL
0
BMP
0
BMP
0
BMP
0
BMP
0
BMP
0
BMP
0
BMP
0
BMP
0
BMP
0
BMP
0
PAL
0
BMP
0
BMP
0
BMP
0
REGION
0
REGION
0
REGION
0
REGION
0
REGION
0
REGION
0
REGION
0
REGION
0
REGION
0
REGION
0
REGION
0
REGION
0
REGION
0
REGION
0
REGION
0
REGION
0
REGION
0
REGION
0
REGION
0
REGION
0
REGION
0
REGION
0
REGION
0
REGION
0
REGION
0
REGION
168427984
FONT
0
BMP -> MakeBkBmpEx
0
BRUSH
0
BMP
0
BMP
0
BMP
0
BMP
0
BMP -> MakeBkBmpEx
0
BMP
0
BMP
0
BMP
0
BMP
0
BRUSH
0
BMP
0
BMP
0
BMP
0
BMP
0
BMP
0
BMP
0
BMP
0
BMP
0
BMP
0
BMP
0
BMP
0
BRUSH
0
BRUSH
Re: CheckRes()
Posted: Wed Mar 11, 2020 5:51 pm
by karinha
En mi humilde opinión, es perfecto. Puedes trabajar sin problemas. Si tiene más preguntas, póngase en contacto con el Maestro Cristóbal, ¿de acuerdo?
Regards, saludos.
Re: CheckRes()
Posted: Wed Mar 11, 2020 11:15 pm
by russimicro
Muchas gracias
Saludos
Re: CheckRes()
Posted: Thu Mar 12, 2020 12:47 am
by cnavarro
No está bien
Para que estés seguro que tu aplicación no tiene pérdida de recursos y que por lo tanto te pueda dar algún problema en su funcionamiento, el checkres.txt debe tener este contenido ( te pongo como ejemplo lo que me aparece al salir de mi editor Fivedit.exe ), es decir, no debe tener ninguna "entrada" de recurso.
12/03/2020 01:44:32: D:\Fwh\FwhTeam\samples\fivedit.exe -- =============================================================================
Re: CheckRes()
Posted: Thu Mar 12, 2020 1:43 pm
by russimicro
Buen dia.
actualmente se genera solo el res.log, anteriormente se generaba el resources.txt
El checkres.txt no se ha generado
Gracias
Re: CheckRes()
Posted: Thu Mar 12, 2020 2:02 pm
by karinha
Holá, duda: Que és RES.LOG? Haga asi:
Code: Select all
IF FILE( "RES.LOG" )
DELETEFILE( "RES.LOG" )
ENDIF
Regards, saludos.
Re: CheckRes()
Posted: Thu Mar 12, 2020 4:35 pm
by russimicro
se genera el res.log con este contenido
487194999
FONT
/*,-+0,*0/
FONT
.....
Pregunto :
* porque se genera este archivo res.log
* porque no se genera el checkrest.txt
Gracias