Page 13 of 13

Re: HMG 3.0.36 (Test)

Posted: Mon Jun 20, 2011 2:35 pm
by Roberto Lopez
gfilatov wrote:
Roberto Lopez wrote:Rathi, Grigory, Ricci,

What about memory leaks?

How can I check it?

I'd like to help to fix them...

TIA.
Roberto,

It is related to functions _SetPicture(), _EnableControl() and _DisableControl() in the source h_controlmisc.prg
and Button and Checkbox control with IsAppThemed() condition because we use here the Imagelist instead of the bitmap.
Solution was proposed by Ricci and consist in the adding a string
IMAGELIST_DESTROY ( _HMG_SYSDATA [ 37 ] [y] )
before the string _SetMixedBtnPictureDisabled( c , y ) or string _HMG_SYSDATA [ 37 ] := _SetMixedBtnPicture ( _HMG_SYSDATA [3] , FileName , _HMG_SYSDATA [26] )

OR replace the string
DeleteObject ( _HMG_SYSDATA [ 37 ] )
with
IMAGELIST_DESTROY ( _HMG_SYSDATA [ 37 ] [y] )
in aboved functions.

Hope that helps.


Ok. Thanks for your response.

Rathi: Were this changes already applied?

Grigory: Do you know how the leaks can be tested? (I mean find the used handles count priot and after app. execution).

TIA.

Re: HMG 3.0.36 (Test)

Posted: Mon Jun 20, 2011 3:42 pm
by danielmaximiliano
Hola Roberto:
subo video para el error que encontre.
te comento que la carpeta de mi proyecto solo contiene los archivos .PRG , .BMP, .ICO, .HBC, .HBP .FMG.
instale mediante SETUP.EXE la version de HMG3.0.37 en su carpeta por defecto.
DEMO1.HBP pertenece a la carpeta C:\HMG3.0.37\SAMPLES\ACTIVEX.1
en dicha carpeta no existe el archivo de recurso .RC
en la carpeta C:\HMG3.0.37\SAMPLES\EXTERNAL.WINDOWS\ACTIVEX si existe DEMO.RC de 0 KB
y compila perfectamente.
IDE crea un nuevo .RC en la carpeta si en ella no existe y la agrega al proyecto que se a abierto
traspasando en contenido del anterior proyecto
el video esta en http://www.youtube.com/watch?v=GqGqMbu3DSk

Re: HMG 3.0.36 (Test)

Posted: Mon Jun 20, 2011 3:59 pm
by Roberto Lopez
danielmaximiliano wrote:Hola Roberto:
subo video para el error que encontre.
te comento que la carpeta de mi proyecto solo contiene los archivos .PRG , .BMP, .ICO, .HBC, .HBP .FMG.
instale mediante SETUP.EXE la version de HMG3.0.37 en su carpeta por defecto.
DEMO1.HBP pertenece a la carpeta C:\HMG3.0.37\SAMPLES\ACTIVEX.1
en dicha carpeta no existe el archivo de recurso .RC
en la carpeta C:\HMG3.0.37\SAMPLES\EXTERNAL.WINDOWS\ACTIVEX si existe DEMO.RC de 0 KB
y compila perfectamente.
IDE crea un nuevo .RC en la carpeta si en ella no existe y la agrega al proyecto que se a abierto
traspasando en contenido del anterior proyecto
el video esta en http://www.youtube.com/watch?v=GqGqMbu3DSk
Gracias!

Voy a chequearlo.

Re: HMG 3.0.36 (Test)

Posted: Tue Jun 21, 2011 6:13 am
by Rathinagiri
gfilatov wrote:
Roberto Lopez wrote:Rathi, Grigory, Ricci,

What about memory leaks?

How can I check it?

I'd like to help to fix them...

TIA.
Roberto,

It is related to functions _SetPicture(), _EnableControl() and _DisableControl() in the source h_controlmisc.prg
and Button and Checkbox control with IsAppThemed() condition because we use here the Imagelist instead of the bitmap.
Solution was proposed by Ricci and consist in the adding a string
IMAGELIST_DESTROY ( _HMG_SYSDATA [ 37 ] [y] )
before the string _SetMixedBtnPictureDisabled( c , y ) or string _HMG_SYSDATA [ 37 ] := _SetMixedBtnPicture ( _HMG_SYSDATA [3] , FileName , _HMG_SYSDATA [26] )

