HMG 3.4.0

HMG Unicode versions 3.1.x related

Moderator: Rathinagiri

User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: HMG 3.4.0

Post by mol »

I've analyzed problems with app and one of clients.
He works whole day - e.g. system start at 09:27:44 am, at 19:15:18 pm system crashes.
Error code is OS error 1450.
It's problem with available resources, I think.
When I'm observing memory usage, Every scroll in GRID increases memory usage. Closing form with this grid does not release used memory.
After few hours system is out of memory.
Is it the way to clean memory?

Regards, Marek
User avatar
tonton2
Posts: 444
Joined: Sat Jun 29, 2013 1:26 pm
Location: Algerie
Contact:

Re: HMG 3.4.0

Post by tonton2 »

mol wrote:I've analyzed problems with app and one of clients.
He works whole day - e.g. system start at 09:27:44 am, at 19:15:18 pm system crashes.
Error code is OS error 1450.
It's problem with available resources, I think.
When I'm observing memory usage, Every scroll in GRID increases memory usage. Closing form with this grid does not release used memory.
After few hours system is out of memory.
Is it the way to clean memory?

Regards, Marek
I think , I have the same problem
thank's
L'Algerie vous salut
Y.TABET
EduardoLuis
Posts: 682
Joined: Tue Jun 04, 2013 6:33 pm
Location: Argentina

Re: HMG 3.4.0

Post by EduardoLuis »

Hi Mol & Tonton

I'm not sure Grid scrolling is the reason why your system crash.-
Take in count that there are a lot of resources that diminish your memory.-
I've that problem long ago with Clipper 5.3.-
To solve it i divide app in several small dedicated appe.-
I develope a principal app (called "Principal"), it works as a master administrador.-
Then from that app i call and execute differents app (exes); as principal app is always "on", when user closes secondarys app, memory used remains only that used by "Principal".-
For mor information, In my developes i use lots of graphics (style .NET screens), and never crashes the system.-
This way i solve 2 issues:
1) If i must upgrade any secondary app, i don't need to re-compile all system.-
2) Control every time memory ussage.-
In particular, in some of my app there are on screen 4 grids, and no mather how much user performs scrolling, never crash.
Modifying you app to match this procedure may take several hours and lot of effort, but advantages justifies the effort.-
Finally, i develope my app on an arcaic and small PC (Pentium IV with only 512 Mg. Ram), so if it works on this, it will work on best and highest machines.- (I'm using HGM 3.4 with patch 1 under Win XP SP3 64 bits).-
With regards.
Eduardo
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: HMG 3.4.0

Post by mol »

I've turned on resource monitor (from task manager) on one display and my app on second display. I've scrolled only one table during test. Every next page (dbf has about 1000 records) the usage of resources has grown.
I'm not using graphics - because of speed on old computers my clients use.
User avatar
andyglezl
Posts: 1461
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Contact:

Re: HMG 3.4.0

Post by andyglezl »

Hola Mol

Hice el test que mencionas y no me queda claro como funciona el "Monitor de recursos", puesto que en vez de incrementar,
disminuye la memoria en uso y se incrementa la memoria libre.

1.- Cargé el Monitor de recursos
2.- Entré al Grid
3.- Oprimí la tecla "PgDn" hasta recorrer los "10,090" registros que tiene la DB
-----------------------------------------------------------------------------------------------------------------------
Hello Mol

I did the test that you mention and I'm not clear as the "Resource Monitor" works, since instead of increasing,
diminishes the memory in use and free memory increases.

1. Load the Resource Monitor
2. I entered the Grid
3. pressed the "PgDn" key to scroll through the "10,090" records that have the DB
Memoria.png
Memoria.png (532.38 KiB) Viewed 6193 times
Andrés González López
Desde Guadalajara, Jalisco. México.
User avatar
luisvasquezcl
Posts: 1258
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Contact:

Re: HMG 3.4.0

Post by luisvasquezcl »

Hi friends,
I confirm reported by Mol, I did the tests and effectively increases memory usage and does not release. this is a serious problem because the grid is one of the most used controls.
I hope there is a solution to this problem.
Best regards,
Luis Vásquez.

Hola amigos,
Confirmo lo informado por Mol, hice las pruebas y efectivamente aumenta el uso de memoria y no la libera. esto es un problema grave ya que el grid es uno de los controles más usados.
espero haya solución a este problema.
Saludos cordiales,
Luis Vásquez
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: HMG 3.4.0

Post by mol »

I found error in GRID control while using CHECKBOX in COLUMNCONTROLS.
GRID.CELL(nCheckBoxKolumnIndex) always return .f.
Try this sample produces from GRID_09:

Code: Select all

/*
* HMG Grid Demo
* Please try this sample to test CELL property and ITEM property
*/

#include "hmg.ch"

Function Main
Local aRows:= array(1)

	DEFINE WINDOW Form_1 ;
		AT 0,0 ;
		WIDTH 640 ;
		HEIGHT 400 ;
		TITLE 'GRID ERROR TEST' ;
		MAIN 

		DEFINE MAIN MENU
			DEFINE POPUP 'File'
				MENUITEM 'Get Item'	ACTION GetItem()
			END POPUP
		END MENU

		aRows [1]	:= {113.12, date(), 2, 3, .t. }

		@ 10,10 GRID Grid_1 ;
		WIDTH 620 ;
		HEIGHT 330 ;
		HEADERS {'Column 1','Column 2','Column 3','Column 4','Column 5'} ;
		WIDTHS {100,100,100,140,100} ;
		ITEMS aRows ;
		EDIT ON CHANGE playbeep() ;
		COLUMNCONTROLS { {'TEXTBOX','NUMERIC','$ 999,999.99'} , {'DATEPICKER','DROPDOWN'} , {'COMBOBOX',{'One','Two','Three'}} , { 'SPINNER' , 1 , 20 } , { 'CHECKBOX' , 'Yes' , 'No' } } ;
		CELLNAVIGATION

	END WINDOW

	CENTER WINDOW Form_1

	ACTIVATE WINDOW Form_1

Return

PROCEDURE GETITEM()
local a
local n
	n := 1
	aItem := Form_1.Grid_1.Item (n) 
	aCells := { Form_1.Grid_1.Cell(1,1),;
				Form_1.Grid_1.Cell(1,2),;
				Form_1.Grid_1.Cell(1,3),;
				Form_1.Grid_1.Cell(1,4),;
				Form_1.Grid_1.Cell(1,5) }
				
	msgdebug("this is array built with Grid_1.CELL(i) property", aCells)
	msgdebug("this is Grid_1.ITEM property", aItem, " and 5'th column:",  aItem[5])

RETURN

I've not tested with hmg 3.4.1 (i had no time to install it :? ), I think the result will be the same.
Please test it.
Post Reply