This project has moved and is read-only. For the latest updates, please go here.

Arithmetic operation resulted in an overflow

Topics: Help & Support
Jan 14, 2013 at 6:56 PM

Hi Artem,

I've found a strange behaviour while using your library.

If I compile the library in "Debug - Any CPU" everything is fine while validating the serial. If I compile the library in "Release - Any CPU" my application crashes while validating the key.

Below are some details about the crash:


System.OverflowException

Arithmetic operation resulted in an overflow.

at SKGL.methods.getEightByteHash(String s)
at SKGL.methods.twentyfiveByteHash(String s)
at SKGL.Validate.set_secretPhase(String value)
at myApp.Main.Main_Shown(Object sender, EventArgs e) in C:\Users\Username\Documents\Visual Studio 2010\Projects\myApp\myApp\Main.vb:line 85
at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()

The same occurs when I try to integrate the source code of the library into my application.

Any ideas on this?

Thanks,

Corpy

Jan 14, 2013 at 8:31 PM
Edited Jan 14, 2013 at 9:35 PM

Hi Corpy,

This error is thrown because Visual Basic has the overflow check on by default. If you integrate your app with the library, please follow these steps to deactivate this check.

  • My Project > Compile > Advanced Compile Options (located at the bottom of the tab) > Tick the Remove integer overflow checks box.

I hope this will work, but if it does not, please reply and I will recompile the library to remove this check.

Thank you for reporting!

/Artem

Jan 15, 2013 at 4:58 PM

Thank you Artem, you are my man - It simply works :D