none
AddInStore.Rebuild blocks RRS feed

  • Question

  • I am using System.Addin and the method

       AddInStore.Rebuild(string)

    That method ends up blocking - (not returning in multiple tests up to 12 hours.)

    This happens on two completely different computers, with two different sets of hardware but the same OS - XP.
    Removing components in the Addin tree eventually causes failures (exceptions) but nothing that I have been able to tie to the block.  The necessary host, etc addin dlls have been rebuilt multiple times with no problems.
    Removing the .store files has no impact.
    It blocks while running attached to the debugger in the IDE and when not attached.

    The code is surrounded by a try/catch which logs every exception and nothing is reported. And running in the IDE indicates that there is no uncaught exception as well.

    Via debugging the block is traced to the following (consistently)

    [In a sleep, wait, or join]
    mscorlib.dll!System.AppDomain.Unload(System.AppDomain domain) + 0x47 bytes
    System.AddIn.dll!System.AddIn.Hosting.Utils.UnloadAppDomain(System.AppDomain domain) + 0x20 bytes
    System.AddIn.dll!System.AddIn.Hosting.AddInStore.Discover(string assemblyFileName, System.AddIn.PipelineComponentType componentType = Contract, System.AddIn.Hosting.PipelineDeploymentState state = {System.AddIn.Hosting.PipelineDeploymentState}, string rootD...
    System.AddIn.dll!System.AddIn.Hosting.AddInStore.BuildPipelineCache(string rootDir = "...\\AddinRoot", System.Collections.ObjectModel.Collection<string> warnings = Count = Cannot evalu...
    System.AddIn.dll!System.AddIn.Hosting.AddInStore.RebuildImpl(string pipelineRootFolderPath = "...\\AddinRoot", bool demand) + 0x10a bytes
    System.AddIn.dll!System.AddIn.Hosting.AddInStore.Rebuild(string pipelineRootFolderPath) + 0xa bytes
    
    

    As noted in the above the block occurrs in AppDomain.Unload()

    Versions for the dlls above

    mscorlib.dll 2.0.50727.3603
    System.AddIn.dll 3.5.30729.1

    My main concern is that it blocks.  I wouldn't care if it threw an exception (of any sort.)


    Actual code call is as follows.

    String[] warnings;
    try
    {
      warnings = AddInStore.Rebuild(pipelineRoot);
    }
    catch(Exception e)
    {
      _logger.Error("MS AddInStore.Rebuild() Error", e);
      throw;
    }
    
    Tuesday, October 27, 2009 10:06 PM

All replies

  • Additional information.  When AddInStore.Rebuild() is called no Addins have been loaded previously.  In terms of this particular application this is the first time that any attempt has been made to do anything with Addins.

    So although System.AppDomain.Unload() is documented (implicitly) to suggest that it might block the question is what AppDomain is it attempting to unload?
    Friday, November 6, 2009 12:28 AM
  • Hello,

    has somebody Additional information to this bug?

    I have the same Problem on AddInStore.Update() with the same Stack Trace. But only when I run the Application as Windows Service. Then I Run the Application Stand Alone this Problem caused only then I Want to unload somme AddIns. Have somebody a Idea?

    Marc

    Tuesday, March 17, 2015 3:58 PM