Subject RE: [firebird-support] terminated abnormally (4294967295)
Author Donald Klopper
UDF's are not as simple to code as one would want.

Even if the UDF is coded and compiled properly, a bad "create external
function" declaration can cause havoc.
I've been using my own UDF library for 3 years, then started playing with
Kylix 3 and FireBird on RedHat 7.3; I encountered numerous problems, and
recoded the whole UDF in Kylix (esp the way I handled memory allocation in
Strings / PChars), as well as my SQL definitions, then I ported the whole
lot back to Delphi 4. (Yes, I know ;) )

Specifically note how you handle the FREE_IT directive together with memory
allocation / deallocation using strings / PChars in the UDF...

I am still not quite happy with how I handle it, but it's working well in
production environments, with 24/7 availability. I do have some problems
with a Win 2000 Server handling 13 active clients simultenously, with the
server not releasing memory and I've been monitoring some threads pertaining
to connections not closing etc with great interest, together with TCP
packets that are sent to, I think, keep the connection alive, but don't get
processed so they are queued on the server... this has reportedly been a
problem on Win2000 even running SP3.... But this won't cause the database
server to crash.

A bad UDF causes a crash in the server in no time flat, without (IME) much
info as to why ... you have to trace your application and see when / which
UDF is called.

It's good practise (c??) IMHO to have a test application for your UDF's
separate from the database, and then another with a live connection to the
database, and to execute each in sequence with all the possible

Donald Klopper

> -----Original Message-----
> From: Kevin Day Programming [mailto:kdp@...]
> Sent: Monday, January 19, 2004 3:48 AM
> To:
> Subject: RE: [firebird-support] terminated abnormally (4294967295)
> > No, but it can CRASH the server, as it is obviously doing. You
> > eliminate a
> > bad UDF as the cause. Are you using an international character set? If
> > so, which one?
> I have attested to the UDF issue. Can you pinpoint exactly when
> the program
> crashes by tracing it through or by debug messages / logging. It maybe a
> specific query or even a insert/update ext to a table that has a trigger
> that refers to a udf. A stray pointer, incorrect udf declarations, all
> these can cause problems.
> Kevin.
> Yahoo! Groups Links
> To visit your group on the web, go to:
> To unsubscribe from this group, send an email to:
> Your use of Yahoo! Groups is subject to: