Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App crashes when there are no build warnings (alerts) #131

Closed
focustense opened this issue Oct 10, 2021 · 0 comments
Closed

App crashes when there are no build warnings (alerts) #131

focustense opened this issue Oct 10, 2021 · 0 comments
Labels
bug Something isn't working easynpc Issues/requests relating the EasyNPC app

Comments

@focustense
Copy link
Owner

See pastebin copy:

Exception Info: System.InvalidOperationException: Sequence contains no elements
  at System.Linq.ThrowHelper.ThrowNoElementsException()
  at System.Linq.Enumerable.Max[TSource,TResult](IEnumerable`1 source, Func`2 selector)
  at Focus.Apps.EasyNpc.Build.Preview.AlertsViewModel.GetErrorLevel()
  at Focus.Apps.EasyNpc.Build.Preview.AlertsViewModel.UpdateResults()
  at Focus.Apps.EasyNpc.Build.Preview.AlertsViewModel.<BeginWatching>b__36_1(BuildSettings settings)
  at System.Reactive.AnonymousSafeObserver`1.OnNext(T value)
  at System.Reactive.Sink`1.ForwardOnNext(TTarget value)
  at System.Reactive.HalfSerializer.ForwardOnNext[T](ISink`1 sink, T item, Int32& wip, Exception& error)
  at System.Reactive.Linq.ObservableImpl.TakeUntil`2._.OnNext(TSource value)
  at System.Reactive.Sink`1.ForwardOnNext(TTarget value)
  at System.Reactive.ObserveOnObserverLongRunning`1.Drain()
  at System.Reactive.ObserveOnObserverLongRunning`1.<>c.<.cctor>b__17_0(ObserveOnObserverLongRunning`1 self, ICancelable cancelable)
  at System.Reactive.Concurrency.NewThreadScheduler.<>c__DisplayClass7_0`1.<ScheduleLongRunning>b__0()
  at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
  at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- 
  at System.Threading.ThreadHelper.ThreadStart()  

Specifically, if there are no alerts then Max throws this exception.

Also, the nature of the crash (just shutting down with no error message) highlights that we might need to be a little more careful with NewThreadScheduler, as it's not marshalling exceptions to the UI thread.

@focustense focustense added bug Something isn't working easynpc Issues/requests relating the EasyNPC app labels Oct 10, 2021
focustense added a commit that referenced this issue Oct 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working easynpc Issues/requests relating the EasyNPC app
Projects
None yet
Development

No branches or pull requests

1 participant