DNSCrypt / DNSCrypt/SimpleDnsCrypt

Simple DNSCrypt stop working randomly when the application is running in the background

Đang mở
#460 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
C#
Star
2.5k
Fork
249
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

The content of the error log
2019-11-23 22:27:38.4551 QueryLogViewModel System.Reflection.TargetInvocationException: An error occurred while dispatching a call to the UI Thread ---> System.InvalidOperationException: An ItemsControl is inconsistent with its items source.
See the inner exception for more information. ---> System.Exception: Information for developers (use Text Visualizer to read this):
This exception was thrown because the generator for control 'SimpleDnsCrypt.Controls.LoggingListView Items.Count:104' with name '(unnamed)' has received sequence of CollectionChanged events that do not agree with the current state of the Items collection. The following differences were detected:
Accumulated count 103 is different from actual count 104. [Accumulated count is (Count at last Reset + #Adds - #Removes since last Reset).]

One or more of the following sources may have raised the wrong events:
System.Windows.Controls.ItemContainerGenerator
System.Windows.Controls.ItemCollection
System.Windows.Data.ListCollectionView
System.Collections.ObjectModel.ObservableCollection`1[[SimpleDnsCrypt.Models.QueryLogLine, SimpleDnsCrypt, Version=0.7.0.0, Culture=neutral, PublicKeyToken=null]]
(The starred sources are considered more likely to be the cause of the problem.)

The most common causes are (a) changing the collection or its Count without raising a corresponding event, and (b) raising an event with an incorrect index or item parameter.

The exception's stack trace describes how the inconsistencies were detected, not how they occurred. To get a more timely exception, set the attached property 'PresentationTraceSources.TraceLevel' on the generator to value 'High' and rerun the scenario. One way to do this is to run a command similar to the following:
System.Diagnostics.PresentationTraceSources.SetTraceLevel(myItemsControl.ItemContainerGenerator, System.Diagnostics.PresentationTraceLevel.High)
from the Immediate window. This causes the detection logic to run after every CollectionChanged event, so it will slow down the application.

--- The end of the internal exception stack trace ---
System.Windows.Controls.ItemContainerGenerator.Verify()
System.Windows.Controls.VirtualizingStackPanel.MeasureChild(IItemContainerGenerator& generator, IContainItemStorage& itemStorageProvider, IContainItemStorage& parentItemStorageProvider, Object& parentItem, Boolean& hasUniformOrAverageContainerSizeBeenSet, Double& computedUniformOrAverageContainerSize, Double& computedUniformOrAverageContainerPixelSize, Boolean& computedAreContainersUniformlySized, Boolean& hasAnyContainerSpanChanged, IList& items, Object& item, IList& children, Int32& childIndex, Boolean& visualOrderChanged, Boolean& isHorizontal, Size& childConstraint, Rect& viewport, VirtualizationCacheLength& cacheSize, VirtualizationCacheLengthUnit& cacheUnit, Boolean& foundFirstItemInViewport, Double& firstItemInViewportOffset, Size& stackPixelSize, Size& stackPixelSizeInViewport, Size& stackPixelSizeInCacheBeforeViewport, Size& stackPixelSizeInCacheAfterViewport, Size& stackLogicalSize, Size& stackLogicalSizeInViewport, Size& stackLogicalSizeInCacheBeforeViewport, Size& stackLogicalSizeInCacheAfterViewport, Boolean& mustDisableVirtualization, Boolean isBeforeFirstItem, Boolean isAfterFirstItem, Boolean isAfterLastItem, Boolean skipActualMeasure, Boolean skipGeneration, Boolean& hasBringIntoViewContainerBeenMeasured, Boolean& hasVirtualizingChildren)
System.Windows.Controls.VirtualizingStackPanel.MeasureOverrideImpl(Size constraint, Nullable`1& lastPageSafeOffset, List`1& previouslyMeasuredOffsets, Nullable`1& lastPagePixelSize, Boolean remeasure)
System.Windows.Controls.VirtualizingStackPanel.MeasureOverride(Size constraint)
System.Windows.FrameworkElement.MeasureCore(Size availableSize)
System.Windows.UIElement.Measure(Size availableSize)
System.Windows.ContextLayoutManager.UpdateLayout()
System.Windows.Controls.ItemsControl.OnBringItemIntoView(ItemInfo info)
SimpleDnsCrypt.Controls.LoggingListView.AutoScroll_ItemsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
System.Windows.WeakEventManager.ListenerList`1.DeliverEvent(Object sender, EventArgs e, Type managerType)
System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
System.Windows.Data.ListCollectionView.ProcessCollectionChangedWithAdjustedIndex(NotifyCollectionChangedEventArgs args, Int32 adjustedOldIndex, Int32 adjustedNewIndex)
System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
SimpleDnsCrypt.ViewModels.QueryLogViewModel.<>c__DisplayClass8_0.b__0()
Caliburn.Micro.XamlPlatformProvider.<>c__DisplayClass8_1.b__0()
--- The end of the internal exception stack trace ---
Caliburn.Micro.XamlPlatformProvider.OnUIThread(Action action)
SimpleDnsCrypt.ViewModels.QueryLogViewModel.AddLogLine(QueryLogLine queryLogLine)
SimpleDnsCrypt.ViewModels.QueryLogViewModel.b__24_2()
System.Threading.Tasks.Task.Execute()
--- The end of the stack trace in the previous position where the exception was thrown ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
SimpleDnsCrypt.ViewModels.QueryLogViewModel.d__24.MoveNext()

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.