Page 1 of 1
Program is frozen
Posted:
Sun Jun 04, 2023 9:59 am
by Natter
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 ?
Re: Program is frozen
Posted:
Sun Jun 04, 2023 11:00 am
by Antonio Linares
Dear Yuri,
Look for hb_out.log file
Re: Program is frozen
Posted:
Sun Jun 04, 2023 2:06 pm
by Natter
I don't have an hb_out.log file being created.
Can it be created for xHarbour ?
Re: Program is frozen
Posted:
Sun Jun 04, 2023 2:46 pm
by karinha
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.
Re: Program is frozen
Posted:
Sun Jun 04, 2023 3:01 pm
by Rick Lipkin
Just a shot in the dark ... see if you can update your video driver on your machine ... Rick Lipkin
Re: Program is frozen
Posted:
Sun Jun 04, 2023 3:32 pm
by Antonio Linares
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
Re: Program is frozen
Posted:
Sun Jun 04, 2023 3:47 pm
by Natter
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
Re: Program is frozen
Posted:
Sun Jun 04, 2023 4:04 pm
by karinha
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 NILFUNCTION 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 NILFUNCTION 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" EndCaseRETURN( cRet
)// FIN
Reagrads, saludos.
Re: Program is frozen
Posted:
Sun Jun 04, 2023 4:13 pm
by Natter
I have already written - there are no error messages. The program simply stops responding (for different users).
Re: Program is frozen
Posted:
Sun Jun 04, 2023 4:21 pm
by karinha
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.
Re: Program is frozen
Posted:
Sun Jun 04, 2023 4:29 pm
by Natter
There are several users (i5, 8GB, W10)
Re: Program is frozen
Posted:
Sun Jun 04, 2023 5:13 pm
by karinha
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.
Re: Program is frozen
Posted:
Wed Jun 07, 2023 4:04 pm
by Jimmy
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.) ...
Re: Program is frozen
Posted:
Wed Jun 07, 2023 6:54 pm
by Natter
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
Re: Program is frozen
Posted:
Thu Jun 15, 2023 12:37 am
by James Bott
Natter,
It sounds like a memory leak. Check to make sure you have ended all vars at the end of routines.
James