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

Access Violation in fcblient.dll v1.5.3 on disconnecting [CORE100] #424

Closed
firebird-automations opened this issue May 16, 2006 · 13 comments
Closed

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: thomashauck (thomashauck)

Is related to CORE1452

Votes: 1

SFID: 1489433#⁠
Submitted By: thomashauck

I'am useing Firebird 1.5.3 on Windows XP SP2. I
recompiled the fbclient with http://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 1.5.1.4481) renamed
to fbclient.dll everything is OK.

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

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.
Thomas

@firebird-automations
Copy link
Collaborator Author

Commented by: Alice F. Bird (firebirds)

Date: 2006-05-17 21:16
Sender: dimitr
Logged In: YES
user_id=61270

Known issue that does not exist in v2.0.

@firebird-automations
Copy link
Collaborator Author

Modified by: Alice F. Bird (firebirds)

description: SFID: 1489433#⁠
Submitted By: thomashauck

I'am useing Firebird 1.5.3 on Windows XP SP2. I
recompiled the fbclient with http://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 1.5.1.4481) renamed
to fbclient.dll everything is OK.

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

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.
Thomas

=>

SFID: 1489433#⁠
Submitted By: thomashauck

I'am useing Firebird 1.5.3 on Windows XP SP2. I
recompiled the fbclient with http://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 1.5.1.4481) renamed
to fbclient.dll everything is OK.

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

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.
Thomas

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Version: 1.5.3 [ 10028 ]

Component: API / Client Library [ 10040 ]

assignee: Dmitry Yemanov [ dimitr ]

SF_ID: 1489433 =>

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

assignee: Dmitry Yemanov [ dimitr ] =>

@firebird-automations
Copy link
Collaborator Author

Commented by: Anders Larsen (alarsen)

I'm experiencing the same with Firebird 2.0.1.12855: 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.

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

Could you provide a reproducable test case, either binary or source code?

@firebird-automations
Copy link
Collaborator Author

Commented by: thomashauck (thomashauck)

I think this issue is resolvet with:
CORE1452

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

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Link: This issue is related to CORE1452 [ CORE1452 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

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

resolution: Fixed [ 1 ]

Fix Version: 2.0.4 [ 10211 ]

Fix Version: 2.1 Beta 2 [ 10190 ]

assignee: Dmitry Yemanov [ dimitr ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Workflow: jira [ 10124 ] => Firebird [ 14329 ]

@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