The error occurs in this line:
Application.CreateForm(TForm1, Form1);
This is suspicious. Assuming you're not doing strange things with forms, this shouldn't happen at all.
Could you please specify your Lazarus and OS version?
Please be aware that some x64 FPC/Lazarus versions on Windows 64 bit have issues when using the Firebird embedded library due to incorrect error handling by the FPC code.
Errors normally caught in your Firebird dll would propagate into the FPC code and cause weird error messages.
IIRC, this is explained on the Firebird embedded page in the Wiki.