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

[Bug] Switching back and forth between pages is bound to trigger an abnormal exit bug #405

Open
1 task done
xuxiaokang0723 opened this issue Feb 11, 2025 · 0 comments
Open
1 task done

Comments

@xuxiaokang0723
Copy link

xuxiaokang0723 commented Feb 11, 2025

Check the following items

  • I have looked up relevant Issue

Description of the issue

After testing, it was found that switching back and forth between the navigation page of the main interface and the navigation page of the subpage would trigger the bug. The following is the error log:

Unhandled exception. System.ObjectDisposedException: The CancellationTokenSource has been disposed.
at System.Threading.CancellationTokenSource.Cancel()
at SukiUI.Controls.SukiTransitioningContentControl.PushContent(Object content) in D:\Demo\Avalonia\SukiUI-main\SukiUI\Controls\SukiTransitioningContentControl.axaml.cs:line 160
at SukiUI.Controls.SukiTransitioningContentControl.OnPropertyChanged(AvaloniaPropertyChangedEventArgs change) in D:\Demo\Avalonia\SukiUI-main\SukiUI\Controls\SukiTransitioningContentControl.axaml.cs:line 135
at Avalonia.Animation.Animatable.OnPropertyChangedCore(AvaloniaPropertyChangedEventArgs change)
at Avalonia.AvaloniaObject.RaisePropertyChanged[T](AvaloniaProperty1 property, Optional1 oldValue, BindingValue1 newValue, BindingPriority priority, Boolean isEffectiveValue) at Avalonia.PropertyStore.EffectiveValue1.NotifyValueChanged(ValueStore owner, StyledProperty1 property, T oldValue) at Avalonia.PropertyStore.EffectiveValue1.SetAndRaiseCore(ValueStore owner, StyledProperty1 property, T value, BindingPriority priority, Boolean isOverriddenCurrentValue, Boolean isCoercedDefaultValue) at Avalonia.PropertyStore.ValueStore.SetLocalValue[T](StyledProperty1 property, T value)
at Avalonia.PropertyStore.ValueStore.SetValue[T](StyledProperty1 property, T value, BindingPriority priority) at SukiUI.Controls.SukiTransitioningContentControl.set_Content(Object value) in D:\Demo\Avalonia\SukiUI-main\SukiUI\Controls\SukiTransitioningContentControl.axaml.cs:line 43 at SukiUI.Controls.SukiSideMenu.SetContentControlContent(Object newContent) in D:\Demo\Avalonia\SukiUI-main\SukiUI\Controls\SukiSideMenu.axaml.cs:line 222 at SukiUI.Controls.SukiSideMenu.OnPropertyChanged(AvaloniaPropertyChangedEventArgs change) in D:\Demo\Avalonia\SukiUI-main\SukiUI\Controls\SukiSideMenu.axaml.cs:line 195 at Avalonia.Animation.Animatable.OnPropertyChangedCore(AvaloniaPropertyChangedEventArgs change) at Avalonia.Controls.Primitives.SelectingItemsControl.OnSelectionModelPropertyChanged(Object sender, PropertyChangedEventArgs e) at Avalonia.Controls.Selection.SelectionModel1.CommitOperation(Operation operation, Boolean raisePropertyChanged)
at Avalonia.Controls.Selection.SelectionModelExtensions.BatchUpdateOperation.Dispose()
at Avalonia.Controls.Primitives.SelectingItemsControl.UpdateSelection(Int32 index, Boolean select, Boolean rangeModifier, Boolean toggleModifier, Boolean rightButton, Boolean fromFocus)
at Avalonia.Controls.Primitives.SelectingItemsControl.UpdateSelection(Control container, Boolean select, Boolean rangeModifier, Boolean toggleModifier, Boolean rightButton, Boolean fromFocus)
at Avalonia.Controls.Primitives.SelectingItemsControl.UpdateSelectionFromEventSource(Object eventSource, Boolean select, Boolean rangeModifier, Boolean toggleModifier, Boolean rightButton, Boolean fromFocus)
at SukiUI.Controls.SukiSideMenu.UpdateSelectionFromPointerEvent(Control source) in D:\Demo\Avalonia\SukiUI-main\SukiUI\Controls\SukiSideMenu.axaml.cs:line 229
at SukiUI.Controls.SukiSideMenuItem.OnPointerPressed(PointerPressedEventArgs e) in D:\Demo\Avalonia\SukiUI-main\SukiUI\Controls\SukiSideMenuItem.axaml.cs:line 97
at Avalonia.Reactive.LightweightObservableBase1.PublishNext(T value) at Avalonia.Interactivity.EventRoute.RaiseEventImpl(RoutedEventArgs e) at Avalonia.Interactivity.Interactive.RaiseEvent(RoutedEventArgs e) at Avalonia.Input.MouseDevice.MouseDown(IMouseDevice device, UInt64 timestamp, IInputElement root, Point p, PointerPointProperties properties, KeyModifiers inputModifiers, IInputElement hitTest) at Avalonia.Input.MouseDevice.ProcessRawEvent(RawPointerEventArgs e) at Avalonia.Threading.Dispatcher.Send(SendOrPostCallback action, Object arg, Nullable1 priority)
at Avalonia.Controls.TopLevel.HandleInput(RawInputEventArgs e)
at Avalonia.Win32.WindowImpl.AppWndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
at Avalonia.Win32.WindowImpl.WndProcMessageHandler(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
at Avalonia.Win32.Interop.UnmanagedMethods.DispatchMessage(MSG& lpmsg)
at Avalonia.Win32.Win32DispatcherImpl.RunLoop(CancellationToken cancellationToken)
at Avalonia.Threading.DispatcherFrame.Run(IControlledDispatcherImpl impl)
at Avalonia.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken)
at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.StartCore(String[] args)
at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args)
at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime(AppBuilder builder, String[] args, Action`1 lifetimeBuilder)
at SukiUI.Demo.Program.Main(String[] args) in D:\Demo\Avalonia\SukiUI-main\SukiUI.Demo\Program.cs:line 14

Package Version

6.0.0

Environment

windows11

Expected Behavior

none

Reproduction

none

Additional Information

none

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant