[fpc-pascal] Unhandled exception from library crashes host exe

michael.vancanneyt at wisa.be michael.vancanneyt at wisa.be
Wed Jun 27 16:15:34 CEST 2012



On Wed, 27 Jun 2012, Antonio Fortuny wrote:

>
> Le 27/06/2012 15:58, kyan a écrit :
>> I am sure that this has been asked before but I couldn't find an answer.
>> 
>> I am in the process of porting a large application consisting of an
>> exe and many dlls from Delphi7 to FPC 2.7.1/Lazarus for Windows/WinCE
>> with hopes of being able to finally port it to Linux. I have managed
>> to overcome all obstacles but this seems like a brick wall: An
>> exception raised from a dll that is not handled by the dll's code will
>> crash the exe, bypassing any try/finally/except handlers around the
>> call into the dll that raised it. This is of course a complete
>> showstopper because the API and code of the dlls is way too massive to
>> re-engineer so that it does not let exceptions bubble up to the exe.
> Got the same with UDFs for FIrebird. Read two Firebird bugs:
> http://62.166.198.202/view.php?id=12974
> and
> http://62.166.198.202/view.php?id=17280
> they appear to be intimately related.

That will not help. The problem described there appears only on Win64.
Not on Windows 32 or linux.

I suspect the problem will not appear on Linux because the library system is
slightly different to windows; but Win32, I am not sure.

I am not sure the problem can be solved correctly with the compiler as-is, 
but the compiler people should confirm or deny this.

Michael.


More information about the fpc-pascal mailing list