Questions tagged [overflowexception]

The exception that is thrown when an arithmetic, casting, or conversion operation in a checked context results in an overflow.

78 questions
1
vote
0 answers

Application-initiated datatype overflow security vulnerabilities in SQL Server 2012

Short Description: Improper application validation passes invalid data into SQL update statements executed in SQL Server 2012, causing a server-side error which is not handled by the application. From a database security perspective, could this be…
1
vote
1 answer

Why do I get an OverflowException when using Graphics.ScaleTransform?

I have some drawing code for an editor I am working on. It draws a few lines and an image buffer. After adding a zoom features and calling ScaleTransform I get an OverflowException thrown in my paint method. Is something being scaled outside the…
Kristopher Ives
  • 5,838
  • 7
  • 42
  • 67
1
vote
1 answer

C# - What could cause overflow checking here?

I am accustomed to C# not performing overflow checks, as the language spec states (§7.5.12): For non-constant expressions (expressions that are evaluated at run-time) that are not enclosed by any checked or unchecked operators or statements, the…
Qwertie
  • 16,354
  • 20
  • 105
  • 148
1
vote
1 answer

Can I make sure that no exception happens on overflow integer miltiplication?

I am writing a code that do some arithmetic on long values and it should NOT generate an overflow exception. The code needs to be compiled both on windows (visual studio ) and Linux (ARM Linux). Is there any pragma or compile time directive that I…
mans
  • 17,104
  • 45
  • 172
  • 321
1
vote
1 answer

Out of memory and overflow exceptions creating small array

I am new to C# and XNA. Have just managed to write a class that generates a triangular grid. But there is one problem. I can get maximum 27 nodes length triangle. At 28 it throws Out of memory exception and at 31 -overFlow exception. I don't…
Kiaurutis
  • 827
  • 7
  • 10
0
votes
1 answer

Using NaN value in MSChart gives Overflow Exception

I'm working in a real time ploting appication with MSChart...I need to set some y values to NaN but I'm getting an overflow exception. Here is the part of the code where it happen: if (j_ecg < 2569) { for (int i = 0; i < 32; i++) { …
MPaltri
  • 1
  • 2
0
votes
1 answer

How to handle int and int64 when parsing json

I have a program that loops through json and grabs the values. This works find until it gets to an integer that is above what int32 handles. 2021-09-10 08:00:02.7576|ERROR|System.OverflowException: Value was either too large or too small for an…
rcmpayne
  • 163
  • 2
  • 15
0
votes
3 answers

how to handle the right overflowed

I created 3 three containers in row, it is working perfectly on emulator but when i run app on my andriod phone it is giving me right overflowed by 20 pixels error. i found the solution to wrap it in SingleChildScrollView but i don't want to scroll…
TimeToCode
  • 1,458
  • 3
  • 18
  • 60
0
votes
1 answer

Sending WM_KEYUP message to a window gives an OverflowException

I am trying to implement a program that sends the same messages to a window that would be sent if a certain key is continuously pressed. This is part of the code (entire Form1.cs code is here ) for the application: [DllImport("User32.dll")] …
Răzvan Flavius Panda
  • 21,730
  • 17
  • 111
  • 169
0
votes
2 answers

Does C# throw OverflowException for floating point numbers?

Does C# compiler throw OverflowException for floating-point numeric types? I tried this to figure it out: try { checked { double d = Convert.ToDouble(Math.Pow(double.MaxValue, double.MaxValue)); Console.WriteLine(d); …
Hossein Ebrahimi
  • 632
  • 10
  • 20
0
votes
1 answer

SQLiteDataReader OverflowException using SQLiteDataReader on decimal.MaxValue

Problem This is partially me being my own worst enemy. I have unit tests that verify my ability to write and then retrieve all different base data types to/from a SQLite database. Among my tests I verify several different values for each data type…
0
votes
1 answer

exp() overflow error python 3

I tried various solutions for below, but I still get the errors as described: log1p(1 + math.exp(comp * -1)) Error: OverflowError: math range error So I changed it to: log1p(1 + np.exp(comp * -1)) Now I get error : RuntimeWarning: overflow…
user3868051
  • 1,147
  • 2
  • 22
  • 43
0
votes
1 answer

Msg 8115 Arithmetic overflow error when I am trying to convert a balance amount

I need some help. I have created a view in sql 2012 that will take a persons id# and display an entry date and the balance that was entered on that date. I've tried to convert the balance and even tried increasing the entry date and balance amount…
awilso11
  • 5
  • 2
0
votes
1 answer

Having trouble getting a percentage in visual basic

I keep getting an error when it come to getting a percentage as a part of a program. The code is below as well as an image of the error pop up. Also yes yes I know I can some up some code line and less variables but at this point I was desperate so…
0
votes
1 answer

Jackson Serialize Circular References Stack overflow Error

I am trying to serialise my POJO which looks as follows using Jackson Object mapper, I get stack over flow exception, please help on this. Thanks in advance public class ServiceCategoryModel { private Integer svcCode; private String…