Yoooi0 / MultiFunPlayer

flexible application to synchronize various devices with media playback
https://yoooi0.github.io/MultiFunPlayer/
MIT License
105 stars 20 forks source link

Crash when opening file dialog in certain initial paths #165

Closed TeKett closed 1 month ago

TeKett commented 1 month ago

Im trying to use this for the first time and its working correctly with deovr and buttplugio, but the script is not loading. When i click "script > load" it insta crashes, im assuming as its trying to pull up the file browser. I also cannot drag and drop the script file into the window anywhere, as stated should work.

Win10 Tried self contained v1.29.4, v1.28.4, 1.27.0

Yoooi0 commented 1 month ago

Upload latest log file that includes the crash.

TeKett commented 1 month ago

v1.25.1 worked though, at least for loading the script. Toy is not moving tho. and its not auto loading the script.(im just dumb, was 1 number off) The script has the same name as the video, and it says it searched the correct directory.

v1.29.4 error log

2024-05-22 15:18:04.9931|INFO|MultiFunPlayer|Environment [OSVersion: Microsoft Windows NT 10.0.19045.0, CLRVersion: 8.0.3]
2024-05-22 15:18:05.0122|INFO|MultiFunPlayer|Assembly [Version: 1.29.4+Branch.tags-1.29.4.Sha.f18d8ae5f2ff0a7c98483806f30699b0eeca81f2]
2024-05-22 15:18:05.0122|INFO|MultiFunPlayer|Config [Version: 27]
2024-05-22 15:18:05.0122|INFO|MultiFunPlayer|Timer [IsHighResolution: True, Frequency: 10000000]
2024-05-22 15:18:05.0122|INFO|MultiFunPlayer|Set working directory to "C:\Users\user\Desktop\MultiFunPlayer-1.29.4-SelfContained.8.0.203"
2024-05-22 15:18:05.1124|INFO|MultiFunPlayer.Settings.SettingsHelper|Reading settings from "MultiFunPlayer.config.json"
2024-05-22 15:18:07.8732|INFO|MultiFunPlayer.MediaSource.ViewModels.DeoVRMediaSource|Connecting to DeoVR at "127.0.0.1:23554"
2024-05-22 15:18:09.8879|INFO|MultiFunPlayer.OutputTarget.ViewModels.ButtplugOutputTarget|Connecting to Buttplug.io/0 at "ws://127.0.0.1:12345"
2024-05-22 15:18:09.9384|INFO|MultiFunPlayer.OutputTarget.ViewModels.ButtplugOutputTarget|Device added: "Kiiroo Keon"
2024-05-22 15:18:10.9087|INFO|MultiFunPlayer.UI.Controls.ViewModels.ScriptViewModel|Received MediaPathChangedMessage [Source: "C:/Users/user/Documents/vid" Name: "vid.mp4"]
2024-05-22 15:18:10.9087|INFO|MultiFunPlayer.UI.Controls.ViewModels.ScriptViewModel|Received MediaDurationChangedMessage [Duration: 00:00:28.0320000]
2024-05-22 15:18:10.9087|INFO|MultiFunPlayer.Script.Repository.ViewModels.ScriptRepositoryManager|Trying to match scripts to resource [Name: vid.mp4, Source: C:/Users/user/Documents/vid]
2024-05-22 15:18:13.8979|FATAL|MultiFunPlayer|System.ArgumentException: Value does not fall within the expected range.
   at MS.Internal.Interop.HRESULT.ThrowIfFailed()
   at MS.Internal.AppModel.ShellUtil.GetShellItemForPath(String path)
   at Microsoft.Win32.CommonItemDialog.PrepareDialog(IFileDialog dialog)
   at Microsoft.Win32.FileDialog.PrepareDialog(IFileDialog dialog)
   at Microsoft.Win32.CommonItemDialog.RunDialog(IntPtr hwndOwner)
   at Microsoft.Win32.CommonDialog.ShowDialog()
   at MultiFunPlayer.UI.Controls.ViewModels.ScriptViewModel.OnAxisLoad(DeviceAxis axis)
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
--- End of stack trace from previous location ---
   at Stylet.Xaml.ActionBase.InvokeTargetMethod(Object[] parameters)
   at Stylet.Xaml.CommandAction.Execute(Object parameter)
   at System.Windows.Controls.MenuItem.InvokeClickAfterRender(Object arg)
   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.DispatcherOperation.InvokeImpl()
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(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 MultiFunPlayer.App.Main()
Yoooi0 commented 1 month ago

That seems to be an issue with opening a dialog with path containing / instead of \. The path should not contain / and that seems to be already fixed in my develop builds. So v1.30.0 will have the fix.

The scripts should load automatically if you name them correctly, for example vid.mp4 and vid.funscript. You can drag drop funscript files into the "File" box under each axis settings tab.

TeKett commented 1 month ago

I was just dumb with the script not auto loading, 1 number off. Good to know i at least ran into a bug. Just need to figure out why the toy aint moving. Since it functions correctly when testing in intiface.

Yoooi0 commented 1 month ago

You probably did not map the device under buttplug.io output in MFP

TeKett commented 1 month ago

You probably did not map the device under buttplug.io output in MFP

I did, but still nothing. Screenshot_107

Yoooi0 commented 1 month ago

Press green +

Yoooi0 commented 1 month ago

Fixed paths having / instead of \ and the open dialog crashing, will be released with v1.30.0