开发者

How to debug AccessViolationException coming from native code

开发者 https://www.devze.com 2023-01-07 11:23 出处:网络
I\'m writing managed code, and I\'m using managed bindings (qt4dotnet) for开发者_Go百科 an unmanaged library (Qt). Now and then, I get an AccessViolationException coming somewhere from Qt, but I don\'

I'm writing managed code, and I'm using managed bindings (qt4dotnet) for开发者_Go百科 an unmanaged library (Qt). Now and then, I get an AccessViolationException coming somewhere from Qt, but I don't know how to debug that. I don't even get a stacktrace further than the managed/unmanaged boundary (meaning I don't know what part of Qt crashed on me).

By the way, I'm running my app inside the VS debugger.

How do I debug the exception?


Project + Properties, Debug tab, tick "Enable unmanaged code debugging". This still won't make it easy, but at least you can look at the unmanaged stack frames when it bombs. Make sure you've got the .pdb files for the Qt code.


only by inspecting parameters given to a function that calls native code.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号