Program is frozen

Program is frozen

Postby Natter » Sun Jun 04, 2023 9:59 am

Hi,

My application sometimes freezes and it can only be interrupted through the Task Manager.
I can't determine the reason for the hang-up.
Is there any way to determine the cause ? Or, through an external application, to determine that the program is frozen ?
Natter
 
Posts: 1221
Joined: Mon May 14, 2007 9:49 am

Re: Program is frozen

Postby Antonio Linares » Sun Jun 04, 2023 11:00 am

Dear Yuri,

Look for hb_out.log file
regards, saludos

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

Re: Program is frozen

Postby Natter » Sun Jun 04, 2023 2:06 pm

I don't have an hb_out.log file being created. :(
Can it be created for xHarbour ?
Natter
 
Posts: 1221
Joined: Mon May 14, 2007 9:49 am

Re: Program is frozen

Postby karinha » Sun Jun 04, 2023 2:46 pm

In which FUNCTION? In this function, have WHILE... ENDDO? What memory stick does this machine have? If I wasn't afraid, post the SOURCE code for criticism, ok?

¿En qué FUNCIÓN? En esta función, tenga WHILE... ENDDO? ¿Qué tarjeta de memoria tiene esta máquina? Si no tenía miedo, publique el código SOURCE para la crítica, ¿de acuerdo?

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7826
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Program is frozen

Postby Rick Lipkin » Sun Jun 04, 2023 3:01 pm

Just a shot in the dark ... see if you can update your video driver on your machine ... Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Program is frozen

Postby Antonio Linares » Sun Jun 04, 2023 3:32 pm

Dear Yuri,

You may use FWLog "here1", etc. in the different options of your app so when it frozens you will know where the app was
regards, saludos

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

Re: Program is frozen

Postby Natter » Sun Jun 04, 2023 3:47 pm

Antonio, excuse me, I don't understand - what does it mean to use the FWlog "here1"? In this case, there is no specific error, just the program stops responding to any actions
Natter
 
Posts: 1221
Joined: Mon May 14, 2007 9:49 am

Re: Program is frozen

Postby karinha » Sun Jun 04, 2023 4:04 pm

Hi,

this message does not appear "unrecoverable error 9001"?

https://forums.fivetechsupport.com/viewtopic.php?f=3&t=39945

Code: Select all  Expand view

// C:\FWH..\SAMPLES\WHENGET.PRG - 25/09/2022 - kapiabafw@gmail.com
#include "FiveWin.ch"

FUNCTION Main()

   Dlg_Get_When()

RETURN NIL

FUNCTION Dlg_Get_When() // .F.

   LOCAL oDlg, oSay, oBrush, lTest := .T. , oCbx, oFont, oSay2, oSay3
   LOCAL oGet, cName := "ToolTip: como llamar con WHEN( .F. )?"

   DEFINE FONT oFont  NAME "Ms Sans Serif"  SIZE 00, -26 BOLD
   
   DEFINE BRUSH oBrush GRADIENT { { 0.4, nRGB( 75, 144, 223 ), nRGB( 41, 85, 145 ) }, ;
      { 0.6, nRGB( 24,  61, 118 ), nRGB( 50, 95, 158 ) } }
   
   DEFINE DIALOG oDlg TITLE "This a Test de ToolTip con GET .F." ;
      SIZE 400, 400 PIXEL BRUSH oBrush TRANSPARENT

   oDlg:lHelpIcon := .F.
   
   @ 2, 2 GROUP TO 100, 130 of oDlg pixel COLOR CLR_YELLOW, CLR_BLACK ;
      PROMPT "ToolTip: como llamar con WHEN( .F. )?"
   
   @ 25, 15 SAY oSay PROMPT "This a Test de ToolTip con GET .F." of oDlg ;
      SIZE 140, 12 COLOR CLR_WHITE PIXEL transparent adjust

   @ 35.5, 15 GET oGet VAR cName OF oDlg SIZE 110, 10 PIXEL

   oGet:Disable()
   oGet:lBtnTransparent := .t.       // transparent button get oGet3
   oGet:lAdjustBtn      := .t.       // Button Get Adjust Witdh oGet3
   oGet:lDisColors      := .f.       // Deactive disable color
   oGet:nClrTextDis     := CLR_WHITE // Color text disable status
   oGet:nClrPaneDis     := CLR_BLUE  // Color Pane disable status

   oGet:lReadOnly := .T.
   oGet:lUpdate   := .T.

   // con GET .F. no funciona
   // oGet:cToolTip := OemToAnsi( "ToolTip de Antonio Linares Ca¤as con WHEN(.F.) no Muestra" )

   // Asi, funciona con GET .F.
   oDlg:cToolTip := { || MyToolTip( 1 ) } // funciona

   @ 125, 15 SAY oSay2 PROMPT "Fuerza Linares jájájájá" OF oDlg FONT oFont   ;
      SIZE 150, 20 COLOR CLR_YELLOW, CLR_BLACK PIXEL TRANSPARENT ADJUST

   @ 145, 15 SAY oSay2 PROMPT "TooTip con GET .F., Como?" OF oDlg FONT oFont ;
      SIZE 150, 20 COLOR CLR_HRED, CLR_BLACK PIXEL TRANSPARENT ADJUST
   
   @ 10, 150 button "Test" pixel action( oDlg:End() ) CANCEL

   ACTIVATE DIALOG oDlg CENTERED

   oBrush:End()
   oFont:End()
   
