You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Random error while 'SELECT', PostgreSQL v17.11-3, Zebra MC3401, Android 14, Visual Studio 2022, C#, .Net9.0, Ngpsql 8.0.9, Npgsql 9.0.5, Npgsql 10.0.3 #6652
if I call the same SQL 10 times, 2 times it is executed OK and 8 times it is executed with a random error.
C# code from Android application:
System.Data.DataTable DT;
DT = new DataTable();
NpgsqlCommand pgCommand = new NpgsqlCommand( SQL, pgConnection );
NpgsqlDataAdapter pgDataAdapter = new NpgsqlDataAdapter( pgCommand );
try
{
// with the same query (same SQL) - this will cause a random error (see below) or execution without error
pgDataAdapter.Fill( DT );
}
catch (PostgresException PE)
{
...
}
catch (Exception E)
{
// random error
}
The query is executed after pressing a button in the application.
This is the result:
SELECT: OK
EXCEPTION: The read on this field has not consumed all of its bytes (pos: 2, len: 536870915)
SELECT: OK
EXCEPTION: Index and count must refer to a location within the buffer. (Parameter 'bytes')
EXCEPTION: The read on this field has not consumed all of its bytes (pos: 4, len: 131092)
EXCEPTION: The read on this field has not consumed all of its bytes (pos: 4, len: 1028)
EXCEPTION: The read on this field has not consumed all of its bytes (pos: 2, len: 2050)
EXCEPTION: Unable to translate bytes [B0] at index 3 from specified code page to Unicode.
EXCEPTION: Exception while reading form stream
EXCEPTION: The read on this field has not consumed all of its bytes (pos: 8, len: 2097160)
SELECT: OK
EXCEPTION: The read on this field has not consumed all of its bytes (pos: 8, len: 65544)
EXCEPTION: The read on this field has not consumed all of its bytes (pos: 4, len: 260)
EXCEPTION: Reading as 'System.Object' is not supported for fields having DataTypeName '-.-'
EXCEPTION: The read on this field has consumed all of its bytes and read into the subsequent bytes (pos: 4, len: -16843010)
SELECT: OK
FREEZE. (RESTART APPLICATION)
EXCEPTION ....
....
SAME APPLICATION ON ZEBRA MC3300, Android v8.1 WORKS WITHOUT ANY EXCEPTION.
'SELECT' WORKS FINE ON PSQL.
NO ERRORS IN POSTGRESQL LOG.
Activity