Re: [Firebird-net-provider] Faulty GdsConnection::NextOperation

2007-12-14 Thread Frode Nilsen
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Carlos
Sent: Friday, December 14, 2007 9:00 AM
To: For users and developers of the Firebird .NET providers
Subject: Re: [Firebird-net-provider] Faulty GdsConnection::NextOperation

 

Hello:

The spinner in GdsConnection::NextOperation() doesn't seem to be any 
good idea, it causes the application to lock up in random situations.



What version of the Firebird server are you using ??

 

WI-V2.0.1.12855 Firebird 2.0


What version of the .NNET provider are you using ??

 

2.1.0.0

What version of .NET are you using ??

 

3.5


Can you send a test case showing the problem ??


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 :).

 

Here is a codesnippet showing the type of code where this occurs:

 

FirebirdSql.Data.FirebirdClient.FbCommand cmd = new 
FirebirdSql.Data.FirebirdClient.FbCommand(sql, conn);

FirebirdSql.Data.FirebirdClient.FbDataReader leser = 
cmd.ExecuteReader();

 

while (leser.Read()) // --- fault randomly occurs here

{

}

 

Nothing spesial about it.

 

The SQL is like this

 

SELECT M.Id + 50,

 Navn, COALESCE( Postadresse, '', COALESCE( Postnummer, '' ), COALESCE( 
Poststed, '' ),

 COALESCE( Telefon, '' ), COALESCE( Faks, '' ), COALESCE( Mobil, '' ), 
COALESCE( Epostadresse, '' ),

 COALESCE( Organisasjonsnummer, '' ), COALESCE( Bankkontonummer, '' ),

  COALESCE( Betalingsbetingelse, '' ), Tilleggstekst

 FROM Motpart M

 JOIN MotpartElektronisk ME ON ME.Motpartkategori = 'L' AND ME.Id = M.Id

 WHERE M.Motpartkategori = 'L' AND Datoslettet IS NULL

   AND EXISTS( SELECT *

 FROM Reskontro R

 WHERE R.Motpartkategori = 'L' AND R.Motpartid = M.Id )

 

it returns a set of  aprox. 12000 records, the fault can occure on reading the 
first record or after several thousand records

 

hth

 

-frode

-
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


Re: [Firebird-net-provider] Faulty GdsConnection::NextOperation

2007-12-14 Thread Carlos
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,
what si the character set of the database and the one you are using in the
connection string


-- 
Carlos Guzmán Álvarez
Vigo-Spain

XMPP Client : http://code.google.com/p/xmppclient/
-
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


Re: [Firebird-net-provider] Faulty GdsConnection::NextOperation

2007-12-14 Thread Frode Nilsen
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

Re: [Firebird-net-provider] Faulty GdsConnection::NextOperation

2007-12-13 Thread Carlos
Hello:

The spinner in GdsConnection::NextOperation() doesn't seem to be any
 good idea, it causes the application to lock up in random situations.



What version of the Firebird server are you using ??

What version of the .NNET provider are you using ??

What version of .NET are you using ??

Can you send a test case showing the problem ??

-- 
Carlos Guzmán Álvarez
Vigo-Spain

XMPP Client : http://code.google.com/p/xmppclient/
-
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider