Subject Re: [firebird-support] Re: Access violation
Author Helen Borrie
Derek,

At 05:37 PM 25/11/2003 +0000, you wrote:


>Yes, that is what I meant. IBOConsole, to be precise. I can update
>this issue with the following:
>
>(a) I was able to go into the command line and open the sample
>employees database;
>
>(b) I was able to open the sample through another GUI admin program,
>IB_SQL;
>
>but
>
>(c) I ran into the same error (with a different memory location) at
>some point using IB_SQL. Basically it worked fine, but this access
>error popped up when I tried to do something (unfortunately I have
>forgotten exactly what I was doing).

Originally you wrote:
I'm just starting to try Firebird (1.5.0.4027-RC7, WinXP). When I go
to register the server, I get the error,

"Error logging in to the requested server.

Detail message:
Access violation at address 00000000. Read of address 00000000."


>I can only take a SWAG at it and guess that the problem has something
>to do with WinXP. Besides prohibiting me from using IBOConsole (which
>was recommended to me as the best tool), the error is not fatal.
>However, I do feel a little leary switching to a database on which I
>have received such an undiagnosed error early on, as I am afraid it
>may crop up later after I have more invested in it. If anyone has any
>ideas, I would appreciate hearing them.

Now that we have more information, I can suggest the source of your problem.

This *does* have to do with your configuration. The most obvious is that
you installed Firebird 1.5 into an environment that had either a Firebird
1.0 or InterBase server installed. In that case, the two utility tools
(IB_SQL and IBOConsole) are looking at the wrong client library.

isql will find the correct client library (fbclient.dll) because the
installation will have placed it in the same path.

The two third-party tools are looking in the system path for a library
named gds32.dll - hence they are finding the wrong gds32.dll and you are
getting these access violations because of non-existent addresses in calls
to the dll. At least in the case of IBOConsole, the message is:
Access violation at address 00000000. Read of address 00000000", meaning
that "registration" routine is looking in a hard-coded path when trying to
call the attachment function. IB_SQL doesn't have a registration routine
so, as long as it finds a gds32.dll somewhere in the path, it connects happily

It's possible you get an actual address for the AV in IB_SQL, since you do
actually manage to log in to the db using that tool. The AV occurs the
first time the application refers to a non-existent function address in the
(wrong) gds32.dll.

fwiw, I use IB_SQL constantly, with 5 different Firebird servers, including
two on Linux.

What's needed to fix your problem is to find the gds32.dll compatibility
stub and copy it either
a) into your system32 directory (if you don't need the old gds32.dll that
is causing the problems
or
b) into the application directories of each of the tools

The compatibility stub is named gds32.dll and its size is 36,864 bytes. If
the RC7 installation program didn't install it in system32 - as it will not
have done if it found an existing Fb 1.0 or IB installation - then I think
you should be able to find it in the \bin directory of your Fb
installation. (The reason I'm not sure is that Paul R changed everything
in the RC7 installer; and my Win32 installation installed into a clean
system. So the compatibility stuff automatically went into system32.)

The compatibility stub redirects the calls to fbclient.dll, and knows where
to find it. Once you get that fixed up, both IB_SQL and IBOConsole should
work properly.

For other reasons, IBOConsole and older builds of IB_SQL are out of date
for Fb 1.5. This has to do with a parameter issue. You need to set
OldParameterOrdering to True in your firebird.conf to ensure they work
properly with parameterised queries and SP calls.

The latest build of IB_SQL on the IB Objects web site automatically
corrects for the parameter ordering issue and you need OPO set false (the
default) with this and all future builds.

I see today that the developer of IBOConsole (Lorenzo Mengoni) has put up a
new build of IBOConsole (24 November) so I suggest you update yours if you
have an older build.

In short, if you address the gds32.dll compatibility issue and use the new
builds that address the OPO issue, you should be "good to go" with either tool.

regards,
Helen