Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermittent exception on start for synthesis model check #58

Closed
fuzzyducky opened this issue Jul 20, 2017 · 3 comments
Closed

Intermittent exception on start for synthesis model check #58

fuzzyducky opened this issue Jul 20, 2017 · 3 comments

Comments

@fuzzyducky
Copy link

We sometimes get this exception on site load after app pool recycle but goes away on the 2nd request. Is this something you have seen before? I don't have a problem hitting the /Synthesis.aspx page.


Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 


[NullReferenceException: Object reference not set to an instance of an object.]
   Synthesis.Utility.TypeCollectionUtility.WithAttribute(IEnumerable`1 types) +80
   Synthesis.Synchronization.SynchronizationEngine.get_ModelDictionary() +77
   Synthesis.Synchronization.SynchronizationEngine.IsTemplateSynchronized(ITemplateInfo template) +38
   Synthesis.Synchronization.SynchronizationEngine.AreTemplatesSynchronized() +211
   Synthesis.<>c__DisplayClass1_0.<CheckSyncAll>b__0(IProviderConfiguration configuration, TemplateGenerationMetadata metadata) +30
   Synthesis.SynthesisHelper.ExecMetadataWithAutoFriending(IEnumerable`1 configurations, Action`2 processAction) +332
   Synthesis.SynthesisHelper.CheckSyncAll() +107
   Synthesis.Pipelines.Initialize.CheckModelSynchronization.DoLogSync() +32
   Synthesis.Pipelines.Initialize.CheckModelSynchronization.Process(PipelineArgs args) +87
   (Object , Object[] ) +56
   Sitecore.Pipelines.PipelineMethod.Invoke(Object[] parameters) +36
   Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +365
   Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists) +162
   Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) +18
   Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args) +18
   Sitecore.Pipelines.CorePipeline.Run(String pipelineName, PipelineArgs args) +49
   Sitecore.Nexus.Web.HttpModule.Application_Start() +156
   Sitecore.Nexus.Web.HttpModule.Init(HttpApplication app) +472
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +536
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296

[HttpException (0x80004005): Object reference not set to an instance of an object.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9963380
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254```
@kamsar
Copy link
Collaborator

kamsar commented Sep 11, 2017

Sounds like an issue dynamically loading a type. Since Synthesis defaults to scanning all assemblies for Synthesis types, it's probably some other assembly doing something weird that messes things up.

You can avoid this by whitelisting model assemblies to look in. From Synthesis.config:

<typeListProvider type="Synthesis.Configuration.ConfigurationTypeListProvider, Synthesis" />
				<!--<typeListProvider type="Synthesis.Configuration.ConfigurationTypeListProvider, Synthesis">
					<assemblies hint="list:AddAssembly">
						<web>SynthesisDemo.Web</web>
						Wildcards are also supported:
						<foo>MyProject.Sites.*</foo>
					</assemblies>
				</typeListProvider>-->

Sorry for the delay, my inbox sucks :(

@blipson89
Copy link
Owner

Hi @fuzzyducky,

Are you still experiencing this problem?

@fuzzyducky
Copy link
Author

I think I disabled the check on app start and haven't tried messing with it since.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants