Up/Down arrows in controller select throws exception when no controller present
Issue #6638
resolved
- The version of LaunchBox you are using
Launchbox 12.6 - The version of Windows you are using
Windows 10 Education 21H2 - Build 19044.1466 - How often the issue occurs
Reproducible on demand (For me at least). - Steps to reproduce the issue if you are able to reproduce it
(I got an 8bitdo SN30 pro I wanted to use via BT)
1. I launched bigbox, controller didn’t work.
2. I go into the Options → Controllers,
3. I enable controllers. [X]
4. Then I Enabled All controllers. [X]
5. Then I went to select controllers in the third option, and no devices were shown, I click the up arrow and I got these error messages. - The complete error that shows up in LaunchBox, if there is one (with all error text)
(Below in codeblocks for your convenience)
Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
App: Big Box
Version: 12.6
Type: System.ArgumentOutOfRangeException
Site: Void ThrowArgumentOutOfRange_IndexException()
Source: System.Private.CoreLib
at System.Collections.Generic.List`1.get_Item(Int32 index)
at Unbroken.LaunchBox.Windows.BigBox.ViewModels.SelectOptionViewModel.OnUp(Boolean held, Boolean onlyUpPressed)
at Unbroken.LaunchBox.Windows.BigBox.ViewModels.MainViewModel.OnUp(Boolean onlyUpPressed)
at StatusResolver.FlushBroadcaster(Object , Boolean disposing, StatusResolver )
at Unbroken.LaunchBox.Windows.BigBox.ViewModels.MainViewModel.HandleKeyDown(KeyEventArgs e)
at ValCreator.FlushBroadcaster(Object , KeyEventArgs e, ValCreator )
at Unbroken.LaunchBox.Windows.BigBox.Views.MainView.CalcProperty(Object param, KeyEventArgs ord)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(MSG& msg, Boolean& handled)
at System.Windows.Interop.HwndSource.CriticalTranslateAccelerator(MSG& msg, ModifierKeys modifiers)
at System.Windows.Interop.HwndSource.OnPreprocessMessage(Object param)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
Recent Log:
1:15:07 PM Exception
Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
App: Big Box
Version: 12.6
Type: System.ArgumentOutOfRangeException
Site: Void ThrowArgumentOutOfRange_IndexException()
Source: System.Private.CoreLib
at System.Collections.Generic.List`1.get_Item(Int32 index)
at Unbroken.LaunchBox.Windows.BigBox.ViewModels.SelectOptionViewModel.OnUp(Boolean held, Boolean onlyUpPressed)
at Unbroken.LaunchBox.Windows.BigBox.ViewModels.MainViewModel.OnUp(Boolean onlyUpPressed)
at StatusResolver.FlushBroadcaster(Object , Boolean disposing, StatusResolver )
at Unbroken.LaunchBox.Windows.BigBox.ViewModels.MainViewModel.HandleKeyDown(KeyEventArgs e)
at ValCreator.FlushBroadcaster(Object , KeyEventArgs e, ValCreator )
at Unbroken.LaunchBox.Windows.BigBox.Views.MainView.CalcProperty(Object param, KeyEventArgs ord)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(MSG& msg, Boolean& handled)
at System.Windows.Interop.HwndKeyboardInputProvider.FilterMessage(IntPtr hwnd, WindowMessage message, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
Recent Log:
1:19:01 PM Exception
Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
App: Big Box
Version: 12.6
Type: System.ArgumentOutOfRangeException
Site: Void ThrowArgumentOutOfRange_IndexException()
Source: System.Private.CoreLib
at System.Collections.Generic.List`1.get_Item(Int32 index)
at Unbroken.LaunchBox.Windows.BigBox.ViewModels.SelectOptionViewModel.OnDown(Boolean held, Boolean onlyDownPressed)
at Unbroken.LaunchBox.Windows.BigBox.ViewModels.MainViewModel.OnDown(Boolean onlyDownPressed)
at StatusResolver.FlushBroadcaster(Object , Boolean disposing, StatusResolver )
at Unbroken.LaunchBox.Windows.BigBox.ViewModels.MainViewModel.HandleKeyDown(KeyEventArgs e)
at ValCreator.FlushBroadcaster(Object , KeyEventArgs e, ValCreator )
at Unbroken.LaunchBox.Windows.BigBox.Views.MainView.CalcProperty(Object param, KeyEventArgs ord)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(MSG& msg, Boolean& handled)
at System.Windows.Interop.HwndSource.CriticalTranslateAccelerator(MSG& msg, ModifierKeys modifiers)
at System.Windows.Interop.HwndSource.OnPreprocessMessage(Object param)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
Recent Log:
1:19:34 PM Exception
I think my computer isn’t seeing my 8bitdo controller as a joystick, but it sees my xbox one as one right now. So when I true the 8bitdo, bigbox has nowhere to iterate to when I hit up/down on the Device screen.
I have a feeling the resolution would be a minor change to the action handler condition (if there’s no controllers, then up/down will not increment/decrement the index), but I’m not 100% how you implemented it So I’ll leave it to the experts.
I moved the bug to “minor” because it’s not really blocking, but it is interrupting / unpleasant UX.
Thanks in advance.
Comments (2)
-
-
- changed status to resolved
- Log in to comment
Thanks for the report. This is fixed in beta and should be part of the next official release.