[fpc-pascal] Reproducible code: DLL calling Firebird crashes

José Mejuto joshyfun at gmail.com
Mon Sep 29 16:51:19 CEST 2014


El 29/09/2014 a las #4, Reinier Olislagers escribió:

> What I would like to know what is the cause of this problem - dlls being
> loaded before some kind - what kind? - of initialization is complete?
>
> Anyway, I'll keep digging; probably first looking at geting postgresql
> support in anyway.
> _______________________________________________

Hello,

You must not initialize dbengine in the Initialization section and must 
not finalize it in that place (maybe only as last chance) because 
initialization order and finalization order is undefined by fpc and 
finalization of your code could happen after the whole DB structure has 
been finished, so the call to "DBLayer.Free" could try to free an object 
controlled by an engine which is not loaded yet.


-- 




More information about the fpc-pascal mailing list