Unhandled Exception Error - v4.95.180

Unhandled Exception Error - v4.95.180

Postby 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:

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)
Posts: 1
Joined: Wed 13 Oct 2010 17:21

Postby 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.
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby 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.
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby 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
(the trial version) or from Registered Users' Area (for users with active subscription only):

For the detailed information about the fixes and improvements available in the latest build, please refer to
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Return to dotConnect for PostgreSQL