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

FB3 embedded loads udfs from wrong place [CORE4581] #4897

Closed
firebird-automations opened this issue Oct 16, 2014 · 13 comments
Closed

FB3 embedded loads udfs from wrong place [CORE4581] #4897

firebird-automations opened this issue Oct 16, 2014 · 13 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Nick (nick)

FB library: D:\Firebird\3.0.0.31378\fbclient.dll, loaded by full path by function "LoadLibraryEx('D:\Firebird\3.0.0.31378\fbclient.dll', 0, LOAD_WITH_ALTERED_SEARCH_PATH)".
Exe: D:\Project\Test.exe
Got error on work with udf:
invalid request BLR at offset 31
function FUNC is not defined
module name or entrypoint could not be found
Invalid token
GDS Code: 335544343, SQL Code: -104, Error Code: 23

Process Monitor from SysInternals shows me that fb tryed to load my library from D:\Project\UDF\, but not from D:\Firebird\3.0.0.31378\UDF\

On 2.5.3 embedded it's ok.

Commits: d5c08a9 FirebirdSQL/fbt-repository@d58cf56

@firebird-automations
Copy link
Collaborator Author

Commented by: Sean Leyne (seanleyne)

I am not sure that this is a bug.

The purpose of the embedded engine is to allow for it to be intergrated into an application. As such, all application components (including the FB engine DLL) should be in the application folder. So, loading the DLL from another path is wrong, for an embedded usage.

Expecting/requiring the UDF's to be placed in the application folder 'tree' is therefore appropriate.

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

> As such, all application components (including the FB engine DLL) should be in the application folder. So, loading the DLL from another path is wrong, for an embedded usage.

Wrong.

@firebird-automations
Copy link
Collaborator Author

Commented by: Sean Leyne (seanleyne)

Adriano,

How is it wrong?

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

Copying of binaries here and there for the sake of "to work" is wrong at all. Since 2.5 (at least) one can load an embedded from another directory and it should locate the files relative to the DLL place.

@firebird-automations
Copy link
Collaborator Author

Commented by: Sean Leyne (seanleyne)

Actually, by Windows standard ("Windows Certified" application requirements), all application related program files/executables are required to be placed in a single Publisher/Application folder path.

Only shared application/services or common libraries (which is not the purpose of the embedded engine) are allowed to be installed in a "common location" which applications can commonly access.

So, the embedded engine and all components (UDF/ICU) are required to be in the application path.

How else are 2 applications using different embedded server versions, installed on a single system, expected to co-exist?

@firebird-automations
Copy link
Collaborator Author

Commented by: @livius2

i do not test this, bu what if i put embeded firebird in sub folder of my application, this work in fb3? if not then i suppose it is a bug then? this follow windows cert app rules
c:\myapp\my.exe
c:\myapp\fbembeded_dir\

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Regression: 3.0 Beta 1 [ 10332 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

assignee: Vlad Khorsun [ hvlad ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

Should be fixed now. Try next snapshot build, please.

@firebird-automations
Copy link
Collaborator Author

Commented by: Nick (nick)

Fixed.

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

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

resolution: Fixed [ 1 ]

Fix Version: 3.0 Beta 2 [ 10586 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: Cannot be tested

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

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

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