Holdi601 / JoystickProfiler

Joystick Profiler Utility
HomePage
121 stars 13 forks source link

JoyPro crash when importing bindings #60

Closed Chaussette23 closed 12 months ago

Chaussette23 commented 12 months ago

Hello,

I use this wonderful tool since some years now, and I have a problem which looks quite new : I updated to latest release (91) by overwritting my JoyPro folder by the cone contained in the archive.

I use DCS openbeta and I'm up to date

If I launch JoyPro and check the log file, I get a lot of errors in clean profiles :

[22/09/23 17:21:28]:    Load default DCS: E:\Utilities\JoyPro\CleanProfile\DCS\A-10C II.cf
[22/09/23 17:21:28]:    Load default DCS: E:\Utilities\JoyPro\CleanProfile\DCS\A-10C II_easy.cf
[22/09/23 17:21:28]:    System.FormatException: Input string was not in a correct format.
   at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
   at System.Convert.ToDouble(String value, IFormatProvider provider)
   at JoyPro.LUADataRead.CreateAttributeDictFromLua(String cont) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\General\LUADataRead.cs:line 112
   at JoyPro.LUADataRead.CreateAttributeDictFromLua(String cont) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\General\LUADataRead.cs:line 105
   at JoyPro.LUADataRead.CreateAttributeDictFromLua(String cont) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\General\LUADataRead.cs:line 105
   at JoyPro.LUADataRead.CreateAttributeDictFromLua(String cont) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\General\LUADataRead.cs:line 105
   at JoyPro.LUADataRead.CreateAttributeDictFromLua(String cont) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\General\LUADataRead.cs:line 105
   at JoyPro.LUADataRead.CreateAttributeDictFromLua(String cont) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\General\LUADataRead.cs:line 105
   at JoyPro.LUADataRead.CreateAttributeDictFromLua(String cont) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\General\LUADataRead.cs:line 105
   at JoyPro.DCSLuaInput.AnalyzeRawLuaInput(String content, DCSExportPlane refMod) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\DataStructures\DCS\DCSLuaInput.cs:line 333
   at JoyPro.DCSIOLogic.LoadCleanLuasDCS() in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\DataStructures\DCS\DCSIOLogic.cs:line 258
[22/09/23 17:21:28]:    Input string was not in a correct format.
[22/09/23 17:21:28]:    mscorlib
[22/09/23 17:21:28]:       at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
   at System.Convert.ToDouble(String value, IFormatProvider provider)
   at JoyPro.LUADataRead.CreateAttributeDictFromLua(String cont) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\General\LUADataRead.cs:line 112
   at JoyPro.LUADataRead.CreateAttributeDictFromLua(String cont) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\General\LUADataRead.cs:line 105
   at JoyPro.LUADataRead.CreateAttributeDictFromLua(String cont) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\General\LUADataRead.cs:line 105
   at JoyPro.LUADataRead.CreateAttributeDictFromLua(String cont) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\General\LUADataRead.cs:line 105
   at JoyPro.LUADataRead.CreateAttributeDictFromLua(String cont) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\General\LUADataRead.cs:line 105
   at JoyPro.LUADataRead.CreateAttributeDictFromLua(String cont) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\General\LUADataRead.cs:line 105
   at JoyPro.LUADataRead.CreateAttributeDictFromLua(String cont) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\General\LUADataRead.cs:line 105
   at JoyPro.DCSLuaInput.AnalyzeRawLuaInput(String content, DCSExportPlane refMod) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\DataStructures\DCS\DCSLuaInput.cs:line 333
   at JoyPro.DCSIOLogic.LoadCleanLuasDCS() in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\DataStructures\DCS\DCSIOLogic.cs:line 258
[22/09/23 17:21:28]:    Load default DCS: E:\Utilities\JoyPro\CleanProfile\DCS\A-10C.cf
[22/09/23 17:21:28]:    Load default DCS: E:\Utilities\JoyPro\CleanProfile\DCS\A-10C_easy.cf
[22/09/23 17:21:28]:    System.FormatException: Input string was not in a correct format.
[.... same data for some other profiles, like all "easy" profiles and also P47 and Mirage F1 at least ...]
[22/09/23 17:21:28]:    Clean Joy Data loaded

But after this, JoyPro is loaded and I enter in its GUI where everything is empty (which is normal, as usual).

Then, I go into "import bindings", I select all, I click on "Import", and I get a crash pretty quickly. I see two files created : ".UnhandledException" which contains :

