HMG 3.0.36 (Test)

HMG announcements; Latest HMG-related news, releases, fixes and updates.

Moderator: Rathinagiri

User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 3.0.36 (Test)

Post 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.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
danielmaximiliano
Posts: 2611
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: HMG 3.0.36 (Test)

Post 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
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 3.0.36 (Test)

Post 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.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: HMG 3.0.36 (Test)

Post 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...
Attachments
h_controlmisc.zip
(32.92 KiB) Downloaded 362 times
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
gfilatov
Posts: 1060
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Re: HMG 3.0.36 (Test)

Post 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. :?
Attachments
h_controlmisc.zip
Updated h_controlmisc.prg
(33.29 KiB) Downloaded 354 times
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: HMG 3.0.36 (Test)

Post by Rathinagiri »

Superb Grigory!

Now there is no GDI handles increase. It is only 41 handles.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 3.0.36 (Test)

Post 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!
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 3.0.36 (Test)

Post 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
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
AUGE_OHR
Posts: 2060
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: HMG 3.0.36 (Test)

Post 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 :?:
have fun
Jimmy
Post Reply