Ribbonbar getting black

Ribbonbar getting black

Postby vilian » Tue Aug 28, 2018 6:53 pm

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
vilian
 
Posts: 978
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Re: Ribbonbar getting black

Postby James Bott » Tue Aug 28, 2018 10:07 pm

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
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Ribbonbar getting black

Postby vilian » Wed Aug 29, 2018 12:19 am

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
vilian
 
Posts: 978
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Re: Ribbonbar getting black

Postby Antonio Linares » Wed Aug 29, 2018 7:40 am

Vilian,

Please use FWH function SetResDebug() as explained here:

http://wiki.fivetechsoft.com/doku.php?id=fivewin_function_setresdebug
regards, saludos

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

Re: Ribbonbar getting black

Postby James Bott » Thu Aug 30, 2018 2:21 pm

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
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Ribbonbar getting black

Postby vilian » Thu Aug 30, 2018 5:32 pm

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

Re: Ribbonbar getting black

Postby vilian » Thu Aug 30, 2018 6:09 pm

I don't understand... I made this:
Code: Select all  Expand view  RUN

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



But everything shown is only this:
Code: Select all  Expand view  RUN
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
vilian
 
Posts: 978
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Re: Ribbonbar getting black

Postby James Bott » Thu Aug 30, 2018 6:41 pm

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
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Ribbonbar getting black

Postby vilian » Thu Aug 30, 2018 7:10 pm

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
vilian
 
Posts: 978
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Re: Ribbonbar getting black

Postby James Bott » Thu Aug 30, 2018 7:46 pm

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: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Ribbonbar getting black

Postby James Bott » Thu Aug 30, 2018 9:25 pm

Vilian,

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

Code: Select all  Expand view  RUN
#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
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Ribbonbar getting black

Postby cnavarro » Thu Aug 30, 2018 9:59 pm

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
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6549
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Ribbonbar getting black

Postby vilian » Fri Aug 31, 2018 10:57 am

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
vilian
 
Posts: 978
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Re: Ribbonbar getting black

Postby James Bott » Mon Sep 10, 2018 5:29 pm

Vilian,

Any updates? Did you find a solution?
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Ribbonbar getting black

Postby vilian » Mon Sep 10, 2018 5:39 pm

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
User avatar
vilian
 
Posts: 978
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 31 guests