Red Gate forums :: View topic - Error after Obfuscation
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SmartAssembly 6
SmartAssembly 6 forum

Error after Obfuscation

Search in SmartAssembly 6 forum
Post new topic   Reply to topic
Jump to:  
Author Message
winman



Joined: 01 Apr 2013
Posts: 6

PostPosted: Fri Apr 26, 2013 11:41 am    Post subject: Error after Obfuscation Reply with quote

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?
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1144
Location: My desk.

PostPosted: Mon Apr 29, 2013 2:05 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
winman



Joined: 01 Apr 2013
Posts: 6

PostPosted: Fri May 03, 2013 7:34 am    Post subject: Reply with quote

How can i troubleshoot by using check pdb files?
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1144
Location: My desk.

PostPosted: Fri May 03, 2013 7:49 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
winman



Joined: 01 Apr 2013
Posts: 6

PostPosted: Fri May 10, 2013 10:13 am    Post subject: Re: Reply with quote

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?
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1144
Location: My desk.

PostPosted: Fri May 10, 2013 10:16 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
winman



Joined: 01 Apr 2013
Posts: 6

PostPosted: Sat May 11, 2013 12:01 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1144
Location: My desk.

PostPosted: Mon May 13, 2013 11:58 am    Post subject: Reply with quote

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 [url=http://msdn.microsoft.com/en-us/library/7a50syb3(v=vs.80).aspx]here[/url]

(I should point out this is all nothing to do with Smartassembly, but simply how to debug a running process)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group