[fpc-pascal] Firebird stored procedure exceptions generate access violation

Michael Van Canneyt michael at freepascal.org
Sun Jun 6 11:54:40 CEST 2010



On Sun, 6 Jun 2010, Jim wrote:

> On 5-6-2010 12:23, Michael Van Canneyt wrote:
>> On Sat, 5 Jun 2010, Jim wrote:
>>> On 5-6-2010 10:47, Michael Van Canneyt wrote:
>>>> On Sat, 5 Jun 2010, Jim wrote:
>>> <snip>
>>> Program received signal SIGSEGV, Segmentation fault.
>>> 0x000000010000ad7d in FINALIZE$_DATEUTILS ()
>>> (gdb) backtrace
>>> #0  0x000000010000ad7d in FINALIZE$_DATEUTILS ()
>>> #1  0x0000000005d73f80 in ?? ()
>>> #2  0x00000000012baf10 in ?? ()
>>> #3  0x00000000012baf10 in ?? ()
>>> #4  0x000000010000715c in FINALIZE$_DATEUTILS ()
>>> #5  0x0000000000010a70 in ?? ()
>>> #6  0x0000000077c38f15 in ?? ()
>>> #7  0x0000000000010000 in ?? ()
>>> #8  0x0000000005d73f80 in ?? ()
>>> #9  0x000000000102ef00 in ?? ()
>>> #10 0x00000001000531b0 in FINALIZE$_DATEUTILS ()
>>> #11 0x0000000000000000 in ?? ()
>>>
>>> Hope this is what you're looking for...
>>
>> It is, but it doesn't give the expected output. Are you using a UDF ?
>>
>> Michael.
>
> Yes, I am using a Firebird UDF for debugging, but it's on a different
> machine (Linux server). I just got rid of it in the newest revision on
> bitbucket (which probably also fixes database creation using Flamerobin
> - seems FlameRobin has a bug in generating metadata DDL for views).

Is the firebird UDF written in fpc ?

>
> I'll get the newest 32 and 64 bit Lazarus snapshots with FPC 2.4.1.
>
> Then change the function call to use records, compile and test.
>
> By the way, I also get a ton of memory leaks while running the code.
>
> I'd really love to build an embedded Firebird version of the tool, but I
> don't seem to manage that. Well, I'll get to that later...

Well, I've succesfully used embedded firebird with FPC, so that part
should work. But I didn't use exceptions in Firebird, and also no UDF, so
these are 2 unknowns for me.

Maybe there is some special handling required for firebird exceptions,
although that would surprise me. Normally I'd simply expect this to
be a special error code, and the message of the exception as the error
message...

Michael.



More information about the fpc-pascal mailing list