Firebird 4.0 RC1 (x64): Unable to connect with a Database using x86 software

207 views
Skip to first unread message

Luciano Rodrigues Nunes Mendes

unread,
May 15, 2021, 9:40:27 AM5/15/21
to firebird-support
Hi Everyone,

I am evaluating the migration of my systems from Firebird 3.0 (x64) to Firebird 4.0 (x64) and the following error message is shown when I try to connect to a database using a 32bits applications:

Engine Code: 335545004
Engine Message:
Error loading plugin ChaCha
Module C:\Program Files\Firebird\Firebird_4_0\plugins/ChaCha exists but can not be loaded
unkown Win32 error 193

This issue does not happen in Firebird 3.0 (x64) and any software, both 32 and 64 bits, are able to connect to databases.

Should I open a bug for this Firebird (x64) issue?

Best Regards,
Luciano

Dimitry Sibiryakov

unread,
May 15, 2021, 10:55:59 AM5/15/21
to firebird...@googlegroups.com
15.05.2021 15:40, Luciano Rodrigues Nunes Mendes wrote:
> Should I open a bug for this Firebird (x64) issue?

First of all you must check what plugins/ChaCha.dll is and when it get spoiled.
In any case you must use a fresh Firebird 4.0 snapshot.

--
WBR, SD.

Mark Rotteveel

unread,
May 15, 2021, 11:03:48 AM5/15/21
to firebird...@googlegroups.com
Exactly how is this 32-bit application loaded, and which client library
is it trying to use, and how is it connecting to the database? IIRC, the
error means that a 32-bit application is attempting to load a 64-bit
library.

I would think it is unlikely that a 64-bit Firebird server includes a
32-bit chacha library, so I'm guessing your 32-bit application is trying
to load it instead.

Mark
--
Mark Rotteveel

Luciano Rodrigues Nunes Mendes

unread,
May 15, 2021, 11:15:06 AM5/15/21
to firebird...@googlegroups.com
Hi Dimitry and Mark,

Thank you for your prompt reply!

This issue IS also reproducible in the latest Firebird 4.0 (x64) snapshot (4.0.0.2485).
I am trying to connect with the database using the FlameRobin (x86) version (see error screenshot attached).

This issue IS reproducible for FlameRobin (x86) + SRP authentication.
For FlameRobin (x86) + Legacy authentication this issue does NOT happen.

Here are my firebird.conf and databases.conf files:

firebird.conf
===
#SETUP 
UserManager = Srp, Legacy_UserManager 
WireCrypt = Enabled 
#PERFORMANCE 
DefaultDbCachePages = 30K 
FileSystemCacheThreshold = 2M 
LockHashSlots = 30011 
LockMemSize = 15M 
TempBlockSize = 2M 
TempCacheLimit = 3000M 
#SECURITY 
DatabaseAccess = None 

databases.conf
===
CHRONOS_CIN = D:\APPLICATIONS\LURONUMEN\DB\CHRONOS_CIN.FDB 
AuthServer = Srp, Win_Sspi 
SecurityDatabase = CHRONOS_CIN 
UserManager = Srp 
}

Do you have any idea how to fix it?

Thanks in advance,
Luciano

--
You received this message because you are subscribed to the Google Groups "firebird-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebird-suppo...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/firebird-support/ec8756e6-e237-715d-d884-1a685479e9e2%40lawinegevaar.nl.
FlameRobin.png

Dimitry Sibiryakov

unread,
May 15, 2021, 11:22:14 AM5/15/21
to firebird...@googlegroups.com
15.05.2021 17:14, Luciano Rodrigues Nunes Mendes wrote:
> Do you have any idea how to fix it?

Do not use fbclient.dll from %FIREBIRD%\SysWOW64 folder directly, copy this 32 bit
fbclient.dll into appropriate system folder or Flame Robin folder.

--
WBR, SD.

Luciano Rodrigues Nunes Mendes

unread,
May 15, 2021, 11:35:17 AM5/15/21
to firebird...@googlegroups.com
Hi Dimitry,

After copying the Firebird_4_0\WOW64\fbclient.dll library to the flamerobin.exe folder the issue is no longer reproducible.

Thank you very much for the help!

Best Regards,
Luciano

--
You received this message because you are subscribed to the Google Groups "firebird-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebird-suppo...@googlegroups.com.

Mark Rotteveel

