System.OverflowException:Arithmetic operation resulted in an overflow

System.OverflowException:Arithmetic operation resulted in an overflow

Postby zhuqijun » Wed 25 May 2016 02:30

Hello Support,
We are using DotConnect for Oracle 8.4.254 to access Oracle database.
We have a table which has 284 columns,we are using simple SQL to get data from the table:

Some code :
Code: Select all
OracleConnection con = new OracleConnection();
    con.ConnectionString = "user id=myuserid;password=mypassword;server=myserver;Unicode=true;connection timeout=30";
    OracleCommand cmd = new OracleCommand();
    cmd.Connection = con;
    cmd.CommandText = "select * from bigtable";
    con.Open();
    using (var reader = cmd.ExecuteReader())
    {
       while (reader.Read())
        {
           Console.WriteLine ( reader.GetValue(0));
        }
     }
    Console.WriteLine("testbigsource finish");
    con.Close();


Unfortunately, I get the below error:
System.OverflowException:Arithmetic operation resulted in an overflow.
at Devart.Data.Oracle.OracleDataReader.a()
at Devart.Data.Oracle.OracleDataReader.Read()
at DevartTest.Program.TestBigSource()
at DevartTest.Program.Main(String[] args)

Sometimes the error message is a little bit different:
System.OverflowException:Array dimensions exceeded supported range.

If I set command.FetchSize=100, the error does not happen
Or if I use DotConnect for Oracle 7.7.276, the error does not happen either.

Could you tell me why the error happen and how to solve it?
zhuqijun
 
Posts: 23
Joined: Fri 05 Jul 2013 06:56

Re: System.OverflowException:Arithmetic operation resulted in an overflow

Postby Pinturiccio » Wed 25 May 2016 12:12

zhuqijun wrote:We are using DotConnect for Oracle 8.4.254 to access Oracle database.
Or if I use DotConnect for Oracle 7.7.276, the error does not happen either.

Try using the latest version of dotConnect for Oracle. It can be downloaded at http://www.devart.com/dotconnect/oracle/download.html (trial version) or from
Registered Users' Area (for users with valid subscription only).

Is the issue reproduced with the latest version of dotConnect for Oracle? If it is reproduced, please post here or send us the DDL script of this table.
Pinturiccio
Devart Team
 
Posts: 1928
Joined: Wed 02 Nov 2011 09:44

Re: System.OverflowException:Arithmetic operation resulted in an overflow

Postby zhuqijun » Mon 30 May 2016 02:22

Hello Support,
I tried the trial version (9.0.17) and still face the exception.
I have send you the table dump in the https://www.devart.com/company/contactform.html
(If you did not get it, I can send to you by email, please provide me you email address)
zhuqijun
 
Posts: 23
Joined: Fri 05 Jul 2013 06:56

Re: System.OverflowException:Arithmetic operation resulted in an overflow

Postby Pinturiccio » Wed 01 Jun 2016 11:34

zhuqijun wrote:(If you did not get it, I can send to you by email, please provide me you email address)

We have not received your table dump. Please email it to support at devart dot com.

