PC BSODs (DRIVER_OVERRAN_STACK_BUFFER) when using VS2022 to debug .NET Framework v4.8 C# class library application for AutoCAD 2023 x64

Govinda 1 Reputation point
2022-10-12T05:23:08.913+00:00

Various Details
OS: Windows 10 (20H2) x64
OS Locale: ja-JP
CPU: Intel(R) Core(TM) i5-8500 CPU @ 3.00GHz
AutoCAD Version: T.114.0.0 AutoCAD 2023.1 64bit
VS Version: Visual Studio Community 17.3.3 64bit
.NET Framework: v4.8.04084
Project Type: Class Library (.NET Framework)

I chose the 4.8 version of .NET based on the following information.
https://help.autodesk.com/view/ACD/2023/ENU/?guid=GUID-A6C680F2-DE2E-418A-A182-E4884073338A

I have tried so many methods to debug the code with AutoCAD running, to no avail:

  1. Attach it to an already running instance of acad.exe
  2. Set the start action to launch acad.exe with appropriate parameters
  3. Switched between x64 and Any CPU modes.

Every single time, it has led to the same BSOD (DRIVER_OVERRAN_STACK_BUFFER).

On the other hand, when I simply build the project and load the resulting DLL into ACAD, it works without any problems (except I just can't debug the program line-by-line).

PS: For VS2022 I could not find the "Debugger Type" as mentioned in the 3rd Method here:
https://www.keanw.com/2010/04/hitting-breakpoints-in-net-class-libraries-while-debugging-with-visual-studio-2010.html

I have developed similar apps for previous ACAD versions using older VS in past few years without any problems.
the only major change I can observe is that VS got the spanking new x64 treatment. Is that the root cause for this?

I would appreciate any help in dealing with this thing.

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,808 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,382 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
951 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Docs 15,151 Reputation points
    2022-10-14T03:40:51.043+00:00

    Please run the V2 log collector and post a share link into this thread using one drive, drop box, or google drive.

    https://www.tenforums.com/bsod-crashes-debugging/2198-bsod-posting-instructions.html

    https://www.elevenforum.com/t/bsod-posting-instructions.103/

    .
    .
    .
    .
    .

    Please remember to vote and to mark the replies as answers if they help.

    On the bottom of each post there is:

    Propose as answer = answered the question

    On the left side of each post there is /\ with a number: click = a helpful post
    .
    .
    .
    .
    .

    1 person found this answer helpful.

  2. Docs 15,151 Reputation points
    2022-10-17T05:09:14.787+00:00

    Open administrative command prompt and copy and paste:

    msdt.exe -id WindowsUpdateDiagnostic
    msdt.exe -id DeviceDiagnostic

    Click view detailed information.

    Post share links into this thread displaying images with results using one drive, drop box, or google drive.

    Windows Error Reporting (WER) was deleted.
    Please make sure that WER is not deleted by cleaning software during the troubleshooting.

    Make a new restore point:
    https://www.tenforums.com/tutorials/4571-create-system-restore-point-windows-10-a.html

    Search for C:\windows\memory.dmp > save to the downloads folder > zip > post a share link into this thread using one drive, drop box, or google drive

    .
    .
    .
    .
    .

    Please remember to vote and to mark the replies as answers if they help.

    On the bottom of each post there is:

    Propose as answer = answered the question

    On the left side of each post there is /\ with a number: click = a helpful post
    .
    .
    .
    .
    .


  3. Docs 15,151 Reputation points
    2022-10-18T04:40:08.733+00:00

    The images were not able to be read.

    The memory dump file was debugged.

    There were no new misbehaving drivers identified.

    vmmdrv.sys may be related to:

    Start Menu\Programs\VmManager Public:Start Menu\Programs\VmManager Public
    vmms.exe 利用不可 2136 8 利用不可 利用不可 2022/10/14 8:14 利用不可 利用不可 利用不可
    vmmsvc.exe 利用不可 4676 8 利用不可 利用不可 2022/10/14 8:14 利用不可 利用不可 利用不可
    Hyper-V Virtual Machine Management vmms 実行中 自動 独自プロセス c:\windows\system32\vmms.exe Normal LocalSystem 0
    vmmsvc vmmsvc 実行中 自動 独自プロセス c:\windows\vmmsvc.exe Normal LocalSystem 0

    https://learn.microsoft.com/en-us/system-center/vmm/?view=sc-vmm-2022
    https://learn.microsoft.com/en-us/system-center/vmm/overview?view=sc-vmm-2022
    https://techcommunity.microsoft.com/t5/system-center-blog/update-rollup-2-for-system-center-virtual-machine-manager-2019/ba-p/1562314
    https://learn.microsoft.com/en-us/system-center/vmm/system-requirements?source=recommendations&view=sc-vmm-2022
    https://learn.microsoft.com/en-us/system-center/vmm/install?source=recommendations&view=sc-vmm-2022
    https://learn.microsoft.com/en-us/system-center/vmm/plan-install?source=recommendations&view=sc-vmm-2022
    https://learn.microsoft.com/en-us/system-center/vmm/system-requirements?source=recommendations&view=sc-vmm-2022

    The problem(s) can be reported to Microsoft using the feedback hub:

    https://support.microsoft.com/en-us/windows/send-feedback-to-microsoft-with-the-feedback-hub-app-f59187f8-8739-22d6-ba93-f66612949332

    .
    .
    .
    .
    .

    Please remember to vote and to mark the replies as answers if they help.

    On the bottom of each post there is:

    Propose as answer = answered the question

    On the left side of each post there is /\ with a number: click = a helpful post
    .
    .
    .
    .
    .

    0 comments No comments