Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7082373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:02:42+00:00 2026-05-28T07:02:42+00:00

I am getting an access violation error in an unmanaged dll I am writing,

  • 0

I am getting an access violation error in an unmanaged dll I am writing, but when I try to debug It in a c# application it will only get the last frame of the call stack in Visual Studio’s debug window.

I have debug->exceptions->System.AccessViolationException set to break the debugger when it is thrown.

myunmanaged.dll!ViolatingFunc() Line 100 + 0xc bytes
- - - -
[external code] //myunmanaged.dll!function that I want to see
- - - -
somecsharp.exe!com.somewhere.Form1.CallFuncThatCallsViolator();

I was hoping to walk up the unmanaged stack to see where the data gets turned to garbeldegook.
Is this possible?

Answered
enter image description here

Enabling unmanaged debugging is step 1, but to get me all the way there I enabled microsoft symbols.

that made my stack trace look more like this:

myunmanaged.dll!ViolatingFunc() 
- - - -
myunmanaged.dll!SomeFunc2() 
- - - -
myunmanaged.dll!SomeFunc()
- - - -
[managed to unmanaged code transition]
- - - -
somecsharp.exe!com.somewhere.Form1.CallFuncThatCallsViolator();
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:02:43+00:00Added an answer on May 28, 2026 at 7:02 am

    Yes it is. You need to debug your application in ‘Mixed-mode’. Right click on the project, select the ‘Debug’ tab and check ‘Enable unmanaged code debugging’. You will see managed and native frames.

    mixed mode debugging

    Edit: As ChrisO mentions not having MS symbols can make native debugging weird. Add the following to your symbols path for Windows symbols: http://msdl.microsoft.com/download/symbols

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I get an access violation error in release mode, but not debug mode. The
I am getting Access violation error from the debugger, but I really have no
I'm getting an Access Violation in DBEXPSDA40.DLL (Dev Art MS SQL Server dbexpress driver)
I am getting an error: Message: SQLSTATE[42000]: Syntax error or access violation: 1064 You
Hi I am getting an access violation error..... What might be the problem in
what i'm writing is simple, well, it should be, but i'm getting this error
I am continuously getting an Access Violation Error with a all my kernels which
I'm getting a (to me) weird run-time access violation error. I have a class,
I am getting an 'Access to the path is denied error message when running
I am getting an 'access is denied' error when I attempt to delete a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.