unread,
May 15, 2021, 11:39:43 AM5/15/21
to firebird...@googlegroups.com
On 15-05-2021 17:14, Luciano Rodrigues Nunes Mendes wrote:
> Thank you for your prompt reply!
>
> This issue IS also reproducible in the latest Firebird 4.0 (x64)
> snapshot (4.0.0.2485).
> I am trying to connect with the database using the FlameRobin (x86)
> version (see error screenshot attached).
>
> This issue IS reproducible for FlameRobin (x86) + SRP authentication.
> For FlameRobin (x86) + Legacy authentication this issue does NOT happen.

That is because you cannot use wire protocol encryption when you
authenticate with Legacy_Auth.

> Do you have any idea how to fix it?

Which 32-bit fbclient.dll are you using, and where is it installed?
Check which fbclient.dll FlameRobin is actually loading.
Which Firebird directories are on the PATH, and what is their position
relative to C:\Windows\System32?

Mark
--
Mark Rotteveel

Luciano Rodrigues Nunes Mendes

unread,
May 15, 2021, 12:12:11 PM5/15/21
to firebird...@googlegroups.com
Hi Mark

The C:\Windows\SysWOW64 has the fbclient.dll (32-bit) and the C:\Windows\System32 folder has the fbclient.dll (64-bit).
The Firebird 4.0 is installed on C:\Program Files\Firebird\Firebird_4_0 folder.

I was unable to identify where flamerobin is using fbclient.dll from. I could only identify that it is not using any of the versions I mentioned above and neither the Firebird_4_0\WOW64\fbclient.dll.

Best Regards,
Luciano

--
You received this message because you are subscribed to the Google Groups "firebird-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebird-suppo...@googlegroups.com.

Dimitry Sibiryakov

unread,
May 15, 2021, 12:14:27 PM5/15/21
to firebird...@googlegroups.com
15.05.2021 18:11, Luciano Rodrigues Nunes Mendes wrote:
> I was unable to identify where flamerobin is using fbclient.dll from.

Process Explorer can help with this.

--
WBR, SD.

Lucas Schatz

unread,
Oct 11, 2023, 4:45:51 PM10/11/23
to firebird-support
TLDR: wow64\fbclient.dll tries to load \plugins\chacha.dll instead of wow64\plugins\chacha.dll

Hello, first of all, sorry for resurrecting such an old thread. I'm reworking how Flamerobin load it DLL, and faced with this exact problem.
Steps to reproduce: install Firebird (x64) 4.0 and don't check copy to system folder, and setup Flamerobin x86, try to connect to employee.fdb and get this same error

So, Flamerobin looks for DLL in this sequence:
- local dir
- looks for Firebird setup folder from registry, then first wow64\fbclient.dll, bin\wow64\fbclient.dll , .\fbclient.dll , bin\fbclient.dll (if it's 64 bits then skips wow64 folder)
- lets SO look for fbclient.dll

In this case Flamerobin are trying to load C:\Program Files\Firebird\Firebird_4_0\WOW64\fbclient.dll, but somehow this DLL are trying to load C:\Program Files\Firebird\Firebird_4_0\plugins\chacha.dll instead of C:\Program Files\Firebird\Firebird_4_0\WOW64\plugins\chacha.dll

Why does this happens? If I copy wow64 content to local Flamerobin folder it works, but I think this is not an "user friendly" solution

Thanks!

Lucas Schatz

unread,
Oct 11, 2023, 5:45:15 PM10/11/23
to firebird-support
if I copy default firebird.conf to WOW64 folder then it work

Dimitry Sibiryakov

unread,
Oct 11, 2023, 5:47:55 PM10/11/23
to firebird...@googlegroups.com
Lucas Schatz wrote 11.10.2023 23:45:
> if I copy default firebird.conf to WOW64 folder then it work

32 bits fbclient.dll was never intended to be loaded directly from WOW64
directory. It is there for instclient.exe which will put it into system directory.

--
WBR, SD.

Nickolas Deluca

unread,
Feb 14, 2024, 1:39:52 PMFeb 14
to firebird-support
I agree, this is not user friendly. I even opened up a issue on the GitHub repo. I was then referred to this forum and found this thread.

I can't understand why it wouldn't work when loaded from the WOW64 folder but works in ANY OTHER folder.

Dimitry Sibiryakov

unread,
Feb 14, 2024, 3:07:44 PMFeb 14
to firebird...@googlegroups.com
Nickolas Deluca wrote 14.02.2024 19:05:
> I can't understand why it wouldn't work when loaded from the WOW64 folder but
> works in ANY OTHER folder.

Because firebird.conf is one level up from there.

--
WBR, SD.

Reply all
Reply to author
Forward
0 new messages