When VS2019 locks up, VS2017 is also hung

Joseph Stateson 46 Reputation points
2021-12-19T22:39:31.937+00:00

Windows 11, latest updates 64gb mem

Have new project that I am creating in VS2019 and have old project in VS2017 on a second monitor as I am copying and pasting code.

I closed at a small window "Peek Definition" and VS2019 locked up "Not Responding"
The last time this happened (hour ago) I had to reboot and lost a few lines of code that had not been saved.

I decided to close VS2017. When I attempted to close I was advised that 2019 was not responding and I was asked if I wanted to switch to 2019. Neither worked and eventually a "not responding" dialog box showed up and I was able to terminate 17 and later 19.

I was unaware that both apps 17 & 19 shared the same code. Is there any way I can bring up my old source code to browse through and not have the sharing problem? It does not need to execute, just want for reference. Is this the correct place to post this type of problem?

Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Karen Payne MVP 35,586 Reputation points Volunteer Moderator
    2021-12-20T00:34:22.913+00:00

    There are three reasons that come to mind

    • Virus protection is interfering
    • The offending code is not suitable for Windows 11
    • There is a visual studio extension not playing well

    VS2017 and VS2019 don't share code but what can happen is (assuming VS2019 was installed after VS2017) the debugger is defaulting to VS2019 and has nothing to do with code.

    Rather than having two different versions of Visual Studio open, install Visual Studio Code. Open the folder for the project in Windows Explorer, right click and select Open Folder with Visual Studio Code (see image below) to share code with Visual Studio.

    158833-figure1.png

    Perhaps you might share the code which is causing the crash but first try using Visual Studio Code to get at intended code.

    In regards to losing code, by default Visual Studio, any version out of the box when you run a project source code is saved. Even so you should be using version control e.g. create a GitHub account then learn how to create a repository for storing code.

    0 comments No comments

  2. Joseph Stateson 46 Reputation points
    2021-12-21T14:08:14.203+00:00

    Thanks, I will try that. I also updated my build of VS2019 as it was old (22 not out then)
    I was not running my old app or debugging it, just wanted to view the source code..
    I used visual studio 2017 because it could quickly find the classes and functions needed
    to support the parts I wanted to incorporate in the new project.
    I suspect a shared VS file ie: "DLL" was hung and that stopped me from closing VS2017
    as it used the same DLL. Just a guess.

    Another question: I recently re-built a project that I obtained from Berkeley "BOINC"
    and it was twice as big as the last version, built with VS2013. This is a C++ project.
    When I asked about the size they stated that VS2019 put in objects that used to be
    shared when built with VS2013. I was wondering if there is a setting for "static" or
    'dynamic" (if that is the term) where shared code is not forced into the build?

    I marked your answer as the solution. Thanks!


  3. Joseph Stateson 46 Reputation points
    2021-12-21T18:28:29.007+00:00

    Sorry, had to "unaccept". Should have tried Visual Studio Code first. All it did was open the solution in a viewer.

    I am back to the problem where the system hangs up but I discovered that the hang is simply the loss of "mouse click" in the display that was containing the VS2019 app being edited.
    This seems to be a real bug either VS2019 or Windows 11

    How I triggered the bug.
    Display 1 -> VS2019 editing a new app
    Display 2 -> VS2019 editing older app (not using vs2017 anymorel)

    I did an "add" and added form1.cs using file explorer from the older app folder
    The new app accepted the added form and it showed up with all widgets but the namespace was wrong so not all the classes got recognized.
    I did a rename with preview to rename the namespace on form1 to the new namespace.
    The preview went ok and I confirmed and immediately display1 froze. Nothing worked, not VS2019, not any of the widgets in the task bar. Fortunately the other display worked fine and I brought up the task manager. Unfortunately it popped up on Display1 where it was useless. then took a guess and pressed ALT ->SPACE ->M to select "move" and I was able to move the task manager from Display1 to Display2 using cursor and when the app got in the Display2 screen the mouse then worked correctly,.

    The mouse can move over Display1 but a click (on VS2019) causes "focus loss" for a better term. ie: I see a flicker or change in color but the object is in the background no matter what I try to do it (vs2019) does not respond. I then moved the mouse to Display2 and clicked on the icon for VS2019 which brings VS2019 in Display1 back into focus. I then tried ALT->SPAFE->M but VS2019 does not have a "move" dialog item when it is in full screen as it is grayed out. Suddenly (after 4 minutes of messing) Display1 got fixed and VS2019 was working as well as the mouse.

    I then went to the event viewer and found the following Application messages: "Windows Error Reporting" at the exact time that the system froze and 4 minutes later when it "woke up"

    The "wakeup" event is here and the "first" one is not much different

    Fault bucket 125730739576, type 5
    Event Name: PerfWatsonVS12Data
    Response: Not available
    Cab Id: 1715747959982384554

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.