Click here to Skip to main content
15,888,121 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I get an error when calling a com object.
Somehow when i have optimize code disabled there seems to be a difference between debugging and just running the debug build.

When debugger is attached from startup it crashes with the AccessViolationException.
When debugger is attached after starting the app no error
Just starting the app No Error.

How can debugging from Visual studio 2010 make such a difference?
Posted
Comments
Sergey Alexandrovich Kryukov 7-Jun-11 14:19pm    
Nothing, nothing can be said without your code. With the unmanaged, it can happen by million reasons.
You either need to post a small sample of code (including unmanaged) which manifest the problem or realize that you're completely on your own. Any other ideas? I doubt it...
--SA

1 solution

Hope this[^] will give you an idea.
 
Share this answer
 
Comments
iceball12 7-Jun-11 10:44am    
Well i did understand what is causing it, as i am calling into unmanagement code.
However the question is why does it only happen when debugger is attached (from start of app , so from vs ) and when optimizer is disabled.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900