Error Dialog? ( Solved! )

Re: Error Dialog?

Postby JC » Thu Jan 08, 2009 7:50 pm

Is done and with the default bat compiler it's ok!

My list of libraries, all in order of use
Code: Select all  Expand view
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 +


Please Antonio, what you need to help me about this?
I tried to show a message with msgInfo( "test" ) at the first lines of errorDialog() and don't show! I think if is possible to not passing by the errorDialog() function?
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
User avatar
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

Re: Error Dialog?

Postby Antonio Linares » Thu Jan 08, 2009 8:02 pm

Julio,

Lets check where Alert() is getting called from your app. Please try this code:
Code: Select all  Expand view
#include "FiveWin.ch"

function Main()

   local oError := ErrorNew( "A test" )

   Eval( ErrorBlock(), oError )

return nil

function Alert()

   x++    // a recursive error should happen here

return nil

Please post here the error.log that you get
regards, saludos

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

Re: Error Dialog?

Postby JC » Thu Jan 08, 2009 8:03 pm

I will try your test, but first... look this:
I tried to show a message with msgInfo( "test" ) at the first lines of errorDialog() and don't show! I think if is possible to not passing by the errorDialog() function?
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
User avatar
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

Re: Error Dialog?

Postby JC » Thu Jan 08, 2009 8:06 pm

The result:

A error message titled with "Unrecoverable error 9003:", "Too many recursive error handler calls"
And this not generated a error.log file... What (???)
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
User avatar
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

Re: Error Dialog?

Postby JC » Thu Jan 08, 2009 8:13 pm

Antonio, I think this may be the cause of the problem

This command to remove the errsysw.obj of lib of fivewin and let only the obj of my application:
Code: Select all  Expand view
H:\BCC55\bin\tlib H:\FWH\lib\fivehx.lib -errsysw.OBJ
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
User avatar
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

Re: Error Dialog?

Postby Antonio Linares » Thu Jan 08, 2009 8:47 pm

Júlio,

Is the FWH error dialog properly shown or not ?

Please build the example that I posted before, so we will know more about what is going on
regards, saludos

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

Re: Error Dialog?

Postby JC » Thu Jan 08, 2009 8:59 pm

>> Is the FWH error dialog properly shown or not ?

Apparently not! Is a alert message of error

>> Please build the example that I posted before, so we will know more about what is going on

With the default configs of FWH:
Image
and error.log
Code: Select all  Expand view
Application
===========
   Path and name: H:\apps\FWH8.10\FWH\samples\jc.exe (32 bits)
   Size: 1,377,792 bytes
   Time from start: 0 hours 0 mins 0 secs
   Error occurred at: 01/08/09, 17:53:19
   Error description: Error A test/0 

Stack Calls
===========
   Called from: jc.prg => MAIN(7)

System
======
   CPU type:               Intel(R) Pentium(R) D CPU 2.80GHz 2800 Mhz
   Hardware memory: 1014 megs

   Free System resources: 90 %
        GDI    resources: 90 %
        User   resources: 90 %

   Compiler version: xHarbour build 1.1.0 Intl. (SimpLex) (Rev. 6195)
   Windows version: 5.1, Build 2600 Service Pack 3

   Windows total applications running: 0

Variables in use
================
   Procedure     Type   Value
   ==========================
   MAIN
     Local   1:    O    Class: ERROR

Linked RDDs
===========
   DBF
   DBFFPT
   DBFBLOB
   DBFNTX

DataBases in use
================

Classes in use:
===============
     1 HASHENTRY
     2 HBCLASS
     3 ERROR
     4 HBOBJECT
     5 TREG32

Memory Analysis
===============
      96 Static variables

   Dynamic memory consume:
      Actual  Value:          0 bytes
      Highest Value:          0 bytes


--
With my app:
Image
and no have a error.log
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
User avatar
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

Re: Error Dialog?

Postby Antonio Linares » Thu Jan 08, 2009 9:04 pm

Julio,

>
With the default configs of FWH:
Image
>

That is ok.

So it means that you are changing the ErrorSys somewhere in your application.
Are you using a modified ErrSysW.prg ?
regards, saludos

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

Re: Error Dialog?

Postby JC » Thu Jan 08, 2009 11:27 pm

>> So it means that you are changing the ErrorSys somewhere in your application.
>> Are you using a modified ErrSysW.prg ?

Yes Antonio! Just adding this function below:
Code: Select all  Expand view
    && ------------------------------
    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() )

        eval( errorBlock(), oError )  // errorDialog( oError )<<-- Changed here as you suggested Antonio

    RETURN( EXCEPTION_EXECUTE_HANDLER )

And calls on main with this:
Code: Select all  Expand view
setUnhandledExceptionFilter( @gpfHandler() )
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
User avatar
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

Re: Error Dialog?

Postby Antonio Linares » Fri Jan 09, 2009 12:28 pm

Júlio,

Have you replaced your modified ErrSysW.prg inside FiveHX.lib or are you linking its OBJ as another OBJ of your application ?

It has to be linked _before_ xHarbour own ErrorSys
regards, saludos

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

Re: Error Dialog?

Postby JC » Fri Jan 09, 2009 1:07 pm

>> Have you replaced your modified ErrSysW.prg inside FiveHX.lib or are you linking its OBJ as another OBJ of your application ?
>> It has to be linked _before_ xHarbour own ErrorSys

Antonio, I following this steps:

1º I ran this batch command "tlib.exe H:\FWH\lib\fivehx.lib -errsysw.obj" to remove the .obj
2º I Made a original copy of errsysw.prg to my project diretory
3º I Made the changes like I have said to you above
4º I compile together with all files of my project.

PS.: In order to compile, my own errsysw.prg is compiled before all libs! Indeed, all are!
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
User avatar
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

Re: Error Dialog?

Postby JC » Sat Jan 10, 2009 7:04 pm

Dear Antonio,

Thank you very much! I can resolve this problem!
Now, my dialog error default it's ok!

Thank you!!
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
User avatar
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

Re: Error Dialog? ( Solved! )

Postby James Bott » Sat Jan 10, 2009 11:40 pm

Julio,

For future reference, you don't need to remove the obj from the fw libs, just link your new obj before the libs.

Personally, I never modify the original FW libs, just so I don't have problems that are hard to find.

regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Error Dialog? ( Solved! )

Postby JC » Sun Jan 11, 2009 1:33 am

Now I know James!
This is much better! ;)

Thank you for your tip!
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
User avatar
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 77 guests