RETURN NIL

FUNCTION MyToolTip( nOpt ) // funciona perfecto

   LOCAL cRet // := SPACE(20)

   FWLOG nOpt  // WHENGET.LOG

   Do Case
   Case nOpt = 1
      cRet := "ToolTip de Antonio Linares Canas con WHEN(.F.) Asi funciona"
   Case nOpt = 2
      cRet := "Produtos da área 02 GET 2" // etc...
   Case nOpt = 3
      cRet := "Produtos da área 03"
   Case nOpt = 4
      cRet := "Produtos da área 04"
   Case nOpt = 5
      cRet := "Produtos da área 05"
   Case nOpt = 6
      cRet := "Produtos da área 06"
   Case nOpt = 7
      cRet := "Produtos da área 07"
   Case nOpt = 8
      cRet := "Produtos da área 08"
   Case nOpt = 9
      cRet := "Produtos da área 09"
   Case nOpt = 10
      cRet := "Produtos da área 10"
   Case nOpt = 11
      cRet := "Produtos da área 11"
   Case nOpt = 12
      cRet := "Produtos da área 12"
   Case nOpt = 13
      cRet := "Produtos da área 13"
   Case nOpt = 14
      cRet := "Produtos da área 14"
   Case nOpt = 15
      cRet := "Produtos da área 15"
   Case nOpt = 16
      cRet := "Produtos da área 16"
   Case nOpt = 17
      cRet := "Produtos da área 17"
   Case nOpt = 18
      cRet := "Produtos da área 18"
   Case nOpt = 19
      cRet := "Produtos da área 19"
   Case nOpt = 20
      cRet := "Produtos da área 20"
   EndCase

RETURN( cRet )

// FIN
 


Reagrads, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7826
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Program is frozen

Postby Natter » Sun Jun 04, 2023 4:13 pm

I have already written - there are no error messages. The program simply stops responding (for different users).
Natter
 
Posts: 1221
Joined: Mon May 14, 2007 9:49 am

Re: Program is frozen

Postby karinha » Sun Jun 04, 2023 4:21 pm

Do you have WHILE... ENDDO with very LONG processing, without the SYSREFRESH() command? And you didn't inform what is the configuration of the computer and what is the capacity of the MEMORY STICK.

¿Tiene WHILE... ENDDO con un procesamiento muy LARGO, sin el comando SYSREFRESH()? Y no informaste cuál es la configuración de la computadora y cuál es la capacidad del MEMORY STICK. (???) Google translator very crazy. Hahahaha,

MEMORY STICK -> tarjeta de memoria.

Regards, saluds.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7826
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Program is frozen

Postby Natter » Sun Jun 04, 2023 4:29 pm

There are several users (i5, 8GB, W10)
Natter
 
Posts: 1221
Joined: Mon May 14, 2007 9:49 am

Re: Program is frozen

Postby karinha » Sun Jun 04, 2023 5:13 pm

Use an MSGRUN() to see the function's behavior and/or cause the stack to overflow.

Use un MSGRUN() para ver el comportamiento de la función y/o hacer que la pila se desborde.

Code: Select all  Expand view

      // PROBLEMS ON MY COMPUTER
      MsgRun( "WAIT A MOMENT...             ", ;
         "Please,    Wait!   Wait! Wait...  ", ;
         {|| WinExec( MY_FUNCTION() ), 3 } )
 


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7826
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Program is frozen

Postby Jimmy » Wed Jun 07, 2023 4:04 pm

hi Natter,

what OS :?:
Local or Network :?:
is FW App UniCode or ANSI :?:

"normal" i would use Debugger to "see" what is going on
as Antonio say you can put FWLOG into your MAIM and look which Step are working before it crash

i did had those Situation when call a ANSI API using FW_UniCode(.T.) ...
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Program is frozen

Postby Natter » Wed Jun 07, 2023 6:54 pm

Hi, Jimmy

I, more or less, coped with the problem. I rewrote, in some places, the logic. True, I did not find a specific reason, but users, so far, do not swear :?
At the same time, I found this function for monitoring hung applications IsHungAppWindow() User32.dll
Natter
 
Posts: 1221
Joined: Mon May 14, 2007 9:49 am

Re: Program is frozen

Postby James Bott » Thu Jun 15, 2023 12:37 am

Natter,

It sounds like a memory leak. Check to make sure you have ended all vars at the end of routines.

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 92 guests