locked
Power Productivity Tool's "Searchable Add Reference" dialog caused VS2010 to crash under certain circumstances RRS feed

  • Question

  • This is going to be a long post; please bear with it... ( I tried to add it under PPT's Q & A tab but it only allows 2000 characters)

    When clicking on "Add Reference" with Power Productivity Tool's "Searchable Add Reference" dialog enabled causes VS2010 to crash under certain circumstances

    Running Win7 Pro/x64 w/all current updates; VS2010 Pro w/current version of Productivity Power Tools
    (10.0.20626.18) amongst other extensions.

    I recently rebuilt my system. Before rebuilding I just had an admin level account and did everything
    out of this account as dangerous as this is. This time I decided to have multiple accounts setup.
    I have two accounts as a member of Administrators & Users (SUAdmin & PMBAdmin), one with just membership
    in Users (PMBottas). I now do most things out of the User account, as much as it is a pain to keep
    getting the dialog to provide an admin account credentials.

    Problem was first noticed while in the non-admin account and working on a old app the was created back
    before I rebuilt the system. Went to add a ref and VS crash.

    Created a new empty console app - same problem.

    Switched to PMBAdmin, created a new console app in this user's Projects folder and didn't get the crash.

    Switched back to PMBottas account and ran VS as an admin (using PMBAdmin creds-  which give me PMBAdmin's
    Projects folder even though I am logged into PMBottas - don't understand this behavior but that's
    a different question) opened the console app in PMBAdmin project folder,tried to add a ref and this time it did NOT crash.

    Switch to SUAdmin account, created a new console app and this one CRASHES VS2010. huh?
    Why does it work in one admin level account and not the other?

    hmmm maybe it's where I'm creating the app...

    As PMBAdmin, created a folder '\VSCommon' on the Data drive; in Properties->Security for the folder,
    added Users & Everyone, gave both groups 'Full Control'. This way I can be working with the same app
    no matter who I am logged in as.

    As PMBAdmin, created a new console app in the VSCommon folder. tried to add a ref, no crash

    From here on, as I switch accounts and then run VS as that user and then as Admin, all testing will
    be with the console app in the VSCommon folder

    LoggedInAs PMBottas, crash
    LoggedInAs PMBottas, run as admin under PMBAdmin, no crash.
    LoggedInAs SUAdmin,  crash (huh? -really don't get this one)
    LoggedInAs SUAdmin, as admin (no creds required being a member of Administrators) No Crash.

    Made PMBottas a member of Administrators.
    LoggedInAs PMBottas, crash (again, why does it work under one Admin level account (PMBAdmin) but no other)
    LoggedInAs PMBottas, run as admin (now no creds required being a member of Administrators) NO CRASH!?!?!

    created new user account TestUser.
    LoggedInAs TestUser, crash,
    LoggedInAs TestUser, as admin under PMBAdmin, no crash.
    LoggedInAs TestUser, as admin under SUAdmin no crash.
    LoggedInAs TestUser, as admin under PMBottas no crash.

    The specific error I get is taken from VS's "VS has encounter a problem and needs to close" dialog
    From the 'View Problem signature' window extension:
    Problem signature:
      Problem Event Name: CLR20r3
      Problem Signature 01: devenv.exe
      Problem Signature 02: 10.0.40219.1
      Problem Signature 03: 4d5f2a73
      Problem Signature 04: mscorlib
      Problem Signature 05: 4.0.0.0
      Problem Signature 06: 4ee9af8e
      Problem Signature 07: 22d
      Problem Signature 08: 10
      Problem Signature 09: System.Security.Security
      OS Version: 6.1.7601.2.1.0.256.48
      Locale ID: 1033

    Additional information about the problem:
      LCID: 1033

    Read our privacy statement online:
      http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

    If the online privacy statement is not available, please read our privacy statement offline:
      C:\Windows\system32\en-US\erofflps.txt

    If I then select "Debug the application" and "start an new instance of VS" I can get this for the actual exception info:
      EXCEPTION INFO

    System.Security.SecurityException was unhandled
      Message=Requested registry access is not allowed.
      Source=mscorlib
      StackTrace:
           at System.ThrowHelper.ThrowSecurityException(ExceptionResource resource)
           at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
           at Microsoft.Win32.RegistryKey.OpenSubKey(String name)
           at Microsoft.VSProjectPlus.TypeLibraryReferenceProvider.PopulateTypeLibraries(Object data)
           at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(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.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
           at System.Threading.ThreadPoolWorkQueue.Dispatch()
           at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
      InnerException:

    If in VS I go to Tools->Options->Power Productivity Tools->All Extensions and turn off the
    'Searchable Reference Dialog' I don't crash no matter who I am logged in under nor if I run as admin.

     
    WHAT IS GOING ON HERE?

    Any insight as to what is going on here (especially as to why it run directly (ie w/o 'Run as Admin') under PMBAdmin and not any other Administrators account) would be greatly appreciated.

    Thanks in advance - Paul

    Edit_1: Just had a thought... I'm fairly sure I installed VS while logged into as PMBAdmin






    • Edited by PMBottas Friday, May 25, 2012 11:27 PM typo
    Friday, May 25, 2012 2:24 AM

All replies

  • I too was getting an error when trying to add a new reference with the 'Productivity Power Tools', but the stack trace was different:

    System.NullReferenceException was unhandled
      Message=Object reference not set to an instance of an object.
      Source=Microsoft.VSProjectPlus.AddReference
      StackTrace:
           at Microsoft.VSProjectPlus.TypeLibraryReferenceProvider.PopulateTypeLibraries(Object data)
           at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(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.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
           at System.Threading.ThreadPoolWorkQueue.Dispatch()
           at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
      InnerException: 


    I disabled the 'Productivity Power Tools' extension, then restarted Visual Studio e re-enabled the extension and the 'Add Referece' dialog was back working.

    Running without Admin rights


    Alfred Myers http://alfredmyersjr.wordpress.com | http://twitter.com/AlfredMyers

    Tuesday, May 29, 2012 2:46 PM
  • @Alfred Myers - just tried it again - still the same bug!

    PMBottas

    Thursday, June 7, 2012 12:10 AM
  • Am experiencing the same problem.

    • Visual Studio 2010 + Productivity Power Tools
    • Right click "Add Reference" on class library
    • big boom! (see error below)
    • temporary fix: disabled Searchable Add Reference Dialogue (thanks PMBottas!)

    The error:

    System.Security.SecurityException was unhandled
      Message=Requested registry access is not allowed.
      Source=mscorlib
      StackTrace:
           at System.ThrowHelper.ThrowSecurityException(ExceptionResource resource)
           at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
           at Microsoft.Win32.RegistryKey.OpenSubKey(String name)
           at Microsoft.VSProjectPlus.TypeLibraryReferenceProvider.PopulateTypeLibraries(Object data)
           at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
           at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
           at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
           at System.Threading.ThreadPoolWorkQueue.Dispatch()
           at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
      InnerException: 




    Saturday, December 15, 2012 1:31 AM