#
System.FormatException: Input string was not in a correct format.
   at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
   at System.Convert.ToDouble(String value, IFormatProvider provider)
   at JoyPro.LUADataRead.CreateAttributeDictFromLua(String cont) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\General\LUADataRead.cs:line 112
   at JoyPro.LUADataRead.CreateAttributeDictFromLua(String cont) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\General\LUADataRead.cs:line 105
   at JoyPro.LUADataRead.CreateAttributeDictFromLua(String cont) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\General\LUADataRead.cs:line 105
   at JoyPro.LUADataRead.CreateAttributeDictFromLua(String cont) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\General\LUADataRead.cs:line 105
   at JoyPro.LUADataRead.CreateAttributeDictFromLua(String cont) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\General\LUADataRead.cs:line 105
   at JoyPro.LUADataRead.CreateAttributeDictFromLua(String cont) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\General\LUADataRead.cs:line 105
   at JoyPro.LUADataRead.CreateAttributeDictFromLua(String cont) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\General\LUADataRead.cs:line 105
   at JoyPro.DCSLuaInput.AnalyzeRawLuaInput(String content, DCSExportPlane refMod) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\DataStructures\DCS\DCSLuaInput.cs:line 333
   at JoyPro.DCSIOLogic.LoadLocalBinds(String localPath, List`1 planes, Boolean fillWithDefaults, String ending, Dictionary`2 resultsDict) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\DataStructures\DCS\DCSIOLogic.cs:line 774
   at JoyPro.DCSIOLogic.BindsFromLocal(List`1 sticks, List`1 planes, Boolean loadDefaults, Boolean inv, Boolean slid, Boolean curv, Boolean dz, Boolean sx, Boolean sy) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\DataStructures\DCS\DCSIOLogic.cs:line 884
   at JoyPro.ImportWindow.Import(Object sender, EventArgs e) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\Windows\ImportWindow.xaml.cs:line 185
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   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.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, 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)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at JoyPro.App.Main()

and ".DispUnhandledException" which contains :

System.Windows.Threading.DispatcherUnhandledExceptionEventArgs
#
Input string was not in a correct format.
#
   at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
   at System.Convert.ToDouble(String value, IFormatProvider provider)
   at JoyPro.LUADataRead.CreateAttributeDictFromLua(String cont) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\General\LUADataRead.cs:line 112
   at JoyPro.LUADataRead.CreateAttributeDictFromLua(String cont) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\General\LUADataRead.cs:line 105
   at JoyPro.LUADataRead.CreateAttributeDictFromLua(String cont) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\General\LUADataRead.cs:line 105
   at JoyPro.LUADataRead.CreateAttributeDictFromLua(String cont) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\General\LUADataRead.cs:line 105
   at JoyPro.LUADataRead.CreateAttributeDictFromLua(String cont) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\General\LUADataRead.cs:line 105
   at JoyPro.LUADataRead.CreateAttributeDictFromLua(String cont) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\General\LUADataRead.cs:line 105
   at JoyPro.LUADataRead.CreateAttributeDictFromLua(String cont) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\General\LUADataRead.cs:line 105
   at JoyPro.DCSLuaInput.AnalyzeRawLuaInput(String content, DCSExportPlane refMod) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\DataStructures\DCS\DCSLuaInput.cs:line 333
   at JoyPro.DCSIOLogic.LoadLocalBinds(String localPath, List`1 planes, Boolean fillWithDefaults, String ending, Dictionary`2 resultsDict) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\DataStructures\DCS\DCSIOLogic.cs:line 774
   at JoyPro.DCSIOLogic.BindsFromLocal(List`1 sticks, List`1 planes, Boolean loadDefaults, Boolean inv, Boolean slid, Boolean curv, Boolean dz, Boolean sx, Boolean sy) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\DataStructures\DCS\DCSIOLogic.cs:line 884
   at JoyPro.ImportWindow.Import(Object sender, EventArgs e) in D:\Dropbox\Programmierung\c#\JoyPro\JoystickProfiler\JoyPro\JoyPro\Windows\ImportWindow.xaml.cs:line 185
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   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.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, 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)
#
System.Collections.ListDictionaryInternal
#

I'm pretty sure it's a dumb thing but I spent the whole day to try things with no luck. I even returned to an older version of JoyPro, same behavior...

Do you have an idea on the problem ?

Holdi601 commented 12 months ago

Can you upload your 2 cf files which cause the issue? also given as far as i can see its only the _easy planes and not the full fidelity version of the planes, you could just delete those files given the other files do not cause issues either. Waiting for your message then ill try and fix it

Chaussette23 commented 12 months ago

I found the problem !

I made a minimalist diff.lua file. The crash occur when there is a curvature value with a decimal part on an axis curvature.

["curvature"] = { [1] = 0,} WORKS ["curvature"] = { [1] = 1,} WORKS ["curvature"] = { [1] = 0.45,} FAIL (value I've set)

The last time I used JoyPro (in working condition) was in Windows 10 in French (with standard French region settings). However, I remember that I upgraded to Windows 11, but I've set Windows to english language with French number formats.

Here is my localisation settings: image

I just reset my localization parameters (reset button), and now JoyPro is working fine, even with the minimalist diff.lua file.

So to reproduce the problem, you "just" have to replace the decimal symbol from point '.' to comma ','.

On my side, I will keep the point instead of the comma because I don't care, so I close the ticket !