After update to VS 2022 17.8.5, from 17.0.6, I get Exception thrown at ntdll.dll immediately on debug

Dahl, Oskar 20 Reputation points

My project builds with normal warnings. I turned on Code Analysis on Build, but nothing improved the situation. After update to VS 2022 17.8.5, from 17.0.6, I get these errors when debugging or starting my project: Exception thrown at 0x00007FFE55B0E1E0 (ntdll.dll) in My_CLR.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF. On another computer, still at VS 2022 17.0.6 I have no problems. The application is a CLR application with .NET 4.7.2 and C++. Where to start fault tracing?

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,393 questions
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,438 questions
{count} votes

Accepted answer
  1. Minxin Yu 9,356 Reputation points Microsoft Vendor

    Hi, @Dahl, Oskar

    I am using v17.8.5.

    The program is caused by entry point. Remove the entry point and the program works well.

    User's image

    Best regards,

    Minxin Yu

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

3 additional answers

Sort by: Most helpful
  1. Dahl, Oskar 20 Reputation points

    User's image

    Here is a printscreen of how the crash looks. I will try to produce some kind of minimal sample, but it will take time. I just wish it was possible to install older visual studio products for cases like this.

    0 comments No comments

  2. Dahl, Oskar 20 Reputation points

    Issue seems to be same as: Thing is I don't use any external DLLs, just what is needed for CLR. If I switch Platform Toolset to V142, the issue goes away. I think it is very hard to even setup a CLR C++ application with .NET for GUI - but it is something that is needed.

  3. Dahl, Oskar 20 Reputation points

    Here is a minimal setup (Taken from the Visual Studio Example code) That does not work with VS2022, but works fine in VS2019