Fatal error during Extension initialization

Topics: Troubleshooting
Nov 15, 2014 at 5:01 PM
I receive a fatal error (cannot enter /admin) suddenly on my test environment (local is running fine).

The cause seems to be in the ExtensionLoaderCoordinator class when it's loading the Orchard.MediaLibrary module, however the exception isn't handled properly thus crashing the site.

I have no idea how to fix this without altering the source.

Exception information:
Exception type: ApplicationException 
Exception message: Error during application initialization
at Orchard.WarmupStarter.Starter1.OnBeginRequest(HttpApplication application)

Object reference not set to an instance of an object.
at Orchard.Environment.Extensions.Loaders.PrecompiledExtensionLoader.<IsCompatibleWithModuleReferences>b__1e(ExtensionProbeEntry r)
at System.Linq.Enumerable.All[TSource](IEnumerable
1 source, Func2 predicate)
at Orchard.Environment.Extensions.Loaders.PrecompiledExtensionLoader._IsCompatibleWithModuleReferences_(ExtensionDescriptor extension, IEnumerable
1 references)
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable1 source, Func2 predicate)
at Orchard.Environment.Extensions.ExtensionLoaderCoordinator.ProcessExtension(ExtensionLoadingContext context, ExtensionDescriptor extension)
at Orchard.Environment.Extensions.ExtensionLoaderCoordinator.SetupExtensions()
at Orchard.Environment.DefaultOrchardHost.BuildCurrent()
at Orchard.Environment.DefaultOrchardHost.Orchard.Environment.IOrchardHost.Initialize()
at Orchard.Web.MvcApplication.HostInitialization(HttpApplication application)
at Orchard.WarmupStarter.Starter`1.<>c__DisplayClass3.<LaunchStartupThread>b__2(Object state)


This is the last log entry, if fails for VirtualPathDependencies.

2014-11-15 17:18:24,105 [46] Orchard.Environment.Extensions.ExtensionLoaderCoordinator - (null) - Loaders for extension "Orchard.MediaLibrary":
(null)
2014-11-15 17:18:24,105 [46] Orchard.Environment.Extensions.ExtensionLoaderCoordinator - (null) - Loader: PrecompiledExtensionLoader
(null)
2014-11-15 17:18:24,105 [46] Orchard.Environment.Extensions.ExtensionLoaderCoordinator - (null) - VirtualPath: ~/Modules/Orchard.MediaLibrary/bin/Orchard.MediaLibrary.dll
(null)
2014-11-15 17:18:24,105 [46] Orchard.Environment.Extensions.ExtensionLoaderCoordinator - (null) - VirtualPathDependencies:
Nov 15, 2014 at 6:11 PM
I upgraded from 1.8 to 1.8.1 and the problem disappeared. Probably some waste from development.