Ribbonbar getting black

User avatar
vilian
Posts: 795
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil
Contact:

Ribbonbar getting black

Post by vilian »

Hi guys,
I'm having a problem with my customers who use Windows 7. The Ribbon Bar is getting black (look the image bellow) do youknow why ?

Image
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Ribbonbar getting black

Post by James Bott »

Possibly a memory leak. I have seen things like this before.

If you exit the program, then reload it, does the problem go away?

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
vilian
Posts: 795
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil
Contact:

Re: Ribbonbar getting black

Post by vilian »

Yes, you are right!
However, it's happening only with Windows 7 users. What could I do to prevent this?
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Ribbonbar getting black

Post by Antonio Linares »

Vilian,

Please use FWH function SetResDebug() as explained here:

http://wiki.fivetechsoft.com/doku.php?i ... etresdebug
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Ribbonbar getting black

Post by James Bott »

Vilian,

The way you fix it is to find all unreleased objects and end them. Use the method the Antonio provided a link to.

I don't know why it is only happening on Windows 7. Maybe those pc's have less memory, or there is a bug in Win 7 itself. Either way you still need to end all the resources.
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
vilian
Posts: 795
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil
Contact:

Re: Ribbonbar getting black

Post by vilian »

Thank you James,
I'm testing...
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
Posts: 795
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil
Contact:

Re: Ribbonbar getting black

Post by vilian »

I don't understand... I made this:

Code: Select all

   SetResDebug( .T. )
         ....
        My Code
        .....
   FErase( "chekres.txt" )
   CheckRes()
   WinExec( "notepad checkres.txt" )    
 

But everything shown is only this:

Code: Select all

30/08/2018 09:45:51: C:\VFATEC\SFPDES\SFP.EXE -- ===================================================================================
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Ribbonbar getting black

Post by James Bott »

Vilian,

Well that is a good sign. However, you can't just open the app, then close it to find resource leaks (if that is what you did). You have to give the software a real-world workout, trying all the screens and functions to really see if there is an issue. Best would be if you can run it under Windows 7 and get the toolbar to turn black--then you know you have done enough to find the leak.

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
vilian
Posts: 795
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil
Contact:

Re: Ribbonbar getting black

Post by vilian »

James,

I only closed the app after ribbon bar started to get black.
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Ribbonbar getting black

Post by James Bott »

I am away from my computer right now. When I get back I have a few things I want to look up. I'll let you know.
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Ribbonbar getting black

Post by James Bott »

Vilian,

OK, I ran a test program just to make sure that checkRes() is working.

Code: Select all

#include "fivewin.ch"

Function Main()
   local oDlg, oFont
   setResDebug(.t.)
   ferase("checkres.txt")
   define font oFont name "Arial" size 0,-10
   define dialog oDlg
   activate dialog oDlg
   //oFont:end()  // don't destroy oFont for test
   checkres()
return nil
 
And here is the result.

08/30/18 14:16:00: C:\Users\James\Documents\Projects\CheckRes\TestCheckRes.exe -- FONT,-1056306525,MAIN(20)

As you can see, the font is reported as being unreleased.

I am using a fairly old copy of FWH (16.04) so you should run the test program above to make sure it also detects the unreleased font with your version of FWH.

If checkRes() seems to be working, then I would suggest running the Windows Task Manager and watching the memory as you test the program. Record the memory used when the program is first started, then run it until the toolbar turns black and record the memory use again. You could also watch what happens when you are using the app to see if the memory used goes up on certain processes.

That should keep you busy for awhile.

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Ribbonbar getting black

Post by cnavarro »

Indeed, the first thing is to use the technique indicated previously by Antonio
In addition, you can use this tool

https://www.nirsoft.net/utils/gdi_handles.html
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
User avatar
vilian
Posts: 795
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil
Contact:

Re: Ribbonbar getting black

Post by vilian »

James,
I really have so much care with resources and good practises, as a result checkres() is returning an empty string. I will try the tool recommend by Cnavarro.
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Ribbonbar getting black

Post by James Bott »

Vilian,

Any updates? Did you find a solution?
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
vilian
Posts: 795
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil
Contact:

Re: Ribbonbar getting black

Post by vilian »

Hi James,

Nothing yet. Checkres() Always is returning na empty string, so by this way i didn't find a solution.
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
Post Reply