Exception after upgrade Firebird

51 views
Skip to first unread message

DANIEL JUNGES

unread,
Jun 21, 2021, 2:09:30 PM6/21/21
to firebird-net-provider

hi,

we have made the follow upgrade on our web application:

FirebirdClient 2.7.7 TO 8.0.1
Firebird 2.1.2  TO 3.0.7
.Net Framework from 4.0 TO 4.8

I dont know wy, but some times we got the follow exception when try to fill a dataset using dataadapter:
[Exception: operation=1051648 Nome do parâmetro: operation]

this error only occurs on our web application that is running under IIS, on the desktop app this error not occurs.

this is the connectionstring: 
User ID=userName;
Password=xxxx;
Database=127.0.0.1:C:\xxx.FDB;
DataSource=127.0.0.1;
Port=3051;
Dialect=3;
Charset=WIN1252;
Role=xxx;
Connection lifetime=600;
Pooling=true;
MinPoolSize=0;
Packet Size=8192;
ServerType=0

i hope that anyone can help me

regards
Daniel JKunges

Norbert Saint Georges

unread,
Jun 21, 2021, 2:20:07 PM6/21/21
to firebird-n...@googlegroups.com

I have the same problem as you and cannot identify in which reproducible case this is coming from

 

System.ArgumentOutOfRangeException: operation=1852571648

Nom du paramètre : operation

   à FirebirdSql.Data.Client.Managed.GdsConnection.<ProcessOperation>d__46.MoveNext()

--- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée ---

   à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

   à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   à System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()

   à FirebirdSql.Data.Client.Managed.Version10.GdsDatabase.<ReadSingleResponse>d__52.MoveNext()

--- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée ---

   à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

   à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   à System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()

   à FirebirdSql.Data.Client.Managed.Version10.GdsDatabase.<ReadSingleResponse>d__51.MoveNext()

--- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée ---

   à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

   à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   à System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()

   à FirebirdSql.Data.Client.Managed.Version10.GdsDatabase.<ReadResponse>d__49.MoveNext()

--- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée ---

   à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

   à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   à System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()

   à FirebirdSql.Data.Client.Managed.Version10.GdsTransaction.<Rollback>d__9.MoveNext()

--- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée ---

   à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

   à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   à System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()

   à FirebirdSql.Data.Client.Managed.Version10.GdsTransaction.<Dispose2>d__6.MoveNext()

--- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée ---

   à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

   à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   à System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()

   à FirebirdSql.Data.FirebirdClient.FbTransaction.<DisposeHelper>d__19.MoveNext()

--- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée ---

   à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

   à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   à System.Runtime.CompilerServices.TaskAwaiter.GetResult()

   à FirebirdSql.Data.FirebirdClient.FbTransaction.Dispose(Boolean disposing)

   à FirebirdSql.Data.FirebirdClient.FbCommand.<RollbackImplicitTransaction>d__108.MoveNext()

--- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée ---

   à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

   à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   à System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()

   à FirebirdSql.Data.FirebirdClient.FbCommand.<ExecuteReaderImpl>d__89.MoveNext()

--- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée ---

   à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

   à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   à System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()

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

   à norpa.Data.FBSqlHelper.ExecuteReader(String connectionString, CommandType commandType, String commandText, FbParameter[] commandParameters) dans J:\dev VS2019\NorpaNet for Frantsila\norpa.Data.FirebirdSql\FBSqlHelper.pas:ligne 252

   à norpa.Data.FBSqlHelper.ExecuteReader(String connectionString, String commandText, FbParameter[] commandParameters) dans J:\dev VS2019\NorpaNet for Frantsila\norpa.Data.FirebirdSql\FBSqlHelper.pas:ligne 234

   à RM.Data.DBps_rm_cust_from_guid.select_ps_rm_cust_from_guid_CUST_GUID_to_reader(Guid CUST_GUID, String Lang)

   à RM.Business.ps_rm_cust_from_guid.select_ps_rm_cust_from_guid_CUST_GUID_to_list(Guid CUST_GUID, String Lang)

   à RM.Business.Customers..ctor(String Lang, Guid UserGuid, RM_Dictionary dico)

   à RM.UI.WebHelpers.CacheHelper.<>c__DisplayClass27.<RM_Cust_from_GUID>b__0()

   à norpa.Web.Caching.CacheProvider.Get[T](String cacheKey, DateTime expiryDate, GetDataToCacheDelegate`1 getData, Boolean addToPerRequestCache) dans J:\dev VS2019\NorpaNet for Frantsila\norpa.Web\Components\Caching\CacheProvider.pas:ligne 76

   à RM.UI.WebHelpers.CacheHelper.RM_Cust_from_GUID(Guid cust_guid, String lang)

   à RM.UI._Default.Page_Load(Object sender, EventArgs e)

   à System.Web.UI.Control.OnLoad(EventArgs e)

   à norpa.Web.mojoBasePage.OnLoad(EventArgs e) dans J:\dev VS2019\NorpaNet for Frantsila\norpa.Web\Components\mojoBasePage.pas:ligne 1088

   à System.Web.UI.Control.LoadRecursive()

   à System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

 

De : firebird-n...@googlegroups.com [mailto:firebird-n...@googlegroups.com] De la part de DANIEL JUNGES
Envoyé : lundi 21 juin 2021 21:10
À : firebird-net-provider
Objet : [firebird-net-provider] Exception after upgrade Firebird

--
You received this message because you are subscribed to the Google Groups "firebird-net-provider" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebird-net-pro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebird-net-provider/885cee17-314d-47eb-823e-54b9a3d03acen%40googlegroups.com.

Jiří Činčura

unread,
Jun 21, 2021, 2:23:21 PM6/21/21
to 'Mr. John' via firebird-net-provider
A full stack trace would be better, but from the exception message I probably can guess where it is.

This usually signals something wrong is on provider side in terms of protocol handling - simply something was expected, but something else was read, i.e. probably something was not read/written properly before this point and now everything is broken.

Can you replicate it? Because without that, it's almost impossible to figure out what's wrong.

--
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/

DANIEL JUNGES

unread,
Jun 21, 2021, 2:29:04 PM6/21/21
to firebird-net-provider
hi Jiří Činčura, 

thanks for the response. here is the full stack trace:

   em FirebirdSql.Data.Client.Managed.GdsConnection.<ProcessOperation>d__49.MoveNext()
--- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada ---
   em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   em FirebirdSql.Data.Client.Managed.Version10.GdsDatabase.<ReadSingleResponse>d__52.MoveNext()
--- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada ---
   em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   em FirebirdSql.Data.Client.Managed.Version10.GdsDatabase.<ReadSingleResponse>d__51.MoveNext()
--- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada ---
   em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   em FirebirdSql.Data.Client.Managed.Version10.GdsDatabase.<ReadResponse>d__49.MoveNext()
--- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada ---
   em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   em FirebirdSql.Data.Client.Managed.Version10.GdsTransaction.<BeginTransaction>d__7.MoveNext()
--- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada ---
   em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   em FirebirdSql.Data.Client.Managed.Version10.GdsDatabase.<BeginTransaction>d__38.MoveNext()
--- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada ---
   em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   em FirebirdSql.Data.FirebirdClient.FbTransaction.<BeginTransaction>d__41.MoveNext()
--- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada ---
   em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   em FirebirdSql.Data.FirebirdClient.FbCommand.<Prepare>d__118.MoveNext()
--- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada ---
   em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   em FirebirdSql.Data.FirebirdClient.FbCommand.<ExecuteCommand>d__119.MoveNext()
--- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada ---
   em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   em FirebirdSql.Data.FirebirdClient.FbCommand.<ExecuteReaderImpl>d__89.MoveNext()
--- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada ---
   em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   em FirebirdSql.Data.FirebirdClient.FbCommand.<ExecuteReaderImpl>d__89.MoveNext()
--- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada ---
   em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   em FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteReader(CommandBehavior behavior)
   em System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   em System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   em System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)

DANIEL JUNGES

unread,
Jun 23, 2021, 2:34:42 PM6/23/21
to firebird-net-provider
hi,

the problem is realy very strange and and cannot understand what happens there. I create a new connection, open it withou error and when want to Fill a dataSet then become the exception.
this exception occurs only on web enviroment, on our desktop app this not occurs.

any idea ?

thanks in advance
Daniel Junges

Jiří Činčura

unread,
Jun 24, 2021, 1:57:21 AM6/24/21
to 'Mr. John' via firebird-net-provider
> the problem is realy very strange and and cannot understand what
> happens there. I create a new connection, open it withou error and when
> want to Fill a dataSet then become the exception.
> this exception occurs only on web enviroment, on our desktop app this

Can you reliably replicate it?

DANIEL JUNGES

unread,
Jun 24, 2021, 7:15:00 AM6/24/21
to firebird-net-provider
hi  Jiří Činčura and thanks for the response

the exception not occurs  immediately, we enter on the system and after some time then begin the broken connection for all connected users.

let me explain the cenário a litle bit:
Each users mantain saved and open on their session 4 FbConnections objects to the database.
- "userName" connection
- "admin" connection
- "admin2" connection
- "sistem" connection

before upgrading we has Firebirs 2.1 and got somtimes an broken connection state with the follow error message 
"There is already an open DataReader", but we not use DataReader, only DataAdapters with DataSets

i hope that this infos can help to understand what is happening

thanks in advance 
regards
Daniel Junges

Gerdus van Zyl

unread,
Jun 25, 2021, 3:53:22 AM6/25/21
to firebird-n...@googlegroups.com
Make sure you are not using those connections across threads since the FbConnection is not thread-safe.
That " There is already an open DataReader" message is what I usually get if I use a connection concurrently.

--
You received this message because you are subscribed to the Google Groups "firebird-net-provider" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebird-net-pro...@googlegroups.com.

DANIEL JUNGES

unread,
Jun 25, 2021, 8:10:32 AM6/25/21
to firebird-net-provider
hi
thanks for the response,

My doubt was reference the openned FbConnection stored in the Session, because this was the unique diference between our Web and Desktop apps.
Now we open and "close" all the FbConnections stored in the Session after every request and the error doesn't happen anymore. 

Probaly the Session managment has been altered on .net4.8.The Session seems to make "sometimes" a copy of stored FbConnection instead mantain a reference and so lost its tcp connection.

The strange thing is that we've used it this way for over 10 years...

Dear members of this group, many thanks for any help
regars
Daniel Junges



Reply all
Reply to author
Forward
0 new messages