Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeout exceeded or NullReferenceException after sometime [DNET386] #391

Closed
firebird-automations opened this issue Jun 30, 2011 · 5 comments

Comments

@firebird-automations
Copy link

Submitted by: Nataniel (natanieljr)

Duplicates DNET316

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</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>

@firebird-automations
Copy link
Author

Commented by: antgraf (antgraf)

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.

@firebird-automations
Copy link
Author

Commented by: @cincuranet

The stack looks very similar to DNET316. Can you check with current version that now it's not happening?

@firebird-automations
Copy link
Author

Modified by: @cincuranet

status: Open [ 1 ] => In Progress [ 3 ]

@firebird-automations
Copy link
Author

Modified by: @cincuranet

status: In Progress [ 3 ] => Closed [ 6 ]

resolution: Duplicate [ 3 ]

@firebird-automations
Copy link
Author

Modified by: @cincuranet

Link: This issue duplicates DNET316 [ DNET316 ]

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

No branches or pull requests

2 participants