ObjectDisposeException #208

Closed
GaryK4 opened this Issue Apr 9, 2014 · 4 comments

Projects

None yet

2 participants

@GaryK4
GaryK4 commented Apr 9, 2014

I am developing in vb.net. When I end my program, I get an error
Cannot access a disposed object.
Object name: 'System.Net.Sockets.NetworkStream'
Am I doing something wrong?

Here is more details:
Npgsql.dll!Npgsql.Npgsql.Connector.Finalize() Line 190 + 0x9 bytes

System.ObjectDisposedException occurred
HResult=-2146232798
Message=Cannot access a disposed object.
Object name: 'System.Net.Sockets.NetworkStream'.
Source=System
ObjectName=System.Net.Sockets.NetworkStream
StackTrace:
at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.IO.BufferedStream.Flush()
at Npgsql.NpgsqlReadyState.Close(NpgsqlConnector context)
InnerException:

@franciscojunior
Member

Nice catch!

I'll have a look at this.

Thanks for reporting.

@franciscojunior franciscojunior added this to the 2.2 milestone Apr 9, 2014
@franciscojunior franciscojunior added the bug label Apr 9, 2014
@franciscojunior
Member

Which version of Npgsql are you using, @GaryK4 ?

Are you getting this error when debugging your application inside vs.net?

@GaryK4
GaryK4 commented Apr 10, 2014

I was using 2.0.11.0 – net4. This was my original starting point.

I just tried 2.0.14.3 (net4) and it does not have the issue!

I read somewhere that the 2.0. series were safer to use.

That is the highest 2.0 series that I could find.

http://pgfoundry.org/frs/?group_id=1000140

Has 2.1.2 (net4) with the duplicate entries.

Because, I am in the MySql to PostgresQL migration testing phase, should I be using it?

Sorry if I am asking a lot of questions as a PostgreSQL / Npgsql newbie

Thanks for the help.

Gary Kahrau

gkahrau@gmail.com

From: Francisco Figueiredo Jr. [mailto:notifications@github.com]
Sent: Thursday, April 10, 2014 10:48 AM
To: npgsql/Npgsql
Cc: GaryK4
Subject: Re: [Npgsql] ObjectDisposeException (#208)

Which version of Npgsql are you using, @GaryK4 https://github.com/GaryK4 ?

Are you getting this error when debugging your application inside vs.net?


Reply to this email directly or view it on GitHub #208 (comment) . https://github.com/notifications/beacon/7224913__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcxMjc2MDQ5NSwiZGF0YSI6eyJpZCI6Mjk2NjM0NTN9fQ==--44b40fbab3e6c2572235d42f0408e787cb98d907.gif

@franciscojunior
Member

Ahhh, excellent!

I'm glad to know the latest 2.0.14.3 version doesn't have this problem.

2.0.14.3 is our previous stable version.

If you want some more new features, you should go with 2.1.x It is also stable and should be considered for new developments.

We are now working in the 2.2.x version with even more features (as well as new bugs :) ) that we are working on.

Yesterday we launched the 2.1.3 version. I still have to update the pgfoundry download page.

Please, let us know if you have any other problem when using Npgsql.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment