Issue Details (XML | Word | Printable)

Key: CORE-100
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dmitry Yemanov
Reporter: thomashauck
Votes: 1
Watchers: 1

If you were logged in you would be able to see more operations.
Firebird Core

Access Violation in fcblient.dll v1.5.3 on disconnecting

Created: 16/May/06 12:00 AM   Updated: 22/Aug/16 05:32 AM
Component/s: API / Client Library
Affects Version/s: 1.5.3
Fix Version/s: 2.1 Beta 2, 2.0.4

Issue Links:

SF_ID: 1489433
QA Status: Cannot be tested

 Description  « Hide
SFID: 1489433#
Submitted By: thomashauck

I'am useing Firebird 1.5.3 on Windows XP SP2. I
recompiled the fbclient with VS.Net 2003. In my app i
use the event notification so i get notifyed if one of
the tables are changed. When the app is closed, i first
deregister the event notification and than disconnect
from the database. Sometimes the disconnect will
produce a acceass violation exactly on this line of the
fbclient source code.

// Clear context reference for the associated event handler
// to avoid SEGV during shutdown

if (port->port_async) {
 port->port_async->port_context = NULL; << access violation

The "port->port_async" is pointing to some wild address
how is not anywhere in the address space of the app or
any of the dll's

If i use a older gds32.dll (version renamed
to fbclient.dll everything is OK.

If i use the orginal fbclient.dll (version
from the Firebird Download, VS.Net 2003 will come up
with a "unhandled execption" by disconnecting from the

If i'am not useing the eventnotification of firebird
everything works fine, and there is no execption by
disconnecting from the database.

Befor i forget. I have more than one Database
connections open, but the event notification is allways
in the first connection to firebird, and is the last
one to disconnect.

It is not reproducable all the time. It works on some
PC's and on some others it will produce the exeption.

To me it looks as if the "port->port_async" variable is
in some state of the disconnet a "wild" pointer, and
depending on his value, the exeption is raised or not.

Good luck in finding the bug.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Alice F. Bird added a comment - 14/Jun/06 09:32 AM
Date: 2006-05-17 21:16
Sender: dimitr
Logged In: YES

Known issue that does not exist in v2.0.

Anders Larsen added a comment - 31/Jul/07 08:46 AM
I'm experiencing the same with Firebird access violation if isc_detach_database() is called too soon after isc_que_events() or isc_cancel_events().

If I make my application sleep for about 200ms before calling isc_detach_database() there is no access violation.

When linking with Borland's gds32 instead of the fbclient I don't have to put the application to sleep before isc_detatch_database() and there is no access violation.

Using Windows XP and MSVC 2005.

Dmitry Yemanov added a comment - 31/Jul/07 08:55 AM
Could you provide a reproducable test case, either binary or source code?

thomashauck added a comment - 22/Oct/07 02:50 AM
I think this issue is resolvet with:

I did not test it, but i sounds like the same thing to me.

Sorry i can't provide a testcase. I rewrote my application so i was not useing events any more.