1

Closed

ArgumentNullException

description

Hi Throb,
 
I tried to migrate the version I use Obtics hoping to have a performance gain for the last
changeset. I am facing a bug, here is the stacktrace:
 
at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source)
at Obtics.Collections.Patches.StandardPatchBase
2.<TakeSnapshot>b__0()
at Obtics.Collections.Transformations.XLazySnapshotEnumerator.TakeSnapshot[TType](Object transformation, VersionNumber contentVersion, Func1 generateEnumerable)
at Obtics.Collections.Patches.StandardPatchBase
2.TakeSnapshot()
at Obtics.Collections.Patches.StandardPatchBase2.GetEnumerator()
at Obtics.Collections.Transformations.NotifyVpcTransformation
2.InitializeBuffer(FlagsState& flags)
at Obtics.Collections.Transformations.OpaqueTransformationBase3.CallInitializeBuffer(FlagsState& flags)
at Obtics.Collections.Transformations.OpaqueTransformationBase
3.GetEnumeratorEvent()
at Obtics.NCSourcedObjectToVE2.GetEnumerator()
at Obtics.Collections.Transformations.FilterTransformationBase
3.InitializeBuffer(FlagsState& flags)
at Obtics.Collections.Transformations.OpaqueTransformationBase3.CallInitializeBuffer(FlagsState& flags)
at Obtics.Collections.Transformations.OpaqueTransformationBase
3.GetEnumeratorEvent()
at Obtics.NCSourcedObjectToVE2.GetEnumerator()
at Obtics.Collections.Transformations.ConvertTransformationBase
4.GetEnumerator()
at Obtics.Collections.Transformations.ConvertTransformationBase4.GetEnumeratorEvent()
at Obtics.NCSourcedObjectToVE
2.GetEnumerator()
at Obtics.NCSourcedObjectToVE2.System.Collections.Generic.IEnumerable<TOut>.GetEnumerator()
at System.Linq.Enumerable.Aggregate[TSource,TAccumulate,TResult](IEnumerable
1 source, TAccumulate seed, Func3 func, Func2 resultSelector)
at Obtics.Collections.Transformations.AccumulativeAggregate3.GetValueDirect()
at Obtics.Collections.Transformations.AggregateBase
2.InitializeBuffer()
at Obtics.Values.Transformations.CachedTransformationBase2.GetValueEvent()
at Obtics.NCSourcedObjectToVP
2.get_Value()
at Obtics.Values.Transformations.UnarySelectTransformation2.GetValue()
at Obtics.Values.Transformations.ConvertTransformationBase
2.GetValueEvent()
at Obtics.NCSourcedObjectToVP2.get_Value()
at Obtics.Values.Transformations.CascadeTransformation
2.GetValueFromItm(IInternalValueProvider1 itm)
at Obtics.Values.Transformations.CascadingTransformationBase
3.GetValueEvent()
at Obtics.NCSourcedObjectToVP2.get_Value()
at Obtics.Values.Transformations.CascadeTransformation
2.GetValueFromItm(IInternalValueProvider1 itm)
at Obtics.Values.Transformations.CascadingTransformationBase
3.GetValueEvent()
at Obtics.NCSourcedObjectToVP2.get_Value()
at Obtics.Values.Transformations.PipelineResultTransformation
3.GetValue()
at Obtics.Values.Transformations.ConvertTransformationBase2.GetValueEvent()
at Obtics.NCSourcedObjectToVP
2.get_Value()
at Arcan.Planning.ViewModels.DynamicWorkDay.get_Value()
at lambda_method(Closure , DynamicWorkDay )
at Obtics.Values.Transformations.PropertyTransformation2.PropertyClass.GetValue(TIn obj)
at Obtics.Values.Transformations.PropertyTransformation
2.GetValueFromItm(TIn itm)
at Obtics.Values.Transformations.CascadingTransformationBase3.GetValueEvent()
at Obtics.NCSourcedObjectToVP
2.get_Value()
at Obtics.Values.Transformations.UnarySelectTransformation2.GetValue()
at Obtics.Values.Transformations.ConvertTransformationBase
2.GetValueEvent()
at Obtics.NCSourcedObjectToVP2.get_Value()
at Obtics.Values.Transformations.UnarySelectTransformation
2.GetValue()
at Obtics.Values.Transformations.ConvertTransformationBase2.GetValueEvent()
at Obtics.NCSourcedObjectToVP
2.get_Value()
at Obtics.Values.Transformations.CascadeTransformation2.GetItmFromSource()
at Obtics.Values.Transformations.CascadingTransformationBase
3.GetValueEvent()
at Obtics.NCSourcedObjectToVP2.get_Value()
at Obtics.Values.Transformations.UnarySelectTransformation
2.GetValue()
at Obtics.Values.Transformations.ConvertTransformationBase2.GetValueEvent()
at Obtics.NCSourcedObjectToVP
2.get_Value()
at Obtics.Values.Transformations.CascadeTransformation2.GetItmFromSource()
at Obtics.Values.Transformations.CascadingTransformationBase
3.GetValueEvent()
at Obtics.NCSourcedObjectToVP2.get_Value()
at Obtics.Values.Transformations.PipelineResultTransformation
3.GetValue()
at Obtics.Values.Transformations.ConvertTransformationBase2.GetValueEvent()
at Obtics.NCSourcedObjectToVP
2.get_Value()
at Obtics.Values.Transformations.ExceptionTransformation2.GetValue()
at Obtics.Values.Transformations.ConvertTransformationBase
2.GetValueEvent()
at Obtics.NCSourcedObjectToVP`2.get_Value()
 
I think I'll go back to the old, when do you think that a new stable version will be available?
 
You use your assembly in your projects?
I'd like Microsoft to do a library like yours, because it should ask you a lot of work.
 
Best regards,
Vincent BOUZON
Closed Jul 30, 2011 at 11:12 PM by Throb

comments

Throb wrote Dec 24, 2010 at 10:36 AM

Yes, it does take a lot of work. So at the moment progress is quite slow. The new version will not do implicit null reference checks. This leads to a significant performance improvement but leaves checking for null references or catching exceptions to the developer. Also the new introduction of skiplists (form of binary trees) should lead to improvements when working with large collections.

Would be nice to work on this concept in a real team, like at Microsoft.

vbouzon wrote Jul 17, 2011 at 11:51 AM

Hi Throb,

I have again this issue =(

Obtics_Silverlight!Obtics.Collections.Patches.StandardPatchBase<System.ServiceModel.DomainServices.Client.EntityCollection<Arcan.Planning.Services.Web.Model.WorkDay>,Arcan.Planning.Services.Web.Model.WorkDay>.TakeSnapshot() Line 281
=> void TakeSnapshot()
    { XLazySnapshotEnumerator.TakeSnapshot<TOut>(this, _ContentVersion, () => SL.Enumerable.ToArray(_Buffer)); }
_Buffer is null, i don't know why...

I have the latest version and my Expression is :

private static readonly Func<Employee, DateTime, bool, IValueProvider<WorkDay>> WorkDayProvider =
ExpressionObserver.Compile((Employee e, DateTime dt, bool r) => e.WorkDays == null ? null : e.WorkDays.AsEnumerable().SingleOrDefault(wd => wd.Date == dt && wd.IsRealized == r));

I need your help.

Best regards,
Vincent

vbouzon wrote Jul 17, 2011 at 11:53 AM

Sorry my good expression is :
    private static readonly Func<Employee, DateTime, bool, IValueProvider<WorkDay>> WorkDayProvider = ExpressionObserver.Compile((Employee e, DateTime dt, bool r) => e.WorkDays == null ? null : e.WorkDays.SingleOrDefault(wd => wd.Date == dt && wd.IsRealized == r));
And "WorkDays" is a EntityCollection from WCF Ria Services, thanks.

Throb wrote Jul 25, 2011 at 6:26 PM

Hi Vincent,

What do you mean with 'latest version'? Latest source code or the latest 'official' release?

Regs,

Thomas

vbouzon wrote Jul 25, 2011 at 7:19 PM

Hi Throb,

I speak about "Latest source code". I do not use the latest version, because it not support SL4.

Vincent

wrote Jul 30, 2011 at 11:12 PM

Resolved with changeset 60992.

vbouzon wrote Jul 31, 2011 at 8:29 AM

Thanks !

wrote Feb 14, 2013 at 1:41 AM

wrote May 16, 2013 at 4:55 AM