I cannot get my obfuscated application running on mono. Unobfuscated works on mono. When I use the .net framework on win7 it starts without issue in both variants.
This is the exception I get:
Unhandled Exception: System.TypeInitializationException: The type initializer for '<Module>' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object at .‮‮‎‫‎âªâ€â€‹â€ªâ€«âªâ¬â€Žâªâ¯â€«â‌​â€â¯â€â«â¯â¬â€â€â«â€Œâ€®ââ«â€â€ªâ€«â‬‫‪‪‮ () <0x40884310 + 0x00874> in :0 at ..cctor () <0x40884100 + 0x00017> in :0 --- End of inner exception stack trace --- at Vintagestory.Server.Program.Main (System.String[] args) <0x408814c0 + 0x002bb> in :0 [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for '' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object at .‮‮‎‫‎âªâ€â€‹â€ªâ€«âªâ¬â€Žâªâ¯â€«â‌​â€â¯â€â«â¯â¬â€â€â«â€Œâ€®ââ«â€â€ªâ€«â‬‫‪‪‮ () <0x40884310 + 0x00874> in :0 at ..cctor () <0x40884100 + 0x00017> in :0 --- End of inner exception stack trace --- at Vintagestory.Server.Program.Main (System.String[] args) <0x408814c0 + 0x002bb> in :0
The exception seems to happen at a point when it has to load additional code from an external library thats also obfuscated in the same process.
How can I even go about and debug/fix this?
Update: Seems to also happen on Windows Mono
Update2: Here is also a github issue entry of the bug with some more detail: https://github.com/yck1509/ConfuserEx/issues/535
I used the Maximum Obfuscation Level for a single C# Class that was not even used but part of an external library that was required, that seemed to be the problem.
When I reduce the obfuscation level down to "Aggressive" it works. Not ideal but will do for now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With