FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Error Dialog? ( Solved! )
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
Error Dialog? ( Solved! )
Posted: Wed Jan 07, 2009 06:36 PM
Friends,

Because my error dialog is different?
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: Error Dialog?
Posted: Wed Jan 07, 2009 06:41 PM

do you use other libs?, no fivewin libs?

Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
Re: Error Dialog?
Posted: Wed Jan 07, 2009 06:46 PM
They are all libs in my project:
FiveHx.lib FiveHC.lib +
rtl.lib +
vm.lib +
gtgui.lib +
lang.lib +
macro.lib +
rdd.lib +
codepage.lib +
dbfntx.lib +
dbfcdx.lib +
dbffpt.lib +
hbsix.lib +
common.lib +
pp.lib +
"C:\apps\libs\libmysql.lib" +
"C:\apps\libs\sqllib_xHB_110g.LIB" +
"H:\xHarbour\lib\zlib.lib" +
"H:\xHarbour\lib\ct.lib" +
"H:\xHarbour\lib\hbcc.lib" +
"H:\xHarbour\lib\hsx.lib" +
"H:\xHarbour\lib\tip.lib" +
"H:\xHarbour\lib\codepage.lib" +
"H:\xHarbour\lib\pcrepos.lib" +
"H:\BCC55\Lib\PSDK\msimg32.lib" +
"H:\BCC55\Lib\PSDK\url.lib" +
cw32.lib +
import32.lib +
odbc32.lib +
nddeapi.lib +
iphlpapi.lib +
rasapi32.lib +
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: Error Dialog?
Posted: Wed Jan 07, 2009 06:51 PM

please post lines code where you have error...
isn't fivewin error, maybe other class that you use

Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
Re: Error Dialog?
Posted: Wed Jan 07, 2009 07:25 PM
I forced this error to generate the error dialog:
oTest:setText( "test" )

And oTest not exists, is not a object!

This the error.log source:
----------------------------- xHarbour Error Log ------------------------------

Date...............: 07/01/2009
Time...............: 16:28:17

Application name...: C:\apps\test.EXE
Workstation name...: RS-04
Available memory...: 265564
Current disk.......: C
Current directory..: apps
Free disk space....: 21074223104

Operating system...: Windows  XP Professional 5.01.2600 Service Pack 3
xHarbour version...: xHarbour build 1.1.0 Intl. (SimpLex) (Rev. 6195)
xHarbour built on..: Aug 23 2008 13:13:13
C/C++ compiler.....: Borland C++ 5.5.1 (32 bit)
Multi Threading....: NO
VM Optimization....: 0

Current Area ......:1

-------------------------- Environmental Information --------------------------

SET ALTERNATE......: OFF
SET ALTFILE........:
SET AUTOPEN........: ON
SET AUTORDER.......: 0
SET AUTOSHARE......: 0
SET BACKGROUNDTASKS: OFF
SET BACKGROUNDTICK.: 1000
SET BELL...........: OFF
SET BLINK..........: .T.
SET CANCEL.........: ON
SET CENTURY........: ON
SET COLOR..........: W/N,N/W,N/N,N/N,N/W
SET CONFIRM........: OFF
SET CONSOLE........: ON
SET COUNT..........: 0
SET CURSOR.........: 1
SET DATE FORMAT....: DD/MM/YYYY
SET DBFLOCKSCHEME..: 0
SET DEBUG..........: OFF
SET DECIMALS.......: 2
SET DEFAULT........:
SET DEFEXTENSIONS..: ON
SET DELETED........: OFF
SET DELIMCHARS.....: ::
SET DELIMETERS.....: OFF
SET DEVICE.........: SCREEN
SET DIRCASE........: 0
SET DIRSEPARATOR...: \
SET EOL............: 13
SET EPOCH..........: 1900
SET ERRORLOG.......: ERROR.LOG,.F.
SET ERRORLOOP......: 8
SET ESCAPE.........: ON
SET EVENTMASK......: 128
SET EXACT..........: OFF
SET EXCLUSIVE......: ON
SET EXIT...........: OFF
SET EXTRA..........: OFF
SET EXTRAFILE......:
SET FILECASE.......: 0
SET FIXED..........: OFF
SET FORCEOPT.......: OFF
SET HARDCOMMIT.....: ON
SET IDLEREPEAT.....: ON
SET INSERT.........: OFF
SET INTENSITY......: ON
SET LANGUAGE.......: EN
SET MARGIN.........: 0
SET MBLOCKSIZE.....: 0
SET MCENTER........: OFF
SET MESSAGE........: 0
SET MFILEEXT.......:
SET OPTIMIZE.......: ON
SET OUTPUTSAFETY...: ON
SET PATH...........:
SET PRINTER........: OFF
SET PRINTERJOB.....:
SET PRINTFILE......: PRN
SET SCOREBOARD.....: ON
SET SCROLLBREAK....: ON
SET SOFTSEEK.......: OFF
SET STRICTREAD.....: OFF
SET TRACE..........: ON
SET TRACEFILE......: TRACE.LOG
SET TRACESTACK.....: 2
SET TRIMFILENAME...: .F.
SET TYPEAHEAD......: 50
SET UNIQUE.........: OFF
SET VIDEOMODE......: 0
SET WRAP...........: OFF

