I have runned LoadTest (Web) and from ~1500 request there are 4 errors:

[NullReferenceException: Object reference not set to an instance of an object.]
   Xtensive.Storage.Session.Persist(PersistReason reason) +363
   Xtensive.Storage.Session.CreateEnumerationContext() +21
   Xtensive.Storage.Rse.Providers.EnumerationScope.Open() +102
   Xtensive.Storage.Rse.<GetEnumerator>d__4.MoveNext() +123
   System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +148
   Xtensive.Core.<Batch>d__20`1.MoveNext() +841
   Xtensive.Core.<ApplyBeforeAndAfter>d__28`1.MoveNext() +213
   Xtensive.Storage.<ToTransactional>d__0`1.MoveNext() +460
   System.Linq.<SelectManyIterator>d__14`2.MoveNext() +578
   System.Linq.Enumerable.SingleOrDefault(IEnumerable`1 source) +299
   Xtensive.Core.<>c__DisplayClass13`5.<Bind>b__12(T2 arg2, T3 arg3, T4 arg4) +33
   Xtensive.Storage.Linq.QueryProvider.Execute(Expression expression) +229
   System.Linq.Queryable.SingleOrDefault(IQueryable`1 source, Expression`1 predicate) +580
   Werp.Controller.Services.DocumentDataObject`1.GetDocument(Guid documentId, Boolean create) +1185
   Werp.Controller.Services.DocumentDataObject`1.ExecuteOperation(DocumentOperation documentOperation, Guid[] documentIds, ParameterBase parameter) +1207
   Werp.Controller.Services.DocumentDataObject`1.ExecuteOperation(Guid operationId, Guid[] documentIds, ParameterBase parameter) +933
   Werp.View.Ext.GridButtons.Operation.ExecuteOperation(Guid operation, String entityName, Guid[] ids, Guid operationLogId, String targetCmp) +520
   lambda_method(Closure , Object , Object[] ) +374
   FastReflectionLib.MethodInvoker.Invoke(Object instance, Object[] parameters) +91
   FastReflectionLib.MethodInvoker.FastReflectionLib.IMethodInvoker.Invoke(Object instance, Object[] parameters) +70
   Werp.Utils.Helpers.ReflectionHelper.StaticCallMethod(Type type, String memberName, Object[] args) +207
   Werp.View.Ext.ButtonHandler.ExecuteMethod(MethodCallInfo callInfo) +278
   Werp.View.Ext.ButtonHandler.ProcessRequest(HttpContext context) +3736
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +597
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +266

[NullReferenceException: Object reference not set to an instance of an object.]
   Xtensive.Storage.Session.Persist(PersistReason reason) +363
   Xtensive.Storage.Session.CommitTransaction(Transaction transaction) +82
   Xtensive.Storage.Transaction.Commit() +271
   Xtensive.Storage.TransactionScope.Dispose() +93
   Werp.Controller.Services.DocumentDataObject`1.FinishOperation(Guid documentId, ParameterBase parameter) +3796
   Werp.Controller.Services.DocumentDataObject`1.FinishOperation(Guid documentId) +85
   Werp.View.Ext.FormButtons.EndOperationButton.EndOperation(String entityName, Guid id, String formId, String data, String buttonId, Guid operationLogId) +502
   lambda_method(Closure , Object , Object[] ) +448
   FastReflectionLib.MethodInvoker.Invoke(Object instance, Object[] parameters) +91
   FastReflectionLib.MethodInvoker.FastReflectionLib.IMethodInvoker.Invoke(Object instance, Object[] parameters) +70
   Werp.Utils.Helpers.ReflectionHelper.StaticCallMethod(Type type, String memberName, Object[] args) +207
   Werp.View.Ext.ButtonHandler.ExecuteMethod(MethodCallInfo callInfo) +278
   Werp.View.Ext.ButtonHandler.ProcessRequest(HttpContext context) +3736
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +597
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +266

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle._InvokeConstructor(IRuntimeMethodInfo method, Object[] args, SignatureStruct& signature, RuntimeType declaringType) +0
   System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +517
   Xtensive.Core.IoC.ServiceContainer.Create(Type containerType, Object configuration, IServiceContainer parent) +472
   Xtensive.Storage.Session..ctor(Domain domain, SessionConfiguration configuration, Boolean activate) +1022
   Xtensive.Storage.Domain.OpenSession(SessionConfiguration configuration, Boolean activate) +94
   Werp.Controller.Services.DynamicForm.GetParams(String entityName, Nullable`1 itemId, String data) +140
   Werp.View.Ext.FormButtons.RefreshButton.GetFieldValuesJson(String type, String formId, String itemId) +2053
   Werp.View.Ext.FormButtons.SaveButton.SaveItem(String data, String type, String formId, Boolean closeForm) +421
   lambda_method(Closure , Object , Object[] ) +234
   FastReflectionLib.MethodInvoker.Invoke(Object instance, Object[] parameters) +91
   FastReflectionLib.MethodInvoker.FastReflectionLib.IMethodInvoker.Invoke(Object instance, Object[] parameters) +70
   Werp.Utils.Helpers.ReflectionHelper.StaticCallMethod(Type type, String memberName, Object[] args) +207
   Werp.View.Ext.ButtonHandler.ExecuteMethod(MethodCallInfo callInfo) +278
   Werp.View.Ext.ButtonHandler.ProcessRequest(HttpContext context) +3736
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +597
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +266

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle._InvokeConstructor(IRuntimeMethodInfo method, Object[] args, SignatureStruct& signature, RuntimeType declaringType) +0
   System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +517
   Xtensive.Core.IoC.ServiceContainer.Create(Type containerType, Object configuration, IServiceContainer parent) +472
   Xtensive.Storage.Session..ctor(Domain domain, SessionConfiguration configuration, Boolean activate) +1022
   Xtensive.Storage.Domain.OpenSession(SessionConfiguration configuration, Boolean activate) +94
   Xtensive.Storage.Web.SessionManager.ProvideSession() +150
   Xtensive.Storage.Web.SessionManager.EnsureSessionIsProvided() +148
   Xtensive.Storage.Web.SessionManager.get_Session() +16
   Xtensive.Storage.Session.get_Current() +98
   Werp.Controller.Services.WerpSessionProvider.GetItemExclusive(HttpContext context, String id, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actions) +124
   System.Web.SessionState.SessionStateModule.GetSessionStateItem() +178
   System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +1076
   System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +115
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +371

