Click here to Skip to main content
13,191,400 members (80,652 online)
Rate this:
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 1:48am
SAKryukov 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...

1 solution

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

Solution 1

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.171017.1 | Last Updated 7 Jun 2011
Copyright © CodeProject, 1999-2017
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