microsoftarchive / iot-journey

a guidance project for implementing an IoT solution on Azure
Other
89 stars 34 forks source link

Simulator fails on disposed object #308

Closed hveiras closed 9 years ago

hveiras commented 9 years ago

Microsoft.Practices.IoTJourney.ScenarioSimulator.ConsoleHost

[1] Provision Devices [2] Run NoErrorsExpected [3] Run ThirtyDegreeReadings [4] Exit

Select an option: 2 executing Run NoErrorsExpected press q to signal termination EventId : 5, Level : Informational, Message : , Payload : [hostName : hveirasX1] [scenario : NoErrorsExpected] , EventName : SimulationStartedInfo, Timestamp : 2015-09-02T21:16:15.5502344Z, ProcessId : 10336, ThreadId : 4648

an exception occurred System.AggregateException: One or more errors occurred. ---> System.ObjectDispos edException: Cannot access a disposed object. at System.Reactive.Subjects.Subject1.Subscribe(IObserver1 observer) at System.ObservableExtensions.SubscribeSafe[T](IObservable1 source, IObserv er1 observer) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Reactive.PlatformServices.DefaultExceptionServices.Rethrow(Exceptio n exception) at System.Reactive.ExceptionHelpers.Throw(Exception exception) at System.Reactive.Stubs.<.cctor>b1(Exception ex) at System.Reactive.AnonymousSafeObserver1.OnError(Exception error) at System.Reactive.Linq.ObservableImpl.SumInt32._.OnError(Exception error) at System.ObservableExtensions.SubscribeSafe[T](IObservable1 source, IObserv er1 observer) at System.Reactive.Linq.ObservableImpl.SumInt32.Run(IObserver1 observer, IDi sposable cancel, Action1 setSink) at System.Reactive.Producer1.Run(IScheduler _, State x) at System.Reactive.Concurrency.ScheduledItem2.InvokeCore() at System.Reactive.Concurrency.ScheduledItem1.Invoke() at System.Reactive.Concurrency.CurrentThreadScheduler.Trampoline.Run(Schedule rQueue1 queue) at System.Reactive.Concurrency.CurrentThreadScheduler.Schedule[TState](TState state, TimeSpan dueTime, Func3 action) at System.Reactive.Concurrency.LocalScheduler.Schedule[TState](TState state, Func3 action) at System.Reactive.Producer1.SubscribeRaw(IObserver1 observer, Boolean enab leSafeguard) at System.Reactive.Producer1.Subscribe(IObserver1 observer) at System.ObservableExtensions.Subscribe[T](IObservable1 source, Action1 on Next) at Microsoft.Practices.IoTJourney.ScenarioSimulator.SimulationProfile.Observe ScenarioOuput(IObservable1 count) in d:\Dev\Repositories\mspnp\iot-journey-clon e\src\Simulator\ScenarioSimulator\SimulationProfile.cs:line 78 at Microsoft.Practices.IoTJourney.ScenarioSimulator.SimulationProfile.<RunSim ulationAsync>db.MoveNext() in d:\Dev\Repositories\mspnp\iot-journey-clone\src\ Simulator\ScenarioSimulator\SimulationProfile.cs:line 111 --- End of inner exception stack trace --- ---> (Inner Exception #0) System.ObjectDisposedException: Cannot access a dispos ed object. at System.Reactive.Subjects.Subject1.Subscribe(IObserver1 observer) at System.ObservableExtensions.SubscribeSafe[T](IObservable1 source, IObserv er1 observer) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Reactive.PlatformServices.DefaultExceptionServices.Rethrow(Exceptio n exception) at System.Reactive.ExceptionHelpers.Throw(Exception exception) at System.Reactive.Stubs.<.cctor>b1(Exception ex) at System.Reactive.AnonymousSafeObserver1.OnError(Exception error) at System.Reactive.Linq.ObservableImpl.SumInt32._.OnError(Exception error) at System.ObservableExtensions.SubscribeSafe[T](IObservable1 source, IObserv er1 observer) at System.Reactive.Linq.ObservableImpl.SumInt32.Run(IObserver1 observer, IDi sposable cancel, Action1 setSink) at System.Reactive.Producer1.Run(IScheduler _, State x) at System.Reactive.Concurrency.ScheduledItem2.InvokeCore() at System.Reactive.Concurrency.ScheduledItem1.Invoke() at System.Reactive.Concurrency.CurrentThreadScheduler.Trampoline.Run(Schedule rQueue1 queue) at System.Reactive.Concurrency.CurrentThreadScheduler.Schedule[TState](TState state, TimeSpan dueTime, Func3 action) at System.Reactive.Concurrency.LocalScheduler.Schedule[TState](TState state, Func3 action) at System.Reactive.Producer1.SubscribeRaw(IObserver1 observer, Boolean enab leSafeguard) at System.Reactive.Producer1.Subscribe(IObserver1 observer) at System.ObservableExtensions.Subscribe[T](IObservable1 source, Action1 on Next) at Microsoft.Practices.IoTJourney.ScenarioSimulator.SimulationProfile.Observe ScenarioOuput(IObservable1 count) in d:\Dev\Repositories\mspnp\iot-journey-clon e\src\Simulator\ScenarioSimulator\SimulationProfile.cs:line 78 at Microsoft.Practices.IoTJourney.ScenarioSimulator.SimulationProfile.<RunSim ulationAsync>db.MoveNext() in d:\Dev\Repositories\mspnp\iot-journey-clone\src\ Simulator\ScenarioSimulator\SimulationProfile.cs:line 111<---

press any key to return to the menu

bennage commented 9 years ago

Yeah, this was a bug I introduced. Sorry.