Exception running JustDecompile the first time

2 posts, 0 answers
  1. Peter
    Peter avatar
    3 posts
    Member since:
    Jan 2008

    Posted 27 Apr 2011 Link to this post

    I ran JustDecompile for the first time and got the following exception:
    ---------------------------
    Error
    ---------------------------
    An error has occurred. Please, report this exception to the Telerik team (Use CTRL + C to copy the text). Thanks in advance!



    Microsoft.Practices.Prism.Modularity.ModuleTypeLoadingException: Failed to load type for module HistoryModule.



    If this error occurred when using MEF in a Silverlight application, please ensure that the CopyLocal property of the reference to the MefExtensions assembly is set to true in the main application/shell and false in all other assemblies.



    Error was: An exception occurred while initializing module 'HistoryModule'.

        - The exception message was: An exception has occurred while trying to add a view to region 'ToolBarRegion'.

        - The most likely causing exception was was: 'System.ComponentModel.Composition.CompositionException: The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.



    1) The process cannot access the file 'C:\Users\c-peterri\AppData\Roaming\JustDecompile\Settings.xml' because it is being used by another process.



    Resulting in: The type initializer for 'JustDecompile.History.ViewModels.HistoryHelper' threw an exception.



    Resulting in: Set property 'System.Windows.Controls.Primitives.ButtonBase.Command' threw an exception.



    Resulting in: An exception occurred while trying to create an instance of type 'JustDecompile.History.Views.BackButtonView'.



    Resulting in: Cannot activate part 'JustDecompile.History.Views.BackButtonView'.

    Element: JustDecompile.History.Views.BackButtonView -->  JustDecompile.History.Views.BackButtonView -->  AssemblyCatalog (Assembly="JustDecompile.History, Version=2011.1.427.0, Culture=neutral, PublicKeyToken=null")



    Resulting in: Cannot get export 'JustDecompile.History.Views.BackButtonView (ContractName="JustDecompile.History.Views.BackButtonView")' from part 'JustDecompile.History.Views.BackButtonView'.

    Element: JustDecompile.History.Views.BackButtonView (ContractName="JustDecompile.History.Views.BackButtonView") -->  JustDecompile.History.Views.BackButtonView -->  AssemblyCatalog (Assembly="JustDecompile.History, Version=2011.1.427.0, Culture=neutral, PublicKeyToken=null")



       at System.ComponentModel.Composition.Hosting.CompositionServices.GetExportedValueFromComposedPart(ImportEngine engine, ComposablePart part, ExportDefinition definition)

       at System.ComponentModel.Composition.Hosting.CatalogExportProvider.CatalogExport.GetExportedValueCore()

       at System.ComponentModel.Composition.ExportServices.GetExportedValueFromLazy[T](Export export)

       at System.ComponentModel.Composition.ExportServices.<>c__DisplayClass10`2.<CreateSemiStronglyTypedExport>b__d()

       at System.Lazy`1.CreateValue()

       at System.Lazy`1.LazyInitValue()

       at Microsoft.Practices.Prism.MefExtensions.MefServiceLocatorAdapter.DoGetInstance(Type serviceType, String key)

       at Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key)'.

        But also check the InnerExceptions for more detail or call .GetRootException().

        - The Assembly that the module was trying to be loaded from was:JustDecompile.History, Version=2011.1.427.0, Culture=neutral, PublicKeyToken=null

        Check the InnerException property of the exception for more information. If the exception occurred while creating an object in a DI container, you can exception.GetRootException() to help locate the root cause of the problem.

      . ---> Microsoft.Practices.Prism.Modularity.ModuleInitializeException: An exception occurred while initializing module 'HistoryModule'.

        - The exception message was: An exception has occurred while trying to add a view to region 'ToolBarRegion'.

        - The most likely causing exception was was: 'System.ComponentModel.Composition.CompositionException: The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.



    1) The process cannot access the file 'C:\Users\c-peterri\AppData\Roaming\JustDecompile\Settings.xml' because it is being used by another process.



    Resulting in: The type initializer for 'JustDecompile.History.ViewModels.HistoryHelper' threw an exception.



    Resulting in: Set property 'System.Windows.Controls.Primitives.ButtonBase.Command' threw an exception.



    Resulting in: An exception occurred while trying to create an instance of type 'JustDecompile.History.Views.BackButtonView'.



    Resulting in: Cannot activate part 'JustDecompile.History.Views.BackButtonView'.

    Element: JustDecompile.History.Views.BackButtonView -->  JustDecompile.History.Views.BackButtonView -->  AssemblyCatalog (Assembly="JustDecompile.History, Version=2011.1.427.0, Culture=neutral, PublicKeyToken=null")



    Resulting in: Cannot get export 'JustDecompile.History.Views.BackButtonView (ContractName="JustDecompile.History.Views.BackButtonView")' from part 'JustDecompile.History.Views.BackButtonView'.

    Element: JustDecompile.History.Views.BackButtonView (ContractName="JustDecompile.History.Views.BackButtonView") -->  JustDecompile.History.Views.BackButtonView -->  AssemblyCatalog (Assembly="JustDecompile.History, Version=2011.1.427.0, Culture=neutral, PublicKeyToken=null")



       at System.ComponentModel.Composition.Hosting.CompositionServices.GetExportedValueFromComposedPart(ImportEngine engine, ComposablePart part, ExportDefinition definition)

       at System.ComponentModel.Composition.Hosting.CatalogExportProvider.CatalogExport.GetExportedValueCore()

       at System.ComponentModel.Composition.ExportServices.GetExportedValueFromLazy[T](Export export)

       at System.ComponentModel.Composition.ExportServices.<>c__DisplayClass10`2.<CreateSemiStronglyTypedExport>b__d()

       at System.Lazy`1.CreateValue()

       at System.Lazy`1.LazyInitValue()

       at Microsoft.Practices.Prism.MefExtensions.MefServiceLocatorAdapter.DoGetInstance(Type serviceType, String key)

       at Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key)'.

        But also check the InnerExceptions for more detail or call .GetRootException().

        - The Assembly that the module was trying to be loaded from was:JustDecompile.History, Version=2011.1.427.0, Culture=neutral, PublicKeyToken=null

        Check the InnerException property of the exception for more information. If the exception occurred while creating an object in a DI container, you can exception.GetRootException() to help locate the root cause of the problem.

       ---> Microsoft.Practices.Prism.Regions.ViewRegistrationException: An exception has occurred while trying to add a view to region 'ToolBarRegion'.

        - The most likely causing exception was was: 'System.ComponentModel.Composition.CompositionException: The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.



    1) The process cannot access the file 'C:\Users\c-peterri\AppData\Roaming\JustDecompile\Settings.xml' because it is being used by another process.



    Resulting in: The type initializer for 'JustDecompile.History.ViewModels.HistoryHelper' threw an exception.



    Resulting in: Set property 'System.Windows.Controls.Primitives.ButtonBase.Command' threw an exception.



    Resulting in: An exception occurred while trying to create an instance of type 'JustDecompile.History.Views.BackButtonView'.



    Resulting in: Cannot activate part 'JustDecompile.History.Views.BackButtonView'.

    Element: JustDecompile.History.Views.BackButtonView -->  JustDecompile.History.Views.BackButtonView -->  AssemblyCatalog (Assembly="JustDecompile.History, Version=2011.1.427.0, Culture=neutral, PublicKeyToken=null")



    Resulting in: Cannot get export 'JustDecompile.History.Views.BackButtonView (ContractName="JustDecompile.History.Views.BackButtonView")' from part 'JustDecompile.History.Views.BackButtonView'.

    Element: JustDecompile.History.Views.BackButtonView (ContractName="JustDecompile.History.Views.BackButtonView") -->  JustDecompile.History.Views.BackButtonView -->  AssemblyCatalog (Assembly="JustDecompile.History, Version=2011.1.427.0, Culture=neutral, PublicKeyToken=null")



       at System.ComponentModel.Composition.Hosting.CompositionServices.GetExportedValueFromComposedPart(ImportEngine engine, ComposablePart part, ExportDefinition definition)

       at System.ComponentModel.Composition.Hosting.CatalogExportProvider.CatalogExport.GetExportedValueCore()

       at System.ComponentModel.Composition.ExportServices.GetExportedValueFromLazy[T](Export export)

       at System.ComponentModel.Composition.ExportServices.<>c__DisplayClass10`2.<CreateSemiStronglyTypedExport>b__d()

       at System.Lazy`1.CreateValue()

       at System.Lazy`1.LazyInitValue()

       at Microsoft.Practices.Prism.MefExtensions.MefServiceLocatorAdapter.DoGetInstance(Type serviceType, String key)

       at Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key)'.

        But also check the InnerExceptions for more detail or call .GetRootException().  ---> Microsoft.Practices.ServiceLocation.ActivationException: Activation error occured while trying to get instance of type BackButtonView, key "" ---> System.ComponentModel.Composition.CompositionException: The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.



    1) The process cannot access the file 'C:\Users\c-peterri\AppData\Roaming\JustDecompile\Settings.xml' because it is being used by another process.



    Resulting in: The type initializer for 'JustDecompile.History.ViewModels.HistoryHelper' threw an exception.



    Resulting in: Set property 'System.Windows.Controls.Primitives.ButtonBase.Command' threw an exception.



    Resulting in: An exception occurred while trying to create an instance of type 'JustDecompile.History.Views.BackButtonView'.



    Resulting in: Cannot activate part 'JustDecompile.History.Views.BackButtonView'.

    Element: JustDecompile.History.Views.BackButtonView -->  JustDecompile.History.Views.BackButtonView -->  AssemblyCatalog (Assembly="JustDecompile.History, Version=2011.1.427.0, Culture=neutral, PublicKeyToken=null")



    Resulting in: Cannot get export 'JustDecompile.History.Views.BackButtonView (ContractName="JustDecompile.History.Views.BackButtonView")' from part 'JustDecompile.History.Views.BackButtonView'.

    Element: JustDecompile.History.Views.BackButtonView (ContractName="JustDecompile.History.Views.BackButtonView") -->  JustDecompile.History.Views.BackButtonView -->  AssemblyCatalog (Assembly="JustDecompile.History, Version=2011.1.427.0, Culture=neutral, PublicKeyToken=null")



       at System.ComponentModel.Composition.Hosting.CompositionServices.GetExportedValueFromComposedPart(ImportEngine engine, ComposablePart part, ExportDefinition definition)

       at System.ComponentModel.Composition.Hosting.CatalogExportProvider.CatalogExport.GetExportedValueCore()

       at System.ComponentModel.Composition.ExportServices.GetExportedValueFromLazy[T](Export export)

       at System.ComponentModel.Composition.ExportServices.<>c__DisplayClass10`2.<CreateSemiStronglyTypedExport>b__d()

       at System.Lazy`1.CreateValue()

       at System.Lazy`1.LazyInitValue()

       at Microsoft.Practices.Prism.MefExtensions.MefServiceLocatorAdapter.DoGetInstance(Type serviceType, String key)

       at Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key)

       --- End of inner exception stack trace ---

       at Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key)

       at Microsoft.Practices.Prism.Regions.Behaviors.AutoPopulateRegionBehavior.OnViewRegistered(Object sender, ViewRegisteredEventArgs e)

       --- End of inner exception stack trace ---

       at Microsoft.Practices.Prism.Regions.RegionViewRegistry.OnContentRegistered(ViewRegisteredEventArgs e)

       at JustDecompile.History.HistoryModule.Initialize() in c:\B\Behemoth\JustDecompile Production Build\Sources\UI\JustDecompile.History\HistoryModule.cs:line 27

       at Microsoft.Practices.Prism.Modularity.ModuleInitializer.Initialize(ModuleInfo moduleInfo)

       --- End of inner exception stack trace ---

       at Microsoft.Practices.Prism.Modularity.ModuleInitializer.HandleModuleInitializationError(ModuleInfo moduleInfo, String assemblyName, Exception exception)

       at Microsoft.Practices.Prism.Modularity.ModuleInitializer.Initialize(ModuleInfo moduleInfo)

       at Microsoft.Practices.Prism.Modularity.ModuleManager.InitializeModule(ModuleInfo moduleInfo)

       at Microsoft.Practices.Prism.Modularity.ModuleManager.LoadModulesThatAreReadyForLoad()

       at Microsoft.Practices.Prism.MefExtensions.Modularity.MefFileModuleTypeLoader.LoadModuleType(ModuleInfo moduleInfo)

       --- End of inner exception stack trace ---

       at Microsoft.Practices.Prism.Modularity.ModuleManager.HandleModuleTypeLoadingError(ModuleInfo moduleInfo, Exception exception)

       at Microsoft.Practices.Prism.MefExtensions.Modularity.MefFileModuleTypeLoader.LoadModuleType(ModuleInfo moduleInfo)

       at Microsoft.Practices.Prism.Modularity.ModuleManager.LoadModuleTypes(IEnumerable`1 moduleInfos)

       at Microsoft.Practices.Prism.MefExtensions.MefBootstrapper.Run(Boolean runWithDefaultConfiguration)

       at JustDecompile.App.OnStartup(StartupEventArgs e) in c:\B\Behemoth\JustDecompile Production Build\Sources\UI\JustDecompile\App.xaml.cs:line 16

       at System.Windows.Application.<.ctor>b__1(Object unused)

       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.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

       at System.Windows.Threading.DispatcherOperation.InvokeImpl()

       at System.Threading.ExecutionContext.runTryCode(Object userData)

       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)

       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.WrappedInvoke(Delegate callback, 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)

       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)

       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)

       at System.Windows.Application.RunInternal(Window window)

       at System.Windows.Application.Run()

       at JustDecompile.App.() in c:\B\Behemoth\JustDecompile Production Build\Sources\UI\JustDecompile\obj\Release\App.g.cs:line 16777215
    ---------------------------
    OK   
    ---------------------------
  2. Todd Anglin
    Todd Anglin avatar
    2040 posts
    Member since:
    Aug 2005

    Posted 27 Apr 2011 Link to this post

    Hello Peter-

    Thanks for trying JustDecompile and sharing your beta feedback. I have had a similar issue with earlier pre-Beta builds. Usually the problem was due to something else on my system trying to access the JustDecompile files. Make sure no other programs or services are trying to access the JD files (like maybe a virus scanner?) and give the tool another try.

    We'll definitely work on making this more robust as we work towards the official release this summer.

    For more background, JustDecompile uses the Microsoft Managed Extensibility Framework (MEF), and the various options you (should) see in the JustDecompile toolbar are all "extensions" loaded by MEF when JD starts. The "HistoryModule" is one of those extensions, and it provides the forward/back navigation in JD. This error pops-up when MEF has trouble locating and loading the module.

    For "fun," you can also disable any module you don't want/need by simply editing the JustDecompile config file (C:\Program Files (x86)\Telerik\JustDecompile\Libraries\JustDecompile.exe.config). For example, you could disable the HistoryModule like this:

    <modules>
       <module assemblyFile="JustDecompile.Navigation.dll" moduleType="JustDecompile.Navigation, JustDecompile.Navigation.NavigationModule" moduleName="NavigationModule" />
       <module assemblyFile="JustDecompile.CodeViewer.dll" moduleType="JustDecompile.CodeViewer, JustDecompile.CodeViewer.CodeViewerModule" moduleName="CodeViewerModule" startupLoaded="false" />
       <module assemblyFile="JustDecompile.SearchSymbols.dll" moduleType="JustDecompile.SearchSymbols, JustDecompile.SearchSymbols.SearchSymbolsModule" moduleName="SearchSymbolsModule" />
       <module assemblyFile="JustDecompile.SearchTypes.dll" moduleType="JustDecompile.SearchTypes, JustDecompile.SearchTypes.SearchTypesModule" moduleName="SearchTypesModule" />
       <module assemblyFile="JustDecompile.AssemblyLists.dll" moduleType="JustDecompile.AssemblyLists, JustDecompile.AssemblyLists.AssemblyListsModule" moduleName="AssemblyListsModule" />
       <module assemblyFile="JustDecompile.FindUsages.dll" moduleType="JustDecompile.FindUsages, JustDecompile.FindUsages.FindUsagesModule" moduleName="FindUsagesModule" />
       <module assemblyFile="JustDecompile.AutoUpdates.dll" moduleType="JustDecompile.AutoUpdates, JustDecompile.AutoUpdates.AutoUpdatesModule" moduleName="AutoUpdatesModule" />
       <module assemblyFile="JustDecompile.LoadAssemblyDialog.dll" moduleType="JustDecompile.LoadAssemblyDialog, JustDecompile.LoadAssemblyDialog.LoadAssemblyDialogModule" moduleName="LoadAssemblyDialogModule" />
       <!--Commenting out the following line "removes" the HistoryModule from JustDecompile-->
       <!--<module assemblyFile="JustDecompile.History.dll" moduleType="JustDecompile.History, JustDecompile.History.HistoryModule" moduleName="HistoryModule" />-->
    </modules>

    Hope that helps in the mean time.

    -Todd
  3. DevCraft banner
Back to Top