---------------------------Detailed Work Area Items----------------------------


-------------------- Internal Error Handling Information  ---------------------

Subsystem Call ....: BASE
System Code .......: 1003
Default Status ....: .F.
Description .......: Variable does not exist
Operation .........: OTEST
Arguments .........:
Involved File .....:
Dos Error Code ....: 0

 Trace Through:
----------------
MAIN                  :      72 in Module: C:\repository\apps\main.prg


############################## Video Screen Dump ##############################

+--------------------------------------------------------------------------------+
|                                                                                |
|Error BASE/1003  Variable does not exist: OTEST                                 |
|                                                                                |
|Error at ...: MAIN(72) in Module: C:\repository\apps\main.prg                   |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
|                                                                                |
+--------------------------------------------------------------------------------+
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: Error Dialog?
Posted: Wed Jan 07, 2009 07:28 PM

???

Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
Re: Error Dialog?
Posted: Wed Jan 07, 2009 07:32 PM
Daniel Garcia-Gil wrote:???


Daniel,

Up!!
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Error Dialog?
Posted: Wed Jan 07, 2009 08:01 PM

Júlio,

It seems that xHarbour standard error manager is being used instead of FWH one.
Thats why you get a different error.log and a standard Alert() (FWH version).

Are you using a modified FWH\source\function\ErrSysW.prg ? Are you calling ErrorBlock() somewhere from your app ?

Please check that FiveH.lib is linked before xHarbour rtl.lib.
Also please run FWH\samples\TestErro.prg and see if you get FWH error dialog from that example

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
Re: Error Dialog?
Posted: Wed Jan 07, 2009 08:11 PM
>> Are you using a modified FWH\source\function\ErrSysW.prg ? Are you calling ErrorBlock() somewhere from your app ?

Yes Antonio. I have added the function gpfHandler( oException ) to get handle erros with setUnhandledExceptionFilter( @gpfHandler() ) and no, I don't calling ErrorBlock() into my app

The gpfHanlder( oException ) function:
&& ------------------------------
FUNCTION gpfHandler( oException )
&& ------------------------------

LOCAL oError

LOCAL cMensagemErro := ""
LOCAL nCodigoErro   := 0


