Forum > Carbon

SIGSEGV after "reraise", but not immediately, is it normal?


Cheers Colleagues,

Even this gave me a better ideas for sandboxing, I would like to know:
Here is the case not reproducible on Windows win32/w64 ws and Darwin gtk2 ws, but on carbon ws (Darwin):

After catching some exception (for example create a component with existing name) and performing all necessary actions to rollback to the program stable state and reraise the exception (for example the exception to be propagated and the exception message to be shown by the runtime), here appears the confirmation dialog with the exception message and buttons: OK - to continue the program execution and Cancel - to terminate the program. After choosing OK the program continue... and is interactable, but in some good moment you are choosing a button opening/ saving dialog box and in this moment the program unexpectedly is terminated. The error message is: Exception class 'External: SIGSEGV' at address...

Lazarus 1.4.4, FPC 2.6.4.


First start using a maintained version of fpc and Lazarus.
We can't test antiques. Waste of time.

When we started to count what is first and what is second lets see from my post here (,34885.0.html):
"And a last observation: Lazarus 1.4.4 with FPC 3.0.0 on Windows and win32/64 widgetset may have mem leaks, because the Heaptrc message differs by the message from Lazarus 1.4.4 with FPC 2.6.4."

probably it is related to: (from here:
"r50963 fpdebug: fixed mem leaks, bug 29227 patch from Anton"

It is not clear is it taken in 1.6.2.

and probably third: I am just pointing about this observation (I found a workaround) It is your choice to retest it on 1.6.2 and take it in account :). Lets not discipline each others.

The simplified description seems is not enough to reproduce the problem, although in my case I am reproducing the problem on 100%.
I attached the problematic part of the code. On Windows the debugger skips the "Destroy;" and stops on "raise;" - but the observed problem is on Darwin, where the debugger stops on "Destroy;".

The workaround I am suggesting is replacement of "raise;" (probably, I could find others):
// add "e: " in "on Exception do"

I can not use Heaptrc on Darwin. Is it possible the exception object to be freed twice?


[0] Message Index

Go to full version