Strange behavior

Nov 15, 2011 at 9:15 AM

Hi Throb,

I have a strange behavior with Obtics in latest build (before too ?), how it's possible a collection after StandardPatch give not the same result ? Bad cache ?

Regs,
Vincent

Coordinator
Nov 15, 2011 at 2:08 PM

Hi Vincent,

Sorry, it is not clear to me what you mean. Could you be more specific?

Regs,

Thomas.

Nov 15, 2011 at 3:16 PM

Hi throb,

Thanks for your answser. In fact, i have a collection with entities, i do a Where clause with LINQ, it returns the good result, but with the Where clause from Obtics, it return an empty enumeration.

After analyzing the code of obtics, i find out that the result is empty after myCollection.Patched().

Have you got an idea about this issue ?

Regs,
Vincent

Coordinator
Nov 16, 2011 at 11:03 AM

Ok, my initial response is that this should not happen.

myCollection.Patched() returns an object. can you find out what the type is of that object?

Which exact version are you using? The stable release or a build from sourcecode?

Are you registering for change notifications?

Regs,

Thomas

Nov 17, 2011 at 10:21 AM

Hi Throb,

I have an other important bug :(

System.InvalidOperationException was unhandled by user code
  Message=Operation is not valid due to the current state of the object.
  StackTrace:
       at Obtics.Collections.ObservableEnumerable.<_SingleBase>b__73[TSource](Tuple`2 acc, TSource elt)
       at System.Linq.Enumerable.Aggregate[TSource,TAccumulate,TResult](IEnumerable`1 source, TAccumulate seed, Func`3 func, Func`2 resultSelector)
       at Obtics.Collections.Transformations.AccumulativeAggregate`3.GetValueDirect()
       at Obtics.Collections.Transformations.AggregateBase`2.InitializeBuffer()
       at Obtics.Values.Transformations.CachedTransformationBase`2.GetValueEvent()
       at Obtics.NCSourcedObjectToVP`2.get_Value()
       at Obtics.Values.Transformations.UnarySelectTransformation`2.GetValue()
       at Obtics.Values.Transformations.ConvertTransformationBase`2.GetValueEvent()
       at Obtics.NCSourcedObjectToVP`2.get_Value()
       at Obtics.Values.Transformations.CascadeTransformation`2.GetValueFromItm(IInternalValueProvider`1 itm)
       at Obtics.Values.Transformations.CascadingTransformationBase`3.GetValueEvent()
       at Obtics.NCSourcedObjectToVP`2.get_Value()
       at Obtics.Values.Transformations.CascadeTransformation`2.GetValueFromItm(IInternalValueProvider`1 itm)
       at Obtics.Values.Transformations.CascadingTransformationBase`3.GetValueEvent()
       at Obtics.NCSourcedObjectToVP`2.get_Value()
       at Obtics.Values.Transformations.PipelineResultTransformation`3.GetValue()
       at Obtics.Values.Transformations.ConvertTransformationBase`2.GetValueEvent()
       at Obtics.NCSourcedObjectToVP`2.get_Value()
       at Obtics.NCSourcedObjectToVP`2.Obtics.Values.IValueProvider.get_Value()
       at Obtics.NCToNPC.add_PropertyChanged(PropertyChangedEventHandler value)
       at Obtics.NCSourcedObjectToVP`2.add_PropertyChanged(PropertyChangedEventHandler value)
       at Arcan.Planning.Services.Obtics.CachedValueWithExceptionSendedProvider`1.set_Obsvervable(IValueProvider`1 value)
       at Arcan.Planning.Services.Obtics.CachedValueWithExceptionSendedProvider`1..ctor(Expression expression, IValueProvider`1 obsvFunc)
       at Arcan.Planning.Services.Obtics.ExpressionObserverExtensions.<>c__DisplayClass10`4.<CompileDirectObservable>b__b(P1 p1, P2 p2, P3 p3)
       at c0ding.Silverlight.Obtics.Carrousel.<>c__DisplayClass8`4.<Create>b__5(Tuple`3 t)
       at c0ding.Silverlight.Obtics.Carrousel.InternalCarrousel`2.Get(TKey key)
       at c0ding.Silverlight.Obtics.Carrousel.<>c__DisplayClass8`4.<Create>b__7(TK1 k1, TK2 k2, TK3 k3)
       at Arcan.Planning.Services.Obtics.ExpressionObserverExtensions.<>c__DisplayClass10`4.<CompileDirectObservable>b__f(P1 p1, P2 p2, P3 p3)
       at Arcan.Planning.Models.DynamicWorkDay.get_WorkDay()
       at Arcan.Planning.Models.DynamicWorkDay.get_WorkTimeSlots()
       at Arcan.Planning.ViewModels.Schedules.Cells.Async.AsyncEmployeeProjectedDayCellViewModel.InitProviders()
       at Arcan.Planning.ViewModels.Schedules.Cells.Async.EmployeeProjectedDayCellViewModel..ctor(Employee employee, DateTime day, IEnumerable`1 publicHolidays)
       at Arcan.Planning.ViewModels.Schedules.Cells.Async.AsyncEmployeeProjectedDayCellViewModel..ctor(Employee employee, DateTime day, IEnumerable`1 publicHolidays)
       at Arcan.Planning.ViewModels.Schedules.Cells.Async.AsyncEmployeeProjectedDayCellViewModel.<.cctor>b__0(Employee employee, DateTime date, IEnumerable`1 publicHolidays)
       at c0ding.Silverlight.Obtics.Carrousel.<>c__DisplayClass8`4.<Create>b__5(Tuple`3 t)
       at c0ding.Silverlight.Obtics.Carrousel.InternalCarrousel`2.Get(TKey key)
       at c0ding.Silverlight.Obtics.Carrousel.<>c__DisplayClass8`4.<Create>b__7(TK1 k1, TK2 k2, TK3 k3)
       at Arcan.Planning.ViewModels.Schedules.EmployeesSchedulesViewModel.GetOrCreateDayCellViewModel(Employee employee, DateTime dateTime)
       at Arcan.Planning.ViewModels.Schedules.EmployeesSchedulesViewModel.<>c__DisplayClass7.<GetItem>b__6(Object o)
       at Arcan.Planning.Infrastructure.LowProfileWorkQueue.WorkerThreadProc(Object unused)
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart(Object obj)
  InnerException:


 

get_WorkDay :

public IValueProvider<WorkDay> WorkDay { get { return this._workDay ?? (this._workDay = WorkDayProvider(this.Employee, this.Date, this.IsRealized)); } } 
 
WorkDayProvider:
private static readonly Func<Employee, DateTime, bool, IValueProvider<WorkDay>> WorkDayProvider = ExpressionObserverExtensions.CompileDirectObservable((Employee e, DateTime dt, bool r) => e.WorkDays == null ? null : e.WorkDays.SingleOrDefault(wd => wd != null && wd.Date == dt && wd.IsRealized == r));

 
WorkDays is a EntityCollection (WCF RIA Services) with 200-300 entities in my case.

Have you an idea ?
Thanks.
Vincent
Nov 17, 2011 at 10:31 AM

I use the build 61362, there are no stable version declared for Silverlight =(

Dec 7, 2011 at 8:29 PM

Hi Throb,

Have you an idea about my issue ?

Thanks

Vincent

Coordinator
Dec 8, 2011 at 10:58 PM

Hi Vincent,

Haven't found the time yet to find out what is going on.

I hope to have an answer for you soon,

Regs

Thomas.