question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Arithmetic operation resulted in an overflow" in Lzma.cs, Preventing "Confused" Application form Running

See original GitHub issue

A customer recently reported an issue with software that my team builds and maintains (and obfuscates using ConfuserEx 2) in which the application failed to start up as expected due to an overflow error thrown in “Lzma.cs” (Confuser.Runtime\Lzma.cs). Specifically, when the user tries to run our software either by manually running its executable or by running via scheduled task, the software is unable to start running as expected/crashes immediately and the following is printed to the console:

Unhandled Exception: System.TypeInitializationException: The type initializer for '<Module>' threw an exception. ---> System.OverflowException: Arithmetic operation resulted in an overflow.
    at ?????????????????????????????????(Byte[] ) in C:\projects\confuserex\Confuser.Runtime\Lzma.cs:line 42
    at .cctor()
    --- End of inner exception stack trace ---

My team isolated this issue to “confused” builds (and by association ConfuserEx), as a build that was built from the same source and not confused with ConfuserEx ran without issue in the customer’s environment. We believe that the environment meets or exceeds the documented requirements for ConfuserEx and we have over a hundred other organizations that use the same software and have not have not experienced this issue.

When researching this issue, my team found evidence of a similar (but slightly different) issue from the original ConfuserEx repository, but the issue was never officially resolved.

My team would like to continue to use ConfuserEx 2 to obfuscate our code and would appreciate any guidance that the maintainers may be able to provide to understand why this issue occurred and how we can prevent it in the future. Please let me know if there is any additional information that I can provide and I will follow up accordingly.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
darkroastcreativecommented, Jan 26, 2021

Hi, @mkaring, thank you for following up and apologies for the delay in response.

My team tested the new build against our local environment and didn’t observe any negative impact of the changes made, but we haven’t been able to test a build of our application confused with your new build in the environment where we initially observed the issue. Since the environment that spawned this issue is a customer’s production environment, we need approval from the customer to make any changes in this environment. As of right now, we are still pursuing approval to do this testing (specifically, we are waiting for the customer to respond to this request). I’m hoping that we will receive a response from the customer this week so we can test in the affected environment and have feedback to share with you.

0reactions
github-actions[bot]commented, Mar 13, 2021

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Arithmetic operation resulted in an overflow c# - ...
The error is caused by your code running in a 64 bit context and returning a pointer address that lies outside the range...
Read more >
System.TypeInitializationException on Mono · Issue #535
Heyho trying to run my obfuscated binaries on mono (windows or linux) gives me this exception: Unhandled Exception: System.
Read more >
Arithmetic operation resulted in an overflow - Help
It means that CInt argument is out of range of Integer, -0x80000000 to 0x7FFFFFFF And it happens when NetApiBufferFree returns an error: error ......
Read more >
Arithmetic operation resulted in an overflow - Only in ...
I have a simple Object read-only Property "Length " which gives me an Arithmetic operation that resulted in an overflow, the application runs...
Read more >
** Troubleshooting ** "Arithmetic operation resulted in an ...
If you click Quit, the application will close immediately. Arithmetic operation resulted in an overflow. ... Example #2 (Controller 10.4.0):.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found