Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

MabiPacker-2.0alpha Selecting File Name Errors #6

Closed
shaggyze opened this issue Jun 22, 2019 · 7 comments
Closed

MabiPacker-2.0alpha Selecting File Name Errors #6

shaggyze opened this issue Jun 22, 2019 · 7 comments

Comments

@shaggyze
Copy link

shaggyze commented Jun 22, 2019

chrome_2019-06-22_09-18-45

Error when clicking folder/broswe for Pack > Output file name:

at MS.Internal.AppModel.ShellUtil.GetShellItemForPath(String path) at Microsoft.Win32.FileDialog.PrepareVistaDialog(IFileDialog dialog) at Microsoft.Win32.FileDialog.RunVistaDialog(IntPtr hwndOwner) at Microsoft.Win32.FileDialog.RunDialog(IntPtr hwndOwner) at Microsoft.Win32.CommonDialog.ShowDialog() at MabiPacker.View.MainWindow.Button_SetPackFileName_Click(Object sender, RoutedEventArgs e) in D:\Documents\Visual Studio 2017\Projects\MabiPack\MabiPacker\View\MainWindow.xaml.cs:line 78 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.RaiseEvent(RoutedEventArgs e) 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.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e) at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) 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.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) 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.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted) 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)

Same error appears when clicking folder/browse for Unpack > Select *.pack file to unpack:

paths can be input manually and work when clicking pack, unpack or view content, but then still error when clicking folder/browse.

@logue
Copy link
Owner

logue commented Jun 22, 2019

This is still an alpha version and a concept release.
This error appears when the output path is not a full path or the file already exists.

Apparently, the registry value can not be read and the location of Mabinogi's directory seems to be in an incomplete state.
The output destination should be C:\Nexon\Mabinogi\packages\*.pack, but it is \packages\*.pack, which is probably an error.

@shaggyze
Copy link
Author

shaggyze commented Jun 23, 2019

yea, i realize this is alpha so bugs/errors are expected, just letting you know so you can improve things.
for NA nexon launcher the default path is now C:\Nexon\Library\mabinogi\appdata\packages\ and for NA steam launcher the path is C:\Program Files (x86)\Steam\steamapps\common\Mabinogi\packages\ and the NA registry path is the same as before HKEY_LOCAL_MACHINE\Software\Nexon\Mabinogi\

regedit_2019-06-23_00-27-32

@logue
Copy link
Owner

logue commented Jun 23, 2019

Is it HKEY_LOCAL_MACHINE?
Since only HKEY_CURRENT_USER was checked, I made a scan for that one in this commit.

An error has been made to raise an exception due to a defect in the specification of the packing directory or unpacking file or output destination.
The error handling here has not been done yet, but I think that a somewhat clear error message will come out.

@shaggyze
Copy link
Author

shaggyze commented Jun 23, 2019

oops, sorry your right is HKEY_CURRENT_USER as shown in the picture.
checking latest commit now.

@shaggyze
Copy link
Author

shaggyze commented Jun 23, 2019

changing these in MabiEnvironment.cs fixed the problem

                using (RegistryKey regkey = Registry.CurrentUser.OpenSubKey(key, false))
                {
                    if (regkey != null)
                    {
                        return (string)regkey.GetValue("");
                    }
                }
            }
            foreach (string key in RegistoryKeys)
            {
                using (RegistryKey regkey = Registry.CurrentUser.OpenSubKey(key, false))
                {
                    if (regkey != null)
                    {
                        return (string)regkey.GetValue("");

MabiPacker_2019-06-23_05-45-57

I guess the NA registry no longer has ExecutablePath, but as far as i remember the path has always been (Default) which is just a blank "" key

regedit_2019-06-23_05-50-15

also version is now working too, so your doing great!

@logue
Copy link
Owner

logue commented Jun 24, 2019

Does it mean that it is not HKEY_LOCAL_MACHINE after all?
At least for Japanese clients, the default key does not have a value, so if it can not be read from ExecutablePath or LauncherPath, it will be acquired from there.

@shaggyze
Copy link
Author

yea, sorry it's HKEY_CURRENT_USER and remove ExecutablePath

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants