From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Carlos
Sent: Friday, December 14, 2007 12:24 PM
To: For users and developers of the Firebird .NET providers
Subject: Re: [Firebird-net-provider] Faulty GdsConnection::NextOperation
Hello:
Nah, not a complete one. The fault is a bit random, and you need a
lengthy dataset to stumble across it (I can't post you our customer database :).
without a test case it's going to be hard difficult to solve the problem,
Yes, I can understand that. But at the same time, the problem is use of
System.Net.Sockets.NetworkStream.Read without checking if there is data
available, which, according to the documentation
http://msdn2.microsoft.com/en-us/library/system.net.sockets.networkstream.read(VS.71).aspx,
will block until data is available.
what si the character set of the database and the one you are using in the
connection string
WIN 1252 (both)
the callstack when the fault occurs is like this (suddenly I am unsure if my
hotfix fixes anything, or if I just have been lucky for a while)
ntdll.dll!7c90eb94()
[Frames below may be incorrect and/or missing, no symbols loaded for
ntdll.dll]
ntdll.dll!7c90e9c0()
mswsock.dll!71a54033()
mswsock.dll!71a557c9()
ntdll.dll!7c90d8ef()
mswsock.dll!71a55908()
[Managed to Native Transition]
System.dll!System.Net.Sockets.Socket.Receive(byte[] buffer =
{byte[4096]}, int offset = 0, int size, System.Net.Sockets.SocketFlags
socketFlags = None, out System.Net.Sockets.SocketError errorCode = Success) +
0x139 bytes
System.dll!System.Net.Sockets.Socket.Receive(byte[] buffer, int
offset, int size, System.Net.Sockets.SocketFlags socketFlags) + 0x1d bytes
System.dll!System.Net.Sockets.NetworkStream.Read(byte[] buffer, int
offset, int size) + 0x78 bytes
mscorlib.dll!System.IO.BufferedStream.Read(byte[] array = {byte[8]},
int offset = 0, int count = 4) + 0xc3 bytes
FirebirdSql.Data.FirebirdClient.dll!FirebirdSql.Data.Client.Gds.XdrStream.Read(byte[]
buffer = {byte[8]}, int offset = 0, int count = 4) Line 188 + 0x17 bytes
C#
FirebirdSql.Data.FirebirdClient.dll!FirebirdSql.Data.Client.Gds.XdrStream.ReadInt32()
Line 295 + 0x13 bytesC#
FirebirdSql.Data.FirebirdClient.dll!FirebirdSql.Data.Client.Gds.GdsConnection.NextOperation()
Line 169 + 0xc bytes C#
FirebirdSql.Data.FirebirdClient.dll!FirebirdSql.Data.Client.Gds.GdsDatabase.NextOperation()
Line 632 + 0xa bytes C#
FirebirdSql.Data.FirebirdClient.dll!FirebirdSql.Data.Client.Gds.GdsStatement.Fetch()
Line 415 + 0xd bytes C#
FirebirdSql.Data.FirebirdClient.dll!FirebirdSql.Data.FirebirdClient.FbCommand.Fetch()
Line 655 + 0xe bytes C#
FirebirdSql.Data.FirebirdClient.dll!FirebirdSql.Data.FirebirdClient.FbDataReader.Read()
Line 248 + 0xc bytes C#
konverter.exe!konverter.Window1.select_and_export(string sql =
SELECT IIF( M.Id 10, M.Id + 102000, M.Id ) AS \Kundenummer\, Navn AS
\Navn\, COALESCE( Postadresse, '' ) AS \Adresse\, '' AS \Adressefelt2\,
COALESCE( Postnummer, '' ) AS \Postnr\, COALESCE( Poststed, '' ) AS
\Poststed\, COALESCE( Telefon, '' ) AS \Telefon\, COALESCE( Faks, '' ) AS
\Telefaks\, COALESCE( Mobil, '' ) AS \Mobil\, COALESCE( Epostadresse, '' )
AS \Email\, COALESCE( Organisasjonsnummer, '' ) AS \Organisasjonsnr\,
COALESCE( Betalingsbetingelse, '' ) AS \Kredittdager\, COALESCE(
MF.Kredittgrense, '' ) AS \Kredittgrense\, '' AS \Selgernr\, '' AS
\Kundekategori\, '' AS \Kommentarer\, COALESCE( Bankkontonummer, '' ) AS
\Gironummer\, '' AS \Sist oppdatert\ FROM Motpart M JOIN MotpartFaktura MF
ON MF.Motpartkategori = 'K' AND MF.Id = M.Id JOIN MotpartElektronisk ME ON
ME.Motpartkategori = 'K' AND ME.Id = M.Id WHERE M.Motpartkategori = 'K' AND
Datoslettet IS NULL AND EXISTS( SELECT * FROM Reskontro R WHERE
R.Motpartkategori = 'K' AND R.Motpartid = M.Id ), string path =
c:\\work\\data\\kunder.txt) Line 48 + 0xa bytesC#
konverter.exe!konverter.Window1.kunder_Click(object sender =
{System.Windows.Controls.Button}, System.Windows.RoutedEventArgs e =
{System.Windows.RoutedEventArgs}) Line 112 + 0xf bytesC#
PresentationCore.dll!System.Windows.RoutedEventHandlerInfo.InvokeHandler(object
target, System.Windows.RoutedEventArgs routedEventArgs) + 0x56 bytes
PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl(object source
= {System.Windows.Controls.Button}, System.Windows.RoutedEventArgs args =
{System.Windows.RoutedEventArgs}, bool reRaised = false) + 0x10f bytes
PresentationCore.dll