SCM

[#1010726] Exception when finish application

View Trackers | Bugs | Download .csv | Monitor

Date:
2009-11-09 16:02
Priority:
3
State:
Open
Submitted by:
Ciril Santos (cirix81)
Assigned to:
Nobody (None)
Npgsql Version:
2.0
Category:
Group:
Resolution:
None
Summary:
Exception when finish application

Detailed description
Hi,

When I explicitly close a connection and when my application finish, the destructor of NpgsqlConnector try to flush a closed stream in the NpgsqlReadyState close function.

A simple example to recreate this crash is create a empty application with this few code line in the form load event:

Npgsql.NpgsqlConnection con= new Npgsql.NpgsqlConnection ("Some Valid Conn String");
con.Open();
con.Close();

Then close the form and you will see the exception.

I thing if you put the line 144 of NpgsqlReadyState file("stream.Flush();") into the try catch in the line 146, you can solve this problem.

I hope i can help.



Followup

Message
Date: 2009-11-26 15:09
Sender: Francisco Figueiredo jr.

Hi, Ciril!

I couldn't reproduce your problem.

I did as you said but I couldn't get any exception being thrown outside the catch exception handling.

Indeed, an exception is thrown by the finalizer. But the Close() method of NpgsqlConnector is already surrounded by a try catch block which should get all the exceptions raised.

Would you mind to send me an stack trace or a project test sample where you get this?

I'm using cvs version which is the same as 2.0.7 of Npgsql. Which version are you using?


Thanks in advance.

Attached Files:

Changes:

No Changes Have Been Made to This Item

Powered By FusionForge