&& -- Verificando se oException é um objeto para iniciar o tratamento
IF typeCheck( oException, "O" )

   nCodigoErro := oException:ExceptionRecord:ExceptionCode

   && -- Verificando qual tipo de exceção foi levantada
   SWITCH nCodigoErro

          CASE EXCEPTION_ACCESS_VIOLATION
               cMensagemErro := "EXCEPTION_ACCESS_VIOLATION - O thread tentou ler/escrever num endereço virtual ao qual não tinha acesso."
               EXIT

          CASE EXCEPTION_DATATYPE_MISALIGNMENT
               cMensagemErro := "EXCEPTION_DATATYPE_MISALIGNMENT - O thread tentou ler/escrever dados desalinhados em hardware que não oferece alinhamento. Por exemplo, valores de 16 bits precisam ser alinhados em limites de 2 bytes; valores de 32 bits em limites de 4 bytes, etc. "
               EXIT

          CASE EXCEPTION_ARRAY_BOUNDS_EXCEEDED
               cMensagemErro := "EXCEPTION_ARRAY_BOUNDS_EXCEEDED - O thread tentou acessar um elemento de array fora dos limites e o hardware possibilita a checagem de limites."
               EXIT

          CASE EXCEPTION_FLT_DENORMAL_OPERAND
               cMensagemErro := "EXCEPTION_FLT_DENORMAL_OPERAND - Um dos operandos numa operação de ponto flutuante está desnormatizado. Um valor desnormatizado é um que seja pequeno demais para poder ser representado no formato de ponto flutuante padrão."
               EXIT

          CASE EXCEPTION_FLT_DIVIDE_BY_ZERO
               cMensagemErro := "EXCEPTION_FLT_DIVIDE_BY_ZERO - O thread tentou dividir um valor em ponto flutuante por um divisor em ponto flutuante igual a zero."
               EXIT

          CASE EXCEPTION_FLT_INEXACT_RESULT
               cMensagemErro := "EXCEPTION_FLT_INEXACT_RESULT - O resultado de uma operação de ponto flutuante não pode ser representado como uma fração decimal exata."
               EXIT

          CASE EXCEPTION_FLT_INVALID_OPERATION
               cMensagemErro := "EXCEPTION_FLT_INVALID_OPERATION - Qualquer operação de ponto flutuante não incluída na lista."
               EXIT

          CASE EXCEPTION_FLT_OVERFLOW
               cMensagemErro := "EXCEPTION_FLT_OVERFLOW - O expoente de uma operação de ponto flutuante é maior que a magnitude permitida pelo tipo correspondente."
               EXIT

          CASE EXCEPTION_FLT_STACK_CHECK
               cMensagemErro := 'EXCEPTION_FLT_STACK_CHECK - A pilha ficou desalinhada ("estourou" ou "ficou abaixo") como resultado de uma operação de ponto flutuante.'
               EXIT

          CASE EXCEPTION_FLT_UNDERFLOW
               cMensagemErro := "EXCEPTION_FLT_UNDERFLOW - O expoente de uma operação de ponto flutuante é menor que a magnitude permitida pelo tipo correspondente."
               EXIT

          CASE EXCEPTION_INT_DIVIDE_BY_ZERO
               cMensagemErro := "EXCEPTION_INT_DIVIDE_BY_ZERO - O thread tentou dividir um valor inteiro por um divisor inteiro igual a zero."
               EXIT

          CASE EXCEPTION_INT_OVERFLOW
               cMensagemErro := "EXCEPTION_INT_OVERFLOW - O resultado de uma operação com inteiros causou uma transposição (carry) além do bit mais significativo do resultado."
               EXIT

          CASE EXCEPTION_PRIV_INSTRUCTION
               cMensagemErro := "EXCEPTION_PRIV_INSTRUCTION - O thread tentou executar uma instrução cuja operação não é permitida no modo de máquina atual."
               EXIT

          CASE EXCEPTION_IN_PAGE_ERROR
               cMensagemErro := "EXCEPTION_IN_PAGE_ERROR - O thread tentou acessar uma página que não estava presente e o sistema não foi capaz de carregar a página. Esta exceção pode ocorrer, por exemplo, se uma conexão de rede é perdida durante a execução do programa via rede."
               EXIT

          CASE EXCEPTION_ILLEGAL_INSTRUCTION
               cMensagemErro := "EXCEPTION_ILLEGAL_INSTRUCTION - O thread tentou executar uma instrução inválida."
               EXIT

          CASE EXCEPTION_NONCONTINUABLE_EXCEPTION
               cMensagemErro := "EXCEPTION_NONCONTINUABLE_EXCEPTION - O thread tentou continuar a execução após a ocorrência de uma exceção irrecuperável."
               EXIT

          CASE EXCEPTION_STACK_OVERFLOW
               cMensagemErro := "EXCEPTION_STACK_OVERFLOW - O thread esgotou sua pilha (estouro de pilha)."
               EXIT

          CASE EXCEPTION_INVALID_DISPOSITION
               cMensagemErro := "EXCEPTION_INVALID_DISPOSITION - Um manipulador (handle) de exceções retornou uma disposição inválida para o tratador de exceções. Uma exceção deste tipo nunca deveria ser encontrada em linguagens de médio/alto nível."
               EXIT

          CASE EXCEPTION_GUARD_PAGE
               cMensagemErro := "CASE EXCEPTION_GUARD_PAGE"
               EXIT

          CASE EXCEPTION_INVALID_HANDLE
               cMensagemErro := "EXCEPTION_INVALID_HANDLE"
               EXIT

          CASE EXCEPTION_SINGLE_STEP
               cMensagemErro := "EXCEPTION_SINGLE_STEP Um interceptador de passos ou outro mecanismo de instrução isolada sinalizou que uma instrução foi executada."
               EXIT

          CASE EXCEPTION_BREAKPOINT
               cMensagemErro := "EXCEPTION_BREAKPOINT - Foi encontrado um ponto de parada (breakpoint)."
               EXIT

          DEFAULT
              cMensagemErro := "UNKNOWN EXCEPTION ( " + cStr( oException:ExceptionRecord:ExceptionCode ) + " )"

   END

