Unhandled Exception - FirebirdSql.Data.Common.IscException: Error writing data to the connection.

82 views
Skip to first unread message

Luciano Rodrigues Nunes Mendes

unread,
Mar 3, 2021, 5:16:22 AM3/3/21
to firebird-net-provider
Hi Jiri,

I am testing the FirebirdSql.Data.FirebirdClient version 8.0.0-alpha3 and the following unhandled exception has been happening quite often:

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
FirebirdSql.Data.Common.IscException: Error writing data to the connection.
Error reading data from the connection. ---> System.IO.IOException: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
   at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   at FirebirdSql.Data.Common.AsyncWrappingCommonArgs.SyncTaskCompleted[TTask,T1,T2,T3](TTask completed, Action`3 sync, T1 arg1, T2 arg2, T3 arg3)
   at FirebirdSql.Data.Common.AsyncWrappingCommonArgs.AsyncSyncCall[T1,T2,T3](Func`5 asyncCall, Action`3 syncCall, T1 arg1, T2 arg2, T3 arg3)
   at FirebirdSql.Data.Client.Managed.DataProviderStreamWrapper.Write(Byte[] buffer, Int32 offset, Int32 count, AsyncWrappingCommonArgs async)
   at FirebirdSql.Data.Client.Managed.FirebirdNetworkHandlingWrapper.<Flush>d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at FirebirdSql.Data.Client.Managed.Version10.GdsStatement.<DoFreePacket>d__43.MoveNext()
   --- End of inner exception stack trace ---
   at FirebirdSql.Data.Client.Managed.Version10.GdsStatement.<DoFreePacket>d__43.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at FirebirdSql.Data.Client.Managed.Version11.GdsStatement.<Free>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at FirebirdSql.Data.Common.StatementBase.<Release>d__47.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at FirebirdSql.Data.Client.Managed.Version10.GdsStatement.<Dispose2>d__24.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at FirebirdSql.Data.FirebirdClient.FbCommand.<Release>d__110.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at FirebirdSql.Data.FirebirdClient.FbCommand.<DisposeHelper>d__73.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at FirebirdSql.Data.FirebirdClient.FbCommand.Dispose(Boolean disposing)
   at System.ComponentModel.Component.Dispose()
   at CHRONOS.Models.Databases.FirebirdSQLDatabase.SelectProcedure(String procedureName, String[] inputParameters, DataTable& dataTable, Boolean poolingStatus)

I've tried to catch this exception with a try/catch(FbException ex) block in the CHRONOS.Models.Databases.FirebirdSQLDatabase.ExecuteProcedure method but it never catches this FbException.


Thanks in advance,
Luciano

Jiří Činčura

unread,
Mar 3, 2021, 5:26:43 AM3/3/21
to 'Mr. John' via firebird-net-provider
> Is this issue related to the [#DNET-1014] Unhandled exception at
> FirebirdSql.Data.Client.Managed.FirebirdNetworkStream.Flush() -
> Firebird RDBMS Issue Tracker
> <http://tracker.firebirdsql.org/browse/DNET-1014> or should I open a
> new issue?

It's the same.

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

Luciano Rodrigues Nunes Mendes

unread,
Mar 3, 2021, 5:42:04 AM3/3/21
to firebird-n...@googlegroups.com
Thank you very much for the confirmation, Jiri!

Best Regards,
Luciano

--
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/3346796a-434d-4fee-9648-04cfe1503896%40www.fastmail.com.
Reply all
Reply to author
Forward
0 new messages