"Arithmetic operation resulted in an overflow" in Lzma.cs, Preventing "Confused" Application form Running
See original GitHub issueA 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:
- Created 3 years ago
- Comments:12 (7 by maintainers)
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.
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.