Error after Obfuscation

.NET obfuscator and automated error reporting

Moderators: Luke Jefferson, melvyn.harbour, dom.smith

Error after Obfuscation

Postby winman » Fri Apr 26, 2013 11:41 am

I am using Smart Assembly 6 for obfuscating my vb.net application.In my code i do have line of a code as MSFG1.AddItem("") . After obfuscation when the exe file is opened it gives error as "Object reference not set to an instance of object" .If i use index in AddItem that is code will be MSFG1.AddItem("",0) will not give any error while running the exe crated and works fine. So my question is why does AddItem to AxMSFlexGrid without an index gives error after building exe in SmartAssembly?
winman
 
Posts: 6
Joined: Mon Apr 01, 2013 1:44 pm

Postby james.billings » Mon Apr 29, 2013 2:05 pm

Hi,

Without a code sample, it's hard to say. It might be because the empty string value is changing with the encoding but supplying the index changes the behaviour (you could try changing it to MSFG1.AddItem(string.empty) instead?)

Failing that, maybe try generating a debugging PDB with Smartassembly so you can step through and see what happens/what's null?
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.

Postby winman » Fri May 03, 2013 7:34 am

How can i troubleshoot by using check pdb files?
winman
 
Posts: 6
Joined: Mon Apr 01, 2013 1:44 pm

Postby james.billings » Fri May 03, 2013 7:49 am

You set the option to enable debugging information. See here. You can then run the application, attach to it from within VS and set breakpoints as you normally would do.
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.

Re:

Postby winman » Fri May 10, 2013 10:13 am

james.billings wrote:You set the option to enable debugging information. See here. You can then run the application, attach to it from within VS and set breakpoints as you normally would do.

Sorry i didn't get what you are trying to say.
Now i have exe which is obfuscated and .pdb file. But how can i read these or where should i set break point. I can set break point in VS and run the code for normal projects.But as you said where should i keep break points?And how to troubleshoot?
winman
 
Posts: 6
Joined: Mon Apr 01, 2013 1:44 pm

Postby james.billings » Fri May 10, 2013 10:16 am

You should be able to run your obfuscated application, then, in Visual Studio (with the solution open) attach to the running process. Once attached, you should be able to set breakpoints and step through the code as usual.
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.

Postby winman » Sat May 11, 2013 12:01 pm

But how can i attach the running application or exe file into a visual studio and set break points?
I have only used break points in my code and debug the code. I haven't used with the application itself.
So please provide more information on how it can be done?
winman
 
Posts: 6
Joined: Mon Apr 01, 2013 1:44 pm

Postby james.billings » Mon May 13, 2013 11:58 am

You simply open up your solution, but don't "debug" it. Instead, run your obfuscated application, then attach to it from within visual studio. The process is similar to debugging a windows service, as you cannot start these from within visual studio and need to use the same "attach" method - see here

(I should point out this is all nothing to do with Smartassembly, but simply how to debug a running process)
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.


Return to SmartAssembly 6

Who is online

Users browsing this forum: No registered users and 1 guest