Created
March 8, 2011 08:27
-
-
Save ToJans/860030 to your computer and use it in GitHub Desktop.
I get this YSOD from time to time in http://nerdbeers.apphb.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Server Error in '/' Application. | |
Object reference not set to an instance of an object. | |
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.] | |
Simple.Data.SimpleRecord.TryGetMember(GetMemberBinder binder, Object& result) in C:\Projecten\Org.NerdBeers\Dependencies\Simple.Data\Simple.Data\SimpleRecord.cs:48 | |
CallSite.Target(Closure , CallSite , Object ) +130 | |
Org.NerdBeers.Web.Services.Repository.GetBeerEventSubscribers(Int32 id) in d:\temp\rerb1bhw.i0j\input\src\Org.NerdBeers\Org.NerdBeers.Web\Services\Repository.cs:36 | |
Org.NerdBeers.Web.Modules.<>c__DisplayClass74.<.ctor>b__67(Object x) in d:\temp\rerb1bhw.i0j\input\src\Org.NerdBeers\Org.NerdBeers.Web\Modules\BeerEventModule.cs:26 | |
Nancy.Routing.Route.Invoke(DynamicDictionary parameters) in C:\Projecten\Nancy\Nancy\src\Nancy\Routing\Route.cs:29 | |
Nancy.NancyEngine.ResolveAndInvokeRoute(NancyContext context) in C:\Projecten\Nancy\Nancy\src\Nancy\NancyEngine.cs:119 | |
Nancy.NancyEngine.HandleRequest(Request request) in C:\Projecten\Nancy\Nancy\src\Nancy\NancyEngine.cs:85 | |
Nancy.Hosting.Aspnet.NancyHandler.ProcessRequest(HttpContextBase context) in C:\Projecten\Nancy\Nancy\src\Nancy.Hosting.Aspnet\NancyHandler.cs:19 | |
Nancy.Hosting.Aspnet.NancyHttpRequestHandler.ProcessRequest(HttpContext context) in C:\Projecten\Nancy\Nancy\src\Nancy.Hosting.Aspnet\NancyHttpRequestHandler.cs:76 | |
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100 | |
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75 |
Hi Tom.
Spent some time on this over lunch, was getting random tests not passing at random points, sometimes. I think I tracked the problem down to my BufferedEnumerable type and its blatant disregard for synchronization. I've added locking to it now, and run the tests several times with no fails. Could you try NB with a build from my latest master and see if the bug goes away? If so I'll push to NuGet as 0.5.2.
Thanks,
Mark
Hey Mark,
Thank you for the quick reaction; I'll try to do it ASAP...
Tom
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hehe, agreed. The repo was initially a singleton, but it was switched to per-request.
@grumpydev explained me the default convention for IOC: classes are per-request and interfaces are singletons.