Unhandled Exception Error - v4.95.180

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
Hemichaerger99
Posts: 1
Joined: Wed 13 Oct 2010 17:21

Unhandled Exception Error - v4.95.180

Post by Hemichaerger99 » Fri 22 Oct 2010 16:00

I have 3 clients that are receiving this error message on a regular basis. Any ideas on what this could be? It occurs on a timer tick which is on the main UI thread, not a background thread.

Code: Select all

Error Message:
   Object reference not set to an instance of an object.

Error Source:
   Devart.Data.PostgreSql

Stack Trace:
   at Devart.Data.PostgreSql.j.a(Int32 A_0)
   at Devart.Data.PostgreSql.PgSqlCommand.InternalPrepare(Boolean implicitPrepare, Int32 startRecord, Int32 maxRecords)
   at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior, Boolean nonQuery)
   at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
   at CSr.csrDataSetTableAdapters.messages_newTableAdapter.GetDataBy_employee_id_to(String message_owner, String employee_id_to, Int32 message_status, Boolean is_rolodexed)
   at CSr.frm_Main.tmrServer_Tick(Object sender, EventArgs e)
   at System.Windows.Forms.Timer.OnTick(EventArgs e)
   at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Mon 25 Oct 2010 14:22

As I can understand, the problem occurs when a DbDataAdapter component is being filled. Could you please describe how this component is initialized and what select query is being executed? If possible, please send us a test project with which the problem can be reproduced.

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Tue 26 Oct 2010 08:44

The problem may be caused by a single connection being used in several threads. This is not recommended, as PgSqlConnection instances are not thread-safe.

Please specify if a connection is used in several threads in your application.

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Thu 07 Apr 2011 17:05

We have fixed this issue in the new 5.10.135 build of dotConnect for PostgreSQL. This new build can be downloaded from
http://www.devart.com/dotconnect/postgr ... nload.html
(the trial version) or from Registered Users' Area (for users with active subscription only):
http://secure.devart.com/

For the detailed information about the fixes and improvements available in the latest build, please refer to
http://www.devart.com/forums/viewtopic.php?t=20709

Post Reply