ENDIF

&& -- Verificando se houve erro GPF a nível das TDialogs
oError := errorNew( "GPFHANDLER", 0, 0, procName(), "GPF - Erro Geral de Processo", { cMensagemErro, oException, nCodigoErro }, procFile(), procName(), procLine() )

errorDialog( oError )

RETURN( EXCEPTION_EXECUTE_HANDLER )


>> Please check that FiveH.lib is link before xHarbour rtl.lib.

Antonio, I don't have FiveH.lib. Exists FiveHx.lib and they are in this order:
FiveHx.lib FiveHC.lib +
rtl.lib +
vm.lib +
gtgui.lib +
lang.lib +
macro.lib +
rdd.lib +
codepage.lib +
dbfntx.lib +
dbfcdx.lib +
dbffpt.lib +
hbsix.lib +
common.lib +
pp.lib +


>> Also please run FWH\samples\TestErro.prg and see if you get FWH error dialog from that example

I tried this sample and it's ok! With the other error dialog, the correct!
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
Re: Error Dialog?
Posted: Thu Jan 08, 2009 12:00 PM

Antonio,

Something?

Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Error Dialog?
Posted: Thu Jan 08, 2009 07:11 PM

Julio,

Don't call errorDialog() directly. Do it this way:

Eval( ErrorBlock(), oError )

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
Re: Error Dialog?
Posted: Thu Jan 08, 2009 07:19 PM
Antonio,

Thanks for you answer but still not works!
oError := errorNew( "GPFHANDLER", 0, 0, procName(), "GPF - Erro Geral de Processo", { cMensagemErro, oException, nCodigoErro }, procFile(), procName(), procLine() )

eval( errorBlock(), oError )
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Error Dialog?
Posted: Thu Jan 08, 2009 07:28 PM
Julio,

Please run this test:
#include "FiveWin.ch"

function Main()

   local oError := ErrorNew( "A test" )

   Eval( ErrorBlock(), oError )

return nil

Here it shows the FWH error dialog.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
Re: Error Dialog?
Posted: Thu Jan 08, 2009 07:33 PM

I tried your test but this show me the alert with "Error A test".

Something is wrong and I don't know :(

Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Error Dialog?
Posted: Thu Jan 08, 2009 07:44 PM

Júlio,

Please build my test using FWH\samples\buildx.bat

Have you modified the FWH standard libraries ? Please try it with the FWH standard ones.

regards, saludos

Antonio Linares
www.fivetechsoft.com