Last FWH version. Memory leak.

Re: Last FWH version. Memory leak.

Postby Antonio Linares » Sat Feb 09, 2013 12:16 pm

IBTC wrote:I had also problem with memory leaks. For me they disappeared after I disabled

Code: Select all  Expand view
::oGet:SetFont( ::oFont )


at METHOD Initiate of CLASS TComboBox. In older version of FWH this line wasn't there.


Ruediger,

Instead of removing such code, please change the Method End() in Class TComboBox this way:

METHOD End() INLINE ::Hide(), If( ::oGet != nil, ::oGet:End(),), Super:End()
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Last FWH version. Memory leak.

Postby IBTC » Sat Feb 09, 2013 8:56 pm

Antonio,

Antonio Linares wrote:
IBTC wrote:Instead of removing such code, please change the Method End() in Class TComboBox this way:

METHOD End() INLINE ::Hide(), If( ::oGet != nil, ::oGet:End(),), Super:End()


Thanks. But with this change the problem with fonts/memory leak still exists.
Best Regards,
Ruediger Alich

---
HMG 3.1.3 | FTDN/FWH 13.12 | Harbour 3.2 | BCC/MinGW | Windows XP/Vista/7/8/10 (32/64-Bit), Wine (Linux/Mac) - started 1999 with FW, 1989 with Clipper
User avatar
IBTC
 
Posts: 103
Joined: Sat Oct 18, 2008 8:13 pm
Location: Stuttgart, Germany

Re: Last FWH version. Memory leak.

Postby Antonio Linares » Mon Feb 11, 2013 1:53 pm

Ruediger,

Could you please provide a small test to reproduce the memory leak here ? thanks :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Last FWH version. Memory leak.

Postby James Bott » Mon Feb 11, 2013 4:22 pm

I have had toolbar icons disappear due to memory leaks in the past. One way to test it is to create a memory leak intentionally so you can run the program and keep triggering the memory leak until the icons disappear.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Last FWH version. Memory leak.

Postby Antonio Linares » Mon Feb 11, 2013 4:49 pm

You can easily check if an application is experiencing GDI objects handles leaking from here:

Image

Trying to find the same option in Windows 8... :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Last FWH version. Memory leak.

Postby Antonio Linares » Mon Feb 11, 2013 4:53 pm

Found :-)

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Last FWH version. Memory leak.

Postby James Bott » Mon Feb 11, 2013 5:21 pm

Antonio,

Will you explain what exactly you found?

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Last FWH version. Memory leak.

Postby Antonio Linares » Mon Feb 11, 2013 6:08 pm

James,

How to monitor the GDI objects consumed by an application, reported from the Windows task manager :-)

If there is a GDI objects handles leaking, that amount will keep increasing
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Last FWH version. Memory leak.

Postby Randal » Tue Feb 12, 2013 7:46 pm

Antonio Linares wrote:James,

How to monitor the GDI objects consumed by an application, reported from the Windows task manager :-)

If there is a GDI objects handles leaking, that amount will keep increasing


Is this the type of memory problem they are reporting? Is this a GDI problem or some other kind of problem?

Thanks,
Randal
Randal
 
Posts: 260
Joined: Mon Oct 24, 2005 8:04 pm

Re: Last FWH version. Memory leak.

Postby Antonio Linares » Tue Feb 12, 2013 9:41 pm

The problem is related with bitmaps, so it should be a GDI objects handles leaking issue
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Last FWH version. Memory leak.

Postby James Bott » Wed Feb 13, 2013 10:02 pm

I have the feeling that the disappearing bitmaps are just a symptom of a memory leak elsewhere. As I suggested earlier, I think this could be proven by creating an app with a toolbar, then running a loop that creates something like a font and doesn't destroy it. You might also have to re-display the toolbar occasionally to see the effect.

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Last FWH version. Memory leak.

Postby James Bott » Wed Feb 13, 2013 10:17 pm

I re-read the earlier posts in this thread and I think this may be the problem.

I had also problem with memory leaks. For me they disappeared after I disabled

CODE: SELECT ALL EXPAND VIEW
::oGet:SetFont( ::oFont )


at METHOD Initiate of CLASS TComboBox. In older version of FWH this line wasn't there.
Best Regards,
Ruediger Alich


I don't have the 12.12 version of FWH so I can't look at the source, but there may be a font getting created and not destroyed.

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Last FWH version. Memory leak.

Postby Randal » Thu Feb 14, 2013 2:27 pm

Wouldn't they be able to identify the problem as a font not being released or a gdi problem using checkres, if that were the problem?

Randal
Randal
 
Posts: 260
Joined: Mon Oct 24, 2005 8:04 pm

Re: Last FWH version. Memory leak.

Postby James Bott » Thu Feb 14, 2013 2:39 pm

Wouldn't they be able to identify the problem as a font not being released or a gdi problem using checkres, if that were the problem? -Randal


I would think so.

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Last FWH version. Memory leak.

Postby James Bott » Thu Feb 14, 2013 3:49 pm

I notice there is a similar discussion of vanishing bitmaps on toolbars back in Nov 2012 here:

http://forums.fivetechsupport.com/viewtopic.php?f=3&t=24329

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 95 guests