PDA

View Full Version : BCC and Delphi try-except differen exception message - ShowLastExceptionData


Pavel Tupec
17-Apr-2009, 01:47 PM
Hi Fabio,
ShowLastExceptionData function show different results on C++ 2006 and D2006 on the same exception.
I write an same small demo.

What is wrong on this example?
try{
int * test = NULL;
*test = 3;
}catch(...){
ShowLastExceptionData();
}

it a bug or did I use wrongly function ShowLastExceptionData()?


Best regards,
Pavel Tupec

Alex
17-Apr-2009, 08:00 PM
Hi.

Can you test this issue on the latest 6.0.20 RC 4, please? I believe that a similar issue was fixed there.

Pavel Tupec
18-Apr-2009, 07:32 PM
Hi Alex,
I tested EurekaLog 6.0.19 RC3 and RC 4. The result is the same.

Dehphi: "Access violation at address 0042D82B in module 'TryExceptBugApp.exe'. Write of address 00000000." C++: "Unknown error message" and I can not find line number where an exception happen.


Hi.

Can you test this issue on the latest 6.0.20 RC 4, please? I believe that a similar issue was fixed there.



--
Alex

Best regards...

Alexander - *EurekaLog Support Team*

Alex
20-Apr-2009, 01:09 PM
Okay, let me check it.
It is either a bug in EurekaLog or limitation of C++ version of EL.

Pavel Tupec
02-Jun-2009, 05:10 PM
Hi Alex, any news?


Okay, let me check it.
It is either a bug in EurekaLog or limitation of C++ version of EL.



--
Alex

Best regards...

Alexander - *EurekaLog Support Team*

Alex
04-Jun-2009, 07:52 AM
Hi.

Sorry for the delay :( There will be a new RC soon and we're working on the fix ;)

Alex
16-Jun-2009, 08:09 AM
Hi,

Unfortunately, we're unable to implement a fix for this in 6.x version. The changes for it would be too large.
This behavior is limitation ("feature"?) of C++ Builder. For example, the standard routines (like ExceptObject) and IDE (call stack window) is unable to display useful info either.
You should consider this as limitation of v6 version of EurekaLog.

The only solution that I can suggest is:

try{
int * test = NULL;
*test = 3;
}catch(Exception &Err){
StandardEurekaNotify(&Err, nil);
}

But this is still not very good (no point to "*test = 3;" in call stack).

EurekaLog v7 should have a different internal architecture, which will help handle those cases.

Lucas
25-Jun-2009, 07:51 PM
This workaround code produces a useful stack trace:

try{
int * test = NULL;
*test = 3;
}catch(Exception &Err){
StandardEurekaNotify(&Err,
(void*)GetLastExceptionCallStack()->Items[0]->Addr);
}


Regards,
Lucas


Hi Fabio,
ShowLastExceptionData function show different results on C++ 2006 and D2006 on the same exception.
I write an same small demo.

What is wrong on this example?
try{
int * test = NULL;
*test = 3;
}catch(...){
ShowLastExceptionData();
}

it a bug or did I use wrongly function ShowLastExceptionData()?


Best regards,
Pavel Tupec

Alex
26-Jun-2009, 08:42 AM
Hi,

Thank you very much for your feedback! :)