OR replace the string
DeleteObject ( _HMG_SYSDATA [ 37 ] )
with
IMAGELIST_DESTROY ( _HMG_SYSDATA [ 37 ] [y] )
in aboved functions.

Hope that helps.


Hi Grigory,

I have changed the above lines in h_controlmisc.prg and checked with Ricci's test file from here.

http://hmgforum.com/viewtopic.php?p=16921&f=2#p16921

But, even then, every time the button is pressed GDI handle count is increased by 2000 handles. (Please note that, Ricci complained that every time the button is pressed 8000 GDI handles are used. But now it is reduced to only 2000 handles. So, we have to find out from where it is leaking...)

Regarding your suggestion, in some places we have to use IMAGELIST_DESTROY ( _HMG_SYSDATA [ 37 ] ) instead of IMAGELIST_DESTROY ( _HMG_SYSDATA [ 37 ] [y] )

I am attaching the h_controlmisc.prg I have changed...

Re: HMG 3.0.36 (Test)

Posted: Tue Jun 21, 2011 11:34 am
by gfilatov
rathinagiri wrote: Hi Grigory,

I have changed the above lines in h_controlmisc.prg and checked with Ricci's test file from here.

http://hmgforum.com/viewtopic.php?p=16921&f=2#p16921

But, even then, every time the button is pressed GDI handle count is increased by 2000 handles. (Please note that, Ricci complained that every time the button is pressed 8000 GDI handles are used. But now it is reduced to only 2000 handles. So, we have to find out from where it is leaking...)

Regarding your suggestion, in some places we have to use IMAGELIST_DESTROY ( _HMG_SYSDATA [ 37 ] ) instead of IMAGELIST_DESTROY ( _HMG_SYSDATA [ 37 ] [y] )

I am attaching the h_controlmisc.prg I have changed...


Hi Rathi,

Ok, thanks :!:

I've uploaded an updated h_controlmisc.prg with small corrections (these changes are related to controls with IsAppThemed() condition only).

> So, we have to find out from where it is leaking...
Probably there is the other place with leaking of the resources. :?

Re: HMG 3.0.36 (Test)

Posted: Tue Jun 21, 2011 1:44 pm
by Rathinagiri
Superb Grigory!

Now there is no GDI handles increase. It is only 41 handles.

Re: HMG 3.0.36 (Test)

Posted: Tue Jun 21, 2011 3:57 pm
by Roberto Lopez
rathinagiri wrote:Superb Grigory!

Now there is no GDI handles increase. It is only 41 handles.
Thanks to all (Rathi, Grigory Ricci) for fix this!

Re: HMG 3.0.36 (Test)

Posted: Tue Jun 21, 2011 3:58 pm
by Roberto Lopez
danielmaximiliano wrote:Hola Roberto:
subo video para el error que encontre.
te comento que la carpeta de mi proyecto solo contiene los archivos .PRG , .BMP, .ICO, .HBC, .HBP .FMG.
instale mediante SETUP.EXE la version de HMG3.0.37 en su carpeta por defecto.
DEMO1.HBP pertenece a la carpeta C:\HMG3.0.37\SAMPLES\ACTIVEX.1
en dicha carpeta no existe el archivo de recurso .RC
en la carpeta C:\HMG3.0.37\SAMPLES\EXTERNAL.WINDOWS\ACTIVEX si existe DEMO.RC de 0 KB
y compila perfectamente.
IDE crea un nuevo .RC en la carpeta si en ella no existe y la agrega al proyecto que se a abierto
traspasando en contenido del anterior proyecto
el video esta en http://www.youtube.com/watch?v=GqGqMbu3DSk
Ya está solucionado.

Podés descargarlo de acá: download/file.php?id=1648

Re: HMG 3.0.36 (Test)

Posted: Sun Sep 01, 2019 7:55 pm
by AUGE_OHR
Roberto Lopez wrote:
Sun Jun 19, 2011 9:29 pm
You can download full version of pexports from:
http://www.emmestech.com/software/pexpo ... ports.html
link does not work and Attachment
The selected attachment does not exist anymore.
so where do i get PExport :?: