Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FB 2.5-beta2-win32 denied FreeAdhocUDF library functions. [CORE2628] #3036

Closed
firebird-automations opened this issue Sep 14, 2009 · 23 comments
Closed

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: KWladimir (kwladimir)

Is related to CORE1814

DB has been created in FB 2.1.2.
IB Expert is used to work with it, no other driver or program.

Library FreeAdhocUDF functions are declared in DB and used.
(Currently its home: http://www.udf.adhoc-data.de/index_eng.html ,
but earlier I usually got it from HK Software site. Probably, that's the same).

After uninstalling 2.1.2 and installing 2.5 beta 2, any Adhoc function call causes:
>> Invalid token.
>> invalid request BLR at offset 60.
>> function F_INTRANDOM is not defined.
>> module name or entrypoint could not be found.

After uninstalling 2.5b2 and installing 2.1.3 , all works again.

(UDF library ib_udf functions work fine).

Commits: 64e162e eb7abe4

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

Are you asked for help in support lists or forums ?
Could you create reproducible test case ?

@firebird-automations
Copy link
Collaborator Author

Commented by: KWladimir (kwladimir)

Sorry, I don't need help, I'm fully satisfied with 2.1.x.
That's just the only way of bug report I could find.

P.S.
Test would be simple: SELECT F_INTRANDOM(0, 10) FROM RDB$DATABASE;

I've tried to reinstall 2.5b2 again - with the same result.
After returning to 2.1.3 - all works quite well.

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

It works for me.

Note, this one is crashed

http://www.udf.adhoc-data.de/downloads/FreeAdhocUDFmin.zip

while this one is worked

ftp://ftp.freeadhocudf.org/FreeAdhocUDF/adhoc20090128/FreeAdhocUDF20090128amin.zip

Next time, PLEASE, ask support questions in more appropriate place.

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Cannot Reproduce [ 5 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

Link: This issue is related to CORE1814 [ CORE1814 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

I've reproduced the issue when Firebird run as a service

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

status: Closed [ 6 ] => Reopened [ 4 ]

resolution: Cannot Reproduce [ 5 ] =>

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

Vlad, what about this? http://msdn.microsoft.com/en-us/library/ms682600(VS.85).aspx

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

Or if the problem is not with all Windows versions, SetDllDirectory.

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

We have 4 ways to fix this issue

1. Use Dynamic-Link Library Redirection
I've put fb_inet_server.exe.local into \bin folder and it give no help.

2. SetDllDirectory
It works for me at Win2003. But it not works on Win2000 and on WinXP without SP's according to MSDN

3. SetCurrentDirectory
It works for me at Win2003 and should work at every other OS, i believe

4. Fill bug report for FreeAdhocUDF and offer him to dynamically load fbclient.dll from the host application folder

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

As far as I can see, the problem is that fbclient.dll can't be loaded by UDF. On my mind, the best solution will be to always have it in your system32 directory if you use such UDFs. The fact that it was loadable from firebird\bin was due to thin effects somewhere in the middle of firebird and windows :-) It's not good idea to rely on such things.

Next, in 3.0 fbclient.dll will become purely client beast (server will not need it at all). I.e. such UDFs will anyway need to be rebuilt.

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

From the Vlad's list, I don't think that (4) is an acceptable option. Neither I'm sure that Alex's suggestion regarding the %system% directory is good enough, as it's somewhat against the rules Microsoft seem to follow recently. If SetCurrentDirectory() really works on the every Windows incarnation, then I'd prefer this solution.

Regarding v3.0, fbclient will still be needed by such UDFs (because of the imported date/time management API routines), so I don't see why they would have to be rebuilt.

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

There is one more way

5. use LOAD_WITH_ALTERED_SEARCH_PATH only for embedded case

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

6. Preload fbclient, as ibutil.

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

For 3.0 preloading of fbclient looks problematic - we do not plan to have it in server case, just keep as windows 'single file copy' client.

What about 2.5 - use of LOAD_WITH_ALTERED_SEARCH_PATH only for embedded case is OK and IMHO is more efficient than loading relatively big and not needed in most cases library.

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

Agreed with Alex regarding v2.5.

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

assignee: Vlad Khorsun [ hvlad ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

Fixed as Alex suggests : use of LOAD_WITH_ALTERED_SEARCH_PATH for embedded only.

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

status: Reopened [ 4 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.5 RC3 [ 10381 ]

Fix Version: 3.0 Alpha 1 [ 10331 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Closed [ 6 ] => Closed [ 6 ]

QA Status: No test => Cannot be tested

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants