none
VS2015 crashes due to stackoverflow when regenerating designer files

    Question

  • I am trying to edit a aspx file in a webforms project (.net 4.6) in VS2015.1 Professional.

    When I make changes to server controls and click save - visual studio hangs for a second, crashes and windows reloads it. Afterwards I sometimes cannot reload the solution unless I delete the .vs directory that sits alongside the solution.

    I have tried with and without admin privileges and running vs in safe mode, and resetting windows and reinstalling vs.

    The event viewer records the following when VS crashes:

    Faulting application name: devenv.exe, version: 14.0.24720.0, time stamp: 0x564ea97e
    Faulting module name: clr.dll, version: 4.6.1038.0, time stamp: 0x5615c25a
    Exception code: 0xc00000fd
    Fault offset: 0x00002b80
    Faulting process ID: 0x258
    Faulting application start time: 0x01d13872d0585bdc
    Faulting application path: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe
    Faulting module path: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
    Report ID: e93180e9-0aba-4463-aeb5-8c0d98ca3685
    Faulting package full name: 
    Faulting package-relative application ID: 


    When I attach another instance of VS to debug my problem, I can see that:

    starting from Microsoft.VisualStudio.Web.Application.dll!Microsoft.VisualStudio.Web.Application.Generator.Microsoft.VisualStudio.Web.Application.IVsCodeBehindCodeGeneratorService.UpdateDesignerClass(string document, string codeBehind, string codeBehindFile, bool force, bool create)
    and culminating in an unhandled exception of type 'System.StackOverflowException' occurred in mscorlib.dll in WhereArrayIterator<TSource>.MoveNext()

    Has anyone seen anything like this before? What would be the next steps to diagnose the issue?

    I am currently trying to lodge an issue using my msdn support incidents, but I am waiting for my contract and access ids to be enabled (even though I have been a subscriber for 4 years+). 

    I have a memory dump here - https://drive.google.com/open?id=0B5Mynos9JgziLVZpMl9tMDRZbVE




    • Edited by wicksipedia Thursday, December 17, 2015 4:39 AM
    Thursday, December 17, 2015 4:06 AM

Answers

  • Hi wickspedia,

    Please add a new aspx page to make sure whether this problem occurs with this specific page or all pages in Visual Studio.

    If occurs with this specific project, please check the code in this page, make sure you do not have an infinite loop or infinite recursion. You can comment out the code line by line to troubleshoot which line causes this problem.

    If for all projects, please check the ActiveLog.xml under the path of %AppData%\Microsoft\VisualStudio\14.0. This file will log all operations when you operate Visual Studio.

    In addition, please try with following steps to troubleshoot this problem.

    1. Run Visual Studio as administrator.
    2. Close all third part software, such as antivirus.
    3. Run Visual Studio in safe mode with "Deven.exe /SafeMode" to prevents all third-party VSPackages from loading when Visual Studio starts, thus ensuring stable execution.
    4. Uncheck "Automatically adjust visual experience based on client performance", "Enable rich client visual experience" and "Use hardware graphics acceleration if available" option in Tools -> Options -> Environment tab.
    5. Repair your Visual Studio.

    Best Regards,
    Weiwei

    Friday, December 18, 2015 6:19 AM
    Moderator