Updated at 05.08.2010 6:08:09

  1. [NullReferenceException: Object reference not set to an instance of an object.] Xtensive.Storage.Session.Persist(PersistReason reason) in c:\Temp\DataObjects.Net\Xtensive.Storage\Xtensive.Storage\Session.Persist.cs:76 Xtensive.Storage.Session.CommitTransaction(Transaction transaction) in c:\Temp\DataObjects.Net\Xtensive.Storage\Xtensive.Storage\Session.Transactions.cs:128 Xtensive.Storage.Transaction.Commit() in c:\Temp\DataObjects.Net\Xtensive.Storage\Xtensive.Storage\Transaction.cs:179 Xtensive.Storage.TransactionScope.Dispose() in c:\Temp\DataObjects.Net\Xtensive.Storage\Xtensive.Storage\TransactionScope.cs:61 Werp.Controller.Services.DocumentDataObject1.StartOperation(DocumentOperation documentOperation, Guid documentId, ParameterBase parameter) +1440 Werp.Controller.Services.DocumentDataObject1.StartOperation(Guid operation, Guid documentId, ParameterBase parameter) +1150 Werp.Controller.Services.DocumentDataObject1.StartOperation(Guid operation, Guid documentId) +120 Werp.View.Ext.GridButtons.Open.CreateFormByOperation(String entityName, Nullable1 ownerId, Guid operationId, Guid itemId, Dictionary`2 nvc) +1167 lambda_method(Closure , Object , Object[] ) +426 FastReflectionLib.MethodInvoker.Invoke(Object instance, Object[] parameters) +91 FastReflectionLib.MethodInvoker.FastReflectionLib.IMethodInvoker.Invoke(Object instance, Object[] parameters) +70 Werp.Utils.Helpers.ReflectionHelper.StaticCallMethod(Type type, String memberName, Object[] args) +207 Werp.View.Ext.ButtonHandler.ExecuteMethod(MethodCallInfo callInfo) +278 Werp.View.Ext.ButtonHandler.ProcessRequest(HttpContext context) +3736 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +597 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +266

  2. I don't have any ISessionService, but I have two IModule, could it affect?


Updated at 09.08.2010 10:54:04

In some places I have used

Session.Open(Domain.Current) with Xtensive.Storage.Web.SessionManager (in web.config)

after removing Session.Open, I cannot reproduce first two exceptions. But in Xtensive.Core.IoC.ServiceContainer.Create sometimes occurs exceptions. (last two)

This thread was imported from our support forum. The original discussion may contain more detailed answer.

asked Aug 03 '10 at 07:55

pil0t's gravatar image

pil0t
207575763

edited Sep 03 '10 at 16:16

Alex%20Yakunin's gravatar image

Alex Yakunin
29714412


One Answer:

Concerning the first 2 errors: could you re-run the test with our binaries and .PDBs from "Bin (Diagnostics)" folder? In this case stack trace will contain line numbers.

Two second errors: most likely, you have some ISessionService type (in one of assemblies you register), that can't be instantiated by our IoC framework. Possible reasons: 1) It has a constructor, which arguments can't be resolved 2) [ServiceConstructor] attribute is placed on wrong constructor (see case 1) ).

It's absolutely clear that second case implies improvements in exception text at our side.


Most likely, both bugs are fixed:

  • Bug with ServiceContainer construction is fixed.

  • Bug with NullReferenceException inside Persist is, likely, fixed as well: the line in stack was doing pretty simple operation involving session.Services (ServiceContainer). If there was something wrong with its construction, this could affect here. Although actually I don't understand how you could get not fully initialized Session (it must be hard :) ). Anyway, now the code relying on service there is eliminated at all, so I don't see how any exception can appear @ the same line now.

answered Aug 04 '10 at 17:59

Alex%20Yakunin's gravatar image

Alex Yakunin
29714412

Yes, they're instantiated by IoC framework as well, so possible issue reasons are identical (problems with construction or dependency resolution).

(Aug 04 '10 at 17:59) Alex Yakunin Alex%20Yakunin's gravatar image

Forgot to add: what version do you use? I need this info to find the exact line leading to 1).

(Aug 04 '10 at 17:59) Alex Yakunin Alex%20Yakunin's gravatar image

DataObject 4.3.1 build 5680

(Aug 04 '10 at 17:59) pil0t pil0t's gravatar image
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

powered by OSQA