Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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 7-Jun-11 2:48am
Comments
SAKryukov at 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

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Hope this[^] will give you an idea.
  Permalink  
Comments
iceball12 at 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)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 575
1 Kornfeld Eliyahu Peter 409
2 Maciej Los 369
3 DamithSL 196
4 OriginalGriff 188
0 OriginalGriff 6,353
1 DamithSL 4,854
2 Maciej Los 4,476
3 Kornfeld Eliyahu Peter 4,058
4 Sergey Alexandrovich Kryukov 3,917


Advertise | Privacy | Mobile
Web02 | 2.8.141220.1 | Last Updated 7 Jun 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100