none
Architecture Explorer and all modelling tools cause VS 2010 to crash RRS feed

  • Question

  • I'm trying to make some diagrams from some existing code and none of the bloody thing is working. 

     

    If I click View -> Architecture Explorer I get first "Object reference not set to an instance of an object" then if I try again I get "The DocumentSite on a WindowFrame may only be set once". Subsequent attempts alternate between these two messages.

     

    All attempts and configuration of "Generate Sequence Diagram" from source give me "Generation Failed. VS1728: Cannot generate a sequence diagram from the selected item."

    Is anyone familiar with this behavior? I see virtually nothing in researching regarding problems of this type. My server and visual studio claim to be fully patched. 

    Thursday, August 25, 2011 10:08 PM

Answers

  • Sounds pretty much broken, Bon. I'm sorry about that. I've never seen that one before, so I'd guess something's got pretty fouled up.

    Here's the remedies I'd attempt, in increasing order of exasperation:

    1. Create a new solution.
    2. Delete %LocalAppData%\Microsoft\VisualStudio and restart VS.
    3. Reinstall/repair.

     Hope you get it fixed.


    - Alan -MSFT
    Friday, August 26, 2011 5:35 PM

All replies

  • Hi Bon,

    I'm sorry to hear about your experience with these issues. Regarding the sequence diagram generation issue, can you review this troubleshooting tip in the topic How to: Explore Code with Sequence Diagrams to see if it applies to your scenario:

    "A sequence diagram might not generate if the System namespace is excluded, and the code contains a call to a COM method that accepts ref or out parameters and passes a parameter by using the new keyword. To avoid this issue, change the code, or when you generate the diagram, include the System namespace."

    If it doesn't, can you submit a bug at http://connect.microsoft.com with more specific details about what is happening in your code where you right-click to generate the sequence diagram?

    I will ask the product team about the first issue to see if it is familiar. If not, you might also need to submit a bug at http://connect.microsoft.com with more details about your system configuration.

    Thank you.

     

     

     


    Esther Fan | Visual Studio, Content Lead | If a post answers your question, please click "Mark As Answer" on that post and mark as Helpful. Thanks!

    Friday, August 26, 2011 4:41 PM
  • I'd already gone through the posted troubleshooting on the How To. When I get some time I'll file a bug report unless the product team has something to say.

     

    Thanks

    Friday, August 26, 2011 4:54 PM
  • Sounds pretty much broken, Bon. I'm sorry about that. I've never seen that one before, so I'd guess something's got pretty fouled up.

    Here's the remedies I'd attempt, in increasing order of exasperation:

    1. Create a new solution.
    2. Delete %LocalAppData%\Microsoft\VisualStudio and restart VS.
    3. Reinstall/repair.

     Hope you get it fixed.


    - Alan -MSFT
    Friday, August 26, 2011 5:35 PM
  • Thanks, in the meantime I just used reflection and #if DEBUG ...#endif to generate my own application behavior maps and saved the results to a database, feeding in all the different scenarios (not too pretty, but it gets the job done).

     

    I'll check this weekend probably if I can get this repaired with your suggestions since I would much rather use those tools.

     

    Thanks for your help.

    Friday, August 26, 2011 5:41 PM
  • Bon, could you also try from a VS command prompt "devenv /resetuserdata /setup".  What you are trying to do sounds similar to what our product is trying to do for you.  You could also try the Architecture menu, after loading your solution, use the "Generate Dependency Graph" commands, this video shows how: MSDN How Do I Series: How to Visualize Code using Standard Dependency Graphs

    PS: I would love to also get a stack trace from you if you can attach the VS debugger to another instance of VS, then turn on break on all exceptions, and turn off just my coe.  I can probably also use that stack trace to figure out how to fix your setup.  Can you also tell me a bit about how VS was installed, and whether it has ever been uninstalled and reinstalled and can you repro this on more than one box?

    Friday, August 26, 2011 6:14 PM
  • Hi Bon,

    Any luck with the suggested solutions?


    Esther Fan | Visual Studio, Content Lead | If a post answers your question, please click "Mark As Answer" on that post and mark as Helpful. Thanks!
    Wednesday, August 31, 2011 3:48 PM
  • Trying to get to it, you know deadlines. My hack solution was sufficient for my needs and I was more busy that weekend than I anticipated. I'll try to revisit this soon though. And I will report my findings and try to get a stack trace of the failure before I try the suggested fixes.

     

     

    Wednesday, August 31, 2011 6:46 PM
  • Deleting the Local App Data fixed the issue partially. It allows the Architecture view to open properly.

     

    I tried generating a sequence diagram for a method and it crashed. 

     

    Unhandled exception at 0x759db727 in devenv.exe: 0xE0434352: 0xe0434352

    Call stack location: KernelBase.dll!759db727()

     

    Note this is capitalized as it is in the exception. The second hex string has the 'e' capitalized where the other two hex strings are lowercase. Don't know if that is significant for your needs.

    I am assuming it shouldn't matter, but the only thing perhaps unique about Visual Studio for me is the fact I've installed the BizTalk 2010 SDK.

     

    After I restart Visual Studio after this crash and try to open Architecture view the same behavior returns until I delete the app data folder again.

    • Edited by Bon Franklin Tuesday, September 6, 2011 11:09 PM
    Tuesday, September 6, 2011 11:06 PM
  • Thanks for supplying the stack trace info for Chris and reporting back about Architecture Explorer, Bon!
    Esther Fan | Visual Studio, Content Lead | If a post answers your question, please click "Mark As Answer" on that post and mark as Helpful. Thanks!
    Tuesday, September 6, 2011 11:10 PM
  • Here is the full stack and inner exception. Looks like the inner exception is the culprit "The method or operation is not implemented"

    Outer Message

    Exception has been thrown by the target of an invocation.

    Outer stack

     

       at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
       at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       at System.Delegate.DynamicInvokeImpl(Object[] args)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.DispatcherOperation.InvokeImpl()
       at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Windows.Threading.DispatcherOperation.Invoke()
       at System.Windows.Threading.Dispatcher.ProcessQueue()
       at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)

     


    Inner Message

    The method or operation is not implemented.

    Inner Stack

     

       at EnvDTE.Project.get_ProjectItems()
       at Microsoft.VisualStudio.Progression.DTEWrapper.<GetRealProjectsFromSolution>d__c.MoveNext()
       at Microsoft.VisualStudio.Progression.SolutionProvider.VsSolutionProvider.GetAssemblyUriMap()
       at Microsoft.VisualStudio.Progression.SolutionProvider.VsSolutionProvider.GetProjectsProducingTheseAssemblies(ActionContext context)
       at Microsoft.VisualStudio.Progression.SolutionProvider.VsSolutionProvider.<>c__DisplayClass7.<FetchData>b__6(ActionContext c)

     

    --------------------------------------------------------------------

    Let me know if I can get more info.

     


    • Edited by Bon Franklin Tuesday, September 6, 2011 11:26 PM
    Tuesday, September 6, 2011 11:26 PM
  • Thanks for the details.  I checked the code and this ProjectItems call on DTE is not in a try/catch, so if you are using a project type we have not tested well then you could have found a new bug there.  Can you report the project types you are using in your solution.  I see you mentioned BizTalk, are you using a project flavor they provide? If so, it's possible their DTE implementation is incomplete and triggering this bug.  I see in our latest code we've added a try/catch here, so we must have hit this with some other project types - I recall it was the Setup project type...

    Wednesday, September 7, 2011 12:32 AM
  • The solution has these project types in it:

    BizTalk 2010 project (btproj)

    Oracle Database project (oradbproj) from ODP.Net Visual Studio Addon

    Class library and console projects (csproj)

     

    Let me know if there is anything else I can provide.

    Wednesday, September 7, 2011 5:18 AM
  • Thanks Bon, we will try those right away and see if we can repro the problems.  In the meantime you can probably avoid the null reference exceptions that you reported if you create a secondary solution containing only the C# code.

    Chris.

    Wednesday, September 7, 2011 5:52 AM