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

Crash of .NET application [DNET368] #373

Closed
firebird-automations opened this issue Mar 4, 2011 · 8 comments
Closed

Crash of .NET application [DNET368] #373

firebird-automations opened this issue Mar 4, 2011 · 8 comments

Comments

@firebird-automations
Copy link

Submitted by: Radu Simen (radu103)

Duplicates DNET316

Attachments:
fb_command_bug.png

Votes: 3

Application: App.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException
Stack:
at FirebirdSql.Data.FirebirdClient.FbCommand.RollbackImplicitTransaction()
at FirebirdSql.Data.FirebirdClient.FbCommand.Release()
at FirebirdSql.Data.FirebirdClient.FbCommand.Dispose(Boolean)
at System.ComponentModel.Component.Finalize()

Taken from the Event Viewer.
The application is crashing.
Pls correct the problem

@firebird-automations
Copy link
Author

Commented by: @cincuranet

Provide steps to reproduce.

@firebird-automations
Copy link
Author

Commented by: Radu Simen (radu103)

The idea is simple:
- multiple commands and connections that have not finished their work (for autocomplete on a field)
- that window that has launched those requests has closed.

For every keystroke one command is launched and if another is pressed while the request is working, the first one is stoped.
In the mean while if the parent form is closed the application crashes. In the application everyting is in a try/catch block but the application still crashes.

Anyway those block of code should be in a try/catch block so the application should not crash

@firebird-automations
Copy link
Author

Commented by: Radu Simen (radu103)

Maybe this will help.

When this crash occured there was nothing out of the ordinary in the application.
It just happened

@firebird-automations
Copy link
Author

Modified by: Radu Simen (radu103)

Attachment: fb_command_bug.png [ 11911 ]

@firebird-automations
Copy link
Author

Commented by: Radu Simen (radu103)

I think the problem is in RollbackImplicitTransaction function FbCommand.cs at line 788

int transactionCount = this.Connection.InnerConnection.Database.TransactionCount;

Maybe the 'this.Connection.InnerConnection.Database.TransactionCount;' has some null values when the parent window is closed and are more transactions not disposed yet.

I think a try catch there with logging to event log will be good.

@firebird-automations
Copy link
Author

Modified by: @cincuranet

status: Open [ 1 ] => In Progress [ 3 ]

@firebird-automations
Copy link
Author

Modified by: @cincuranet

status: In Progress [ 3 ] => Closed [ 6 ]

resolution: Duplicate [ 3 ]

@firebird-automations
Copy link
Author

Modified by: @cincuranet

Link: This issue duplicates DNET316 [ DNET316 ]

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