We are using version 2.1.0.0 of the .NET 2.0 data provider.

 

 

Here is the relevant portion of the stack trace we're seeing:

 

 

========================

 

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

Source: FirebirdSql.Data.FirebirdClient

Stack trace: at
FirebirdSql.Data.FirebirdClient.FbCommand.RollbackImplicitTransaction()
a

FirebirdSql.Data.FirebirdClient.FbCommand.CommitImplicitTransaction() at

FirebirdSql.Data.FirebirdClient.FbCommand.DiscardImplicitTransaction()
at

FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteReader(CommandBehavior
behavior) at

FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteDbDataReader(CommandBeh
avior behavior) at

System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(Comman
dBehavior 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
[et-cetera]

 

==============================

 

 

 

Review of Stack Trace:

 

 

Our dll calls FirebirdSql.Data.FirebiredClient.FbDataAdapter.Fill().

 

This ends up at
FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteReader(CommandBehavior
behavior).

 

 

The ExecuteReader method:

 

=========================================

 

public FbDataReader ExecuteReader(CommandBehavior behavior) 

 

{

    lock (this)

    {

        this.CheckCommand();

        try

        {

            this.ExecuteCommand(behavior, true);

        }

        catch (IscException exception)

        {

            this.DiscardImplicitTransaction();

            throw new FbException(exception.Message, exception);

        }

        catch

        {

            this.DiscardImplicitTransaction();

            throw;

        }

    }

    this.activeReader = new FbDataReader(this, this.connection,
behavior);

    return this.activeReader;

} 

 

=============================================

 

In order for an exception to be thrown below DiscardImplicitException(),

this.ExecuteCommand(behavior,true) must throw an exception.

However, because DiscardimplicitException() itself throws an exception,

we (the caller) don't see the exception ExecuteCommand() raised. 

 

 

Because our dll fails intermittently it stands to reason that

ExecuteCommand() fails because of environmental interference.

 

 

Our initial conclusion is this Exception results from an environmental

anomaly causing the FirebirdSql.Data.Firebird.FbDataAdapter.Fill()
method

to throw an exception.  The FireBird.DLL handles an exception thrown

because of the environmental anomaly.  The code then tries to revert to

a good state before throwing the Exception up to the caller.  However,

the "clean up" code throws an unhandled null reference exception,

which is unhandled by the code and gets propagated to the caller.

Consequently, there is no information indicating what caused the

FireBird DLL to be in a bad state.

 

 

On the other hand, perhaps the .Net garbage collection is running (in
its automated manner) - which is trying to dispose of the FB database
connection - which is calling an implicit transaction rollback on an
object that no longer exists.

 

 

Can anybody give us a clue what the root cause might be?

 

 

Incidentally, we're seeing this happen frequently with such a simple
query as:

 

 

select a, b, c from table where d = 'string' and a is not null and e =
0;

 



“Hey You Guys!” 
THE ELECTRIC COMPANY is now on every weekday.
Only on PBS KIDS GO!
http://pbskids.org/electriccompany 
_____________________________________________________________________________

This email may contain material that is confidential or proprietary to PBS and 
is intended solely for use by the intended recipient. Any review, reliance or 
distribution of such material by others, or forwarding of such material without 
express permission, is strictly prohibited. If you are not the intended 
recipient, please notify the sender and destroy all copies.
_____________________________________________________________________________

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to