Subject | UDF crashing Firebird |
---|---|
Author | Adam |
Post date | 2005-08-25T05:10:18Z |
Hi Group,
I have a UDF here declared as follows;
DECLARE EXTERNAL FUNCTION ROUNDLENGTHTOPREF
TIMESTAMP, TIMESTAMP, BLOB, BLOB
RETURNS TIMESTAMP FREE_IT
ENTRY_POINT 'RoundLengthToPref' MODULE_NAME 'fbext';
The dll is written in Delphi 7, and the function call looks like this:
function FB_RoundLengthToPref(var StartTime : ISC_TIMESTAMP; var
EndTime : ISC_TIMESTAMP; Preference,Minutes: PBlob): PISC_TIMESTAMP;
stdcall;
In a few cases that have been so far impossible to reliably duplicate,
the call to this function shuts down firebird (which is then restarted
by the guardian). I have managed to duplicate it on a Windows XP box
about 10 times but it does not seem to be related to the particular
parameters that were passed in. I have never been able to duplicate it
on my development win2k box (Murphy predicted that).
Should I be concerned regarding the use of both stdcall and FREE_IT?
As in should I change it to maybe cdecl, or am I way off the boat and
there is something else that will probably cause it.
Any assistance is appreciated.
Adam
I have a UDF here declared as follows;
DECLARE EXTERNAL FUNCTION ROUNDLENGTHTOPREF
TIMESTAMP, TIMESTAMP, BLOB, BLOB
RETURNS TIMESTAMP FREE_IT
ENTRY_POINT 'RoundLengthToPref' MODULE_NAME 'fbext';
The dll is written in Delphi 7, and the function call looks like this:
function FB_RoundLengthToPref(var StartTime : ISC_TIMESTAMP; var
EndTime : ISC_TIMESTAMP; Preference,Minutes: PBlob): PISC_TIMESTAMP;
stdcall;
In a few cases that have been so far impossible to reliably duplicate,
the call to this function shuts down firebird (which is then restarted
by the guardian). I have managed to duplicate it on a Windows XP box
about 10 times but it does not seem to be related to the particular
parameters that were passed in. I have never been able to duplicate it
on my development win2k box (Murphy predicted that).
Should I be concerned regarding the use of both stdcall and FREE_IT?
As in should I change it to maybe cdecl, or am I way off the boat and
there is something else that will probably cause it.
Any assistance is appreciated.
Adam