Issue Details (XML | Word | Printable)

Key: DNET-386
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Jiri Cincura
Reporter: Nataniel
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
.NET Data provider

Timeout exceeded or NullReferenceException after sometime

Created: 30/Jun/11 07:37 PM   Updated: 22/Jul/11 05:25 PM
Component/s: ADO.NET Provider
Affects Version/s: 2.6
Fix Version/s: None

Time Tracking:
Not Specified

Environment:
WIndows 7, Windows Server 2008 or Windows XP
Firebird .Net Provider 2.6.2
VS 2008
Net Framework 3.5 or 4.0


 Description  « Hide
I have an application that runs on the server monitoring changes to a Firebird database and sending them through a webservice.

I create a new connection for every recieved items group because the provider currently do not support paralel transactions. After sending the data (and saving the transmission invoice back into the database) I close this connection.

After some time running the provider starts presenting errors.

If I let "POOLING = True" at my connection string after about 1 hour I started recieving a "Timeout exceeded" error.

If I let "POOLING = False" at my connection string after about 1 hour the system crashes with a "NullReferenceException"

VS stopped at "int transactionCount = this.Connection.InnerConnection.Database.TransactionCount;" with "InnerConnection = NULL", at "internal void RollbackImplicitTransaction()"

The only way I found to prevent this is making this change to FbCommand.cs

Change this:
            if (this.HasImplicitTransaction && this.transaction != null && this.transaction.Transaction != null)

To this:
            if (this.HasImplicitTransaction && this.transaction != null && this.transaction.Transaction != null && this.Connection.InnerConnection != null)

Below is the error from VS output

------------------------------------ ERROR ------------------------------------
A first chance exception of type 'FirebirdSql.Data.Common.IscException' occurred in FirebirdSql.Data.FirebirdClient.dll

A first chance exception of type 'System.NullReferenceException' occurred in FirebirdSql.Data.FirebirdClient.dll
'prjSeloDigital.vshost.exe' (Managed (v2.0.50727)):

Loaded 'C:\Windows\assembly\GAC_MSIL\System.Transactions.resources\2.0.0.0_pt-BR_b77a5c561934e089\System.Transactions.resources.dll'
System.Transactions Critical: 0 :
<TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Critical">
<TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled&lt;/TraceIdentifier>
<Description>Exceção não tratada</Description>
<AppDomain>prjSeloDigital.vshost.exe</AppDomain>
<Exception>
<ExceptionType>System.NullReferenceException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
<Message>Referência de objeto não definida para uma instância de um objeto.</Message>
<StackTrace>
em FirebirdSql.Data.FirebirdClient.FbCommand.RollbackImplicitTransaction() na C:\Projetos\Extradigital\Utilitarios\SeloDigital\prjSeloDigital.root\prjSeloDigital - Cópia\NETProvider-2.6.5-src\FirebirdSql\Data\FirebirdClient\FbCommand.cs:linha 790
    em FirebirdSql.Data.FirebirdClient.FbCommand.Release() na C:\Projetos\Extradigital\Utilitarios\SeloDigital\prjSeloDigital.root\prjSeloDigital - Cópia\NETProvider-2.6.5-src\FirebirdSql\Data\FirebirdClient\FbCommand.cs:linha 828
    em FirebirdSql.Data.FirebirdClient.FbCommand.Dispose(Boolean disposing) na C:\Projetos\Extradigital\Utilitarios\SeloDigital\prjSeloDigital.root\prjSeloDigital - Cópia\NETProvider-2.6.5-src\FirebirdSql\Data\FirebirdClient\FbCommand.cs:linha 396
    em System.ComponentModel.Component.Finalize()</StackTrace><ExceptionString>System.NullReferenceException: Referência de objeto não definida para uma instância de um objeto.
    em FirebirdSql.Data.FirebirdClient.FbCommand.RollbackImplicitTransaction() na C:\Projetos\Extradigital\Utilitarios\SeloDigital\prjSeloDigital.root\prjSeloDigital - Cópia\NETProvider-2.6.5-src\FirebirdSql\Data\FirebirdClient\FbCommand.cs:linha 790
    em FirebirdSql.Data.FirebirdClient.FbCommand.Release() na C:\Projetos\Extradigital\Utilitarios\SeloDigital\prjSeloDigital.root\prjSeloDigital - Cópia\NETProvider-2.6.5-src\FirebirdSql\Data\FirebirdClient\FbCommand.cs:linha 828
    em FirebirdSql.Data.FirebirdClient.FbCommand.Dispose(Boolean disposing) na C:\Projetos\Extradigital\Utilitarios\SeloDigital\prjSeloDigital.root\prjSeloDigital - Cópia\NETProvider-2.6.5-src\FirebirdSql\Data\FirebirdClient\FbCommand.cs:linha 396
    em System.ComponentModel.Component.Finalize()
    </ExceptionString>
    </Exception>
</TraceRecord>

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
antgraf added a comment - 22/Jul/11 05:25 PM
System.NullReferenceException was unhandled
  Message=Ссылка на объект не указывает на экземпляр объекта.
  Source=FirebirdSql.Data.FirebirdClient
  StackTrace:
       в FirebirdSql.Data.FirebirdClient.FbCommand.RollbackImplicitTransaction() в C:\Users\Jiri\Desktop\NETProvider\source\FirebirdSql\Data\FirebirdClient\FbCommand.cs:строка 790
       в FirebirdSql.Data.FirebirdClient.FbCommand.Release() в C:\Users\Jiri\Desktop\NETProvider\source\FirebirdSql\Data\FirebirdClient\FbCommand.cs:строка 828
       в FirebirdSql.Data.FirebirdClient.FbCommand.Dispose(Boolean disposing) в C:\Users\Jiri\Desktop\NETProvider\source\FirebirdSql\Data\FirebirdClient\FbCommand.cs:строка 396
       в System.ComponentModel.Component.Finalize()
  InnerException:


Caused by simple test application (C#: FirebirdSql.Data.FirebirdClient) that just read random records from test db.