Re: debug build crashes when calling managed code
The third party library defines something like the below. The class names
are of course prefixed with their macro to provide the necessary
__declspec(dllexport/import).
namespace TPNS {
class CDataHolder {
// ...
};
typedef vector<CDataHolder> CDataHolderContainer;
class CDataProvider {
// ...
void GetData(CDataHolderContainer& out);
};
}
In our code, we're doing something like the below.
void foo(TPNS::CDataProvider* prov) {
CDataHolderContainer dc;
prov->GetData(dc);
}
The prov->GetData(dc) is the line in the call stack with THIRDPARTYMETHOD.
Please let me know if you require additional details.
As I understand it, with Release mode, provided you build a .pdb file and
enable debug info you *should* be able to still debug. In my experience,
though, this isn't quite the case. Stepping through code is unreliable;
sometimes it works, sometimes the execution point clearly doesn't match the
source. Also, viewing variables while stepping through works sometimes,
othertimes it refuses to show the variable or shows garbage. This is why we
want to be able to run in debug mode.
"Charles Wang[MSFT]" <changliw@online.microsoft.com> wrote in message
news:51RtA1gYHHA.4088@TK2MSFTNGHUB02.phx.gbl...
Hi,
I agree with Dave Lowndes. In additional, it seemed that your call stack
was not intact. The callstack was all about system dlls, could you please
post more related call stack information regarding your THIRDPARTYMETHOD
for further research?
Also, I am little confused that you said that if you switched back to
Release mode, you would lose debugging functionality. You can also debug
your application even with Release mode which enables optimizations and
generates less (or no) extra debug data.
Look forward to your response. If you have any other questions or
concerns,
please feel free to let us know.
Best regards,
Charles Wang
Microsoft Online Community Support
=====================================================
Get notification to my posts through email? Please refer to:
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications
If you are using Outlook Express, please make sure you clear the check box
"Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
======================================================
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
======================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.
======================================================