Selecting "Next Track" throws an exception #2

Open
opened 2026-01-30 21:22:46 +00:00 by claunia · 0 comments
Owner

Originally created by @mnadareski on GitHub (Jun 5, 2021).

Originally assigned to: @mnadareski on GitHub.

On an Aaruformat image of Aphex Twin's "Come to Daddy EP", the following error occurs when trying to play the first track and then move to the second track:

System.Collections.Generic.KeyNotFoundException: The given key '0' was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at RedBookPlayer.Player.set_CurrentIndex(UInt16 value) in B:\Programs\GitHub\RedBookPlayer\RedBookPlayer\Player.cs:line 86
   at RedBookPlayer.Player.set_CurrentTrack(Int32 value) in B:\Programs\GitHub\RedBookPlayer\RedBookPlayer\Player.cs:line 70
   at RedBookPlayer.Player.NextTrack() in B:\Programs\GitHub\RedBookPlayer\RedBookPlayer\Player.cs:line 392
   at RedBookPlayer.PlayerView.NextTrackButton_Click(Object sender, RoutedEventArgs e) in B:\Programs\GitHub\RedBookPlayer\RedBookPlayer\PlayerView.xaml.cs:line 97
   at Avalonia.Interactivity.Interactive.<AddHandler>g__InvokeAdapter|7_0[TEventArgs](Delegate baseHandler, Object sender, RoutedEventArgs args)
   at Avalonia.Interactivity.Interactive.RaiseEventImpl(RoutedEventArgs e)
   at Avalonia.Interactivity.Interactive.HierarchyTraverser`2.Traverse(IInteractive target)
   at Avalonia.Interactivity.Interactive.BubbleEvent(RoutedEventArgs e)
   at Avalonia.Interactivity.Interactive.RaiseEvent(RoutedEventArgs e)
   at Avalonia.Controls.Button.OnClick()
   at Avalonia.Controls.Button.OnPointerReleased(PointerReleasedEventArgs e)
   at Avalonia.Input.InputElement.<>c.<.cctor>b__25_9(InputElement x, PointerReleasedEventArgs e)
   at System.Reactive.AnonymousObserver`1.OnNextCore(T value) in D:\a\1\s\Rx.NET\Source\src\System.Reactive\AnonymousObserver.cs:line 67
   at System.Reactive.ObserverBase`1.OnNext(T value) in D:\a\1\s\Rx.NET\Source\src\System.Reactive\ObserverBase.cs:line 36
   at System.Reactive.Subjects.Subject`1.OnNext(T value) in D:\a\1\s\Rx.NET\Source\src\System.Reactive\Subjects\Subject.cs:line 148
   at Avalonia.Interactivity.Interactive.RaiseEventImpl(RoutedEventArgs e)
   at Avalonia.Interactivity.Interactive.HierarchyTraverser`2.Traverse(IInteractive target)
   at Avalonia.Interactivity.Interactive.HierarchyTraverser`2.Traverse(IInteractive target)
   at Avalonia.Interactivity.Interactive.HierarchyTraverser`2.Traverse(IInteractive target)
   at Avalonia.Interactivity.Interactive.BubbleEvent(RoutedEventArgs e)
   at Avalonia.Interactivity.Interactive.RaiseEvent(RoutedEventArgs e)
   at Avalonia.Input.MouseDevice.MouseUp(IMouseDevice device, UInt64 timestamp, IInputRoot root, Point p, PointerPointProperties props, KeyModifiers inputModifiers)
   at Avalonia.Input.MouseDevice.ProcessRawEvent(RawPointerEventArgs e)
   at Avalonia.Input.InputManager.ProcessInput(RawInputEventArgs e)
   at Avalonia.Win32.WindowImpl.WndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
   at Avalonia.Win32.Interop.UnmanagedMethods.DispatchMessage(MSG& lpmsg)
   at Avalonia.Win32.Win32Platform.RunLoop(CancellationToken cancellationToken)
   at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken)
   at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args)
   at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime[T](T builder, String[] args, ShutdownMode shutdownMode)
   at RedBookPlayer.Program.Main(String[] args) in B:\Programs\GitHub\RedBookPlayer\RedBookPlayer\Program.cs:line 14

When debugging the code, it seems like the currently selected index for the track is not being set properly. This issue is not present in the original release.

Originally created by @mnadareski on GitHub (Jun 5, 2021). Originally assigned to: @mnadareski on GitHub. On an Aaruformat image of Aphex Twin's "Come to Daddy EP", the following error occurs when trying to play the first track and then move to the second track: ``` System.Collections.Generic.KeyNotFoundException: The given key '0' was not present in the dictionary. at System.Collections.Generic.Dictionary`2.get_Item(TKey key) at RedBookPlayer.Player.set_CurrentIndex(UInt16 value) in B:\Programs\GitHub\RedBookPlayer\RedBookPlayer\Player.cs:line 86 at RedBookPlayer.Player.set_CurrentTrack(Int32 value) in B:\Programs\GitHub\RedBookPlayer\RedBookPlayer\Player.cs:line 70 at RedBookPlayer.Player.NextTrack() in B:\Programs\GitHub\RedBookPlayer\RedBookPlayer\Player.cs:line 392 at RedBookPlayer.PlayerView.NextTrackButton_Click(Object sender, RoutedEventArgs e) in B:\Programs\GitHub\RedBookPlayer\RedBookPlayer\PlayerView.xaml.cs:line 97 at Avalonia.Interactivity.Interactive.<AddHandler>g__InvokeAdapter|7_0[TEventArgs](Delegate baseHandler, Object sender, RoutedEventArgs args) at Avalonia.Interactivity.Interactive.RaiseEventImpl(RoutedEventArgs e) at Avalonia.Interactivity.Interactive.HierarchyTraverser`2.Traverse(IInteractive target) at Avalonia.Interactivity.Interactive.BubbleEvent(RoutedEventArgs e) at Avalonia.Interactivity.Interactive.RaiseEvent(RoutedEventArgs e) at Avalonia.Controls.Button.OnClick() at Avalonia.Controls.Button.OnPointerReleased(PointerReleasedEventArgs e) at Avalonia.Input.InputElement.<>c.<.cctor>b__25_9(InputElement x, PointerReleasedEventArgs e) at System.Reactive.AnonymousObserver`1.OnNextCore(T value) in D:\a\1\s\Rx.NET\Source\src\System.Reactive\AnonymousObserver.cs:line 67 at System.Reactive.ObserverBase`1.OnNext(T value) in D:\a\1\s\Rx.NET\Source\src\System.Reactive\ObserverBase.cs:line 36 at System.Reactive.Subjects.Subject`1.OnNext(T value) in D:\a\1\s\Rx.NET\Source\src\System.Reactive\Subjects\Subject.cs:line 148 at Avalonia.Interactivity.Interactive.RaiseEventImpl(RoutedEventArgs e) at Avalonia.Interactivity.Interactive.HierarchyTraverser`2.Traverse(IInteractive target) at Avalonia.Interactivity.Interactive.HierarchyTraverser`2.Traverse(IInteractive target) at Avalonia.Interactivity.Interactive.HierarchyTraverser`2.Traverse(IInteractive target) at Avalonia.Interactivity.Interactive.BubbleEvent(RoutedEventArgs e) at Avalonia.Interactivity.Interactive.RaiseEvent(RoutedEventArgs e) at Avalonia.Input.MouseDevice.MouseUp(IMouseDevice device, UInt64 timestamp, IInputRoot root, Point p, PointerPointProperties props, KeyModifiers inputModifiers) at Avalonia.Input.MouseDevice.ProcessRawEvent(RawPointerEventArgs e) at Avalonia.Input.InputManager.ProcessInput(RawInputEventArgs e) at Avalonia.Win32.WindowImpl.WndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam) at Avalonia.Win32.Interop.UnmanagedMethods.DispatchMessage(MSG& lpmsg) at Avalonia.Win32.Win32Platform.RunLoop(CancellationToken cancellationToken) at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken) at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args) at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime[T](T builder, String[] args, ShutdownMode shutdownMode) at RedBookPlayer.Program.Main(String[] args) in B:\Programs\GitHub\RedBookPlayer\RedBookPlayer\Program.cs:line 14 ``` When debugging the code, it seems like the currently selected index for the track is not being set properly. This issue is not present in the original release.
claunia added the bug label 2026-01-30 21:22:46 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: aaru-dps/RedBookPlayer#2