If your table dump have a size of several megabytes or more, you can upload your table dump to our ftp server ( ftp://ftp.devart.com/, credentials: anonymous/anonymous ) or to any file exchange server so that we could download it from there and use it for testing your example.
Pinturiccio
Devart Team
 
Posts: 1928
Joined: Wed 02 Nov 2011 09:44

Re: System.OverflowException:Arithmetic operation resulted in an overflow

Postby zhuqijun » Thu 02 Jun 2016 09:40

Hello,

I have sent you the database dump to the email address support at devart dot com with the title:dump for the post:System.OverflowException:Arithmetic operation resulted in an overflow

please restore the dump and use the code which I posted previously
zhuqijun
 
Posts: 23
Joined: Fri 05 Jul 2013 06:56

Re: System.OverflowException:Arithmetic operation resulted in an overflow

Postby zhuqijun » Mon 06 Jun 2016 01:53

Hello support,

Are you able to reproduce the exception with the code and the dump?
As this exception has occurred in our production, do you have any suggestion?
zhuqijun
 
Posts: 23
Joined: Fri 05 Jul 2013 06:56

Re: System.OverflowException:Arithmetic operation resulted in an overflow

Postby Shalex » Mon 06 Jun 2016 15:23

Assuming that I have copied your dump files
icscad_L3CACHE_XXX_6344.dpdmp
icscad_L3CACHE_XXX_6344.dpexp
to a default DATA_PUMP_DIR (...\orcl1120\dpdump\), how should I modify this command to recreate a "bigtable" table with test data in my current (SCOTT) schema?
Code: Select all
impdp scott/tiger@orcl1120 dumpfile=icscad_L3CACHE_XXX_6344.dpdmp directory=data_pump_dir
Shalex
Devart Team
 
Posts: 7530
Joined: Thu 14 Aug 2008 12:44

Re: System.OverflowException:Arithmetic operation resulted in an overflow

Postby ericliu » Tue 07 Jun 2016 03:30

Shalex wrote:Assuming that I have copied your dump files
icscad_L3CACHE_XXX_6344.dpdmp
icscad_L3CACHE_XXX_6344.dpexp
to a default DATA_PUMP_DIR (...\orcl1120\dpdump\), how should I modify this command to recreate a "bigtable" table with test data in my current (SCOTT) schema?
Code: Select all
impdp scott/tiger@orcl1120 dumpfile=icscad_L3CACHE_XXX_6344.dpdmp directory=data_pump_dir


Please try the command as follows:
impdp user/password@dbname directory=directory-name dumpfile=icscad_L3CACHE_XXX_6344.dpdmp logfile=icscad_L3CACHE_XXX_6344.log tables=L3CACHE_XXX_6344 remap_schema=L3CACHE_XXX_C:your-schema-name
Last edited by ericliu on Wed 08 Jun 2016 02:42, edited 1 time in total.
ericliu
 
Posts: 3
Joined: Fri 18 Sep 2015 03:24

Re: System.OverflowException:Arithmetic operation resulted in an overflow

Postby Shalex » Tue 07 Jun 2016 13:40

Thank you for the additional information. We have reproduced System.OutOfMemoryException with your code and the GATTG_WPSTAMM_6344 table restored from dump. It's possible that after we fix System.OutOfMemoryException, we will reproduce System.OverflowException as well.

Please specify:
1) the version and capacity (x86 or x64) of your Oracle Client
2) the version and capacity of your Oracle Server
Shalex
Devart Team
 
Posts: 7530
Joined: Thu 14 Aug 2008 12:44

Re: System.OverflowException:Arithmetic operation resulted in an overflow

Postby zhuqijun » Wed 08 Jun 2016 05:19

My Oracle client version: 11.1.0.1 (x64)
Oracle Server: 11g Enterprise edition release 11.2.0.4.0
zhuqijun
 
Posts: 23
Joined: Fri 05 Jul 2013 06:56

Re: System.OverflowException:Arithmetic operation resulted in an overflow

Postby Shalex » Wed 08 Jun 2016 07:44

We have reproduced System.OverflowException. We will notify you when the bug is fixed.
Shalex
Devart Team
 
Posts: 7530
Joined: Thu 14 Aug 2008 12:44

Re: System.OverflowException:Arithmetic operation resulted in an overflow

Postby AlanDThompson » Fri 17 Jun 2016 11:21

HI,

Has a fix been developed for this issue ? We are seeing a similar problem in or production environment.

Thanks,
Alan
AlanDThompson
 
Posts: 1
Joined: Fri 17 Jun 2016 11:19

Re: System.OverflowException:Arithmetic operation resulted in an overflow

Postby Shalex » Mon 20 Jun 2016 13:15

The issue is fixed. We will notify you when the corresponding build of dotConnect for Oracle is available for download.
Shalex
Devart Team
 
Posts: 7530
Joined: Thu 14 Aug 2008 12:44

Re: System.OverflowException:Arithmetic operation resulted in an overflow

Postby Shalex » Thu 23 Jun 2016 16:17

The new build of dotConnect for Oracle 9.1.45 is available for download now: http://forums.devart.com/viewtopic.php?f=1&t=33860.
Shalex
Devart Team
 
Posts: 7530
Joined: Thu 14 Aug 2008 12:44

Re: System.OverflowException:Arithmetic operation resulted in an overflow

Postby zhuqijun » Mon 04 Jul 2016 05:59

Hello,

I have tried the new build dotConnect for Oracle 9.1.45, it has solved the issue!

Could you provide any information on what is the root cause of the exception and how did solve the issue?
zhuqijun
 
Posts: 23
Joined: Fri 05 Jul 2013 06:56

Next

Return to dotConnect for Oracle