0

I recently encountered an exception when trying to set the license file for Aspose. My question isn't about the exception thrown, but rather, the format of the stack trace. The first two call stack locations have all of the names replaced with underscores.

System.NullReferenceException: Object reference not set to an instance of an object. at _ ._(Stream _) at _ ._(String _, Assembly _) at Aspose.Pdf.License.SetLicense(String licenseName)

What causes them to appear this way? My initial thought would be obfuscation, but when searching, the examples of obfuscated code I find use renamed methods and types, not completely removing the names.

Dave Simione
  • 1,441
  • 2
  • 21
  • 31
  • This is porbably caused by the fact that names of variables aren´t (neccessarily) transformed into the compiled assembly, in particular when compiling for release. – MakePeaceGreatAgain Oct 04 '17 at 11:46
  • Not a direct post to your question, but [this](https://stackoverflow.com/questions/43017481/how-to-read-interpret-a-raw-c-sharp-stack-trace-correctly) may give you some insight – boop_the_snoot Oct 04 '17 at 11:55
  • 1
    It is obfuscated code. That certainly isn't unusual with anything that does license checks. Seeing a product fail to work, even though you have a good license, and require a general web site for support is always a very good reason to stop using it. Life is too short. – Hans Passant Oct 05 '17 at 11:33
  • Aspose is a great set of libraries but they are obfuscated. Did you set your license as an embedded resource? (It nice to get better exceptions but unless your are perfect Hans sometimes poorly described exception and bugs make it out the door.) – Matthew Whited Oct 05 '17 at 11:44

1 Answers1

0

The Aspose library is definitely obfuscated through some means. Opening the library in dotPeek, all of the variables and properties are missing.

Example:

this. = value;

Not really a full answer, in that it doesn't explain what tool was used and how it actually handles the variable mapping, but enough to close.

Dave Simione
  • 1,441
  • 2
  • 21
  • 31