Subject Re: [ib-support] Server Crash
Author Helen Borrie
At 12:46 PM 13/05/2003 +0300, you wrote:
>Hi,
>
>I am using interbase 6,2
>I have a problem.
>sometimes server is crashing.
>
>i have a select statemet and i use an usd with this select statement
>
>i wrote a udflib with delphi,
>this udf is returns cstring 30
>and i declared it with free it
>
>server error log is that
>
> C:\Program Files\Borland\InterBase\bin\ibserver.exe: terminated abnormally
>(-1073741819)
>
>what is the problem,
>is this a bug

Yes - it will be some unhandled exception in your Delphi code.

>what i must do

Start by putting your Delphi code into an an application and testing it,
using the actual input values that caused the exception when the routine
was called by the server.

One possible source of exception in your Delphi code: if your inputs are
strings of multi-byte characters, make sure you use widestring in Delphi
and that your return string gets correctly converted and does not cause a
length overflow. Another source of exception may be a bounds error if your
Delphi code is addressing the string as an array of char. There are lots
of other ways that string manipulations can cause exceptions...

Delphi will throw a memory-protection fault (AV) if your code ever
references a nil object, so examine all of the objects used by the code and
eliminate any chance that an object doesn't get created or destroyed when
it should.

Can't take this any further, as this isn't a Delphi list...

heLen