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

JoyPro crash when importing bindings #60

Closed
Chaussette23 opened this issue Sep 22, 2023 · 2 comments
Closed

JoyPro crash when importing bindings #60

Chaussette23 opened this issue Sep 22, 2023 · 2 comments

Comments

@Chaussette23
Copy link

Chaussette23 commented Sep 22, 2023

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
Copy link
Owner

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
Copy link
Author

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 !

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

2 participants