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

Unhandled exception when creating game shortcuts #4

Closed
joeymanson23 opened this issue Apr 3, 2021 · 17 comments
Closed

Unhandled exception when creating game shortcuts #4

joeymanson23 opened this issue Apr 3, 2021 · 17 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@joeymanson23
Copy link

Describe the bug
After creating successfully a display profile, when creating a game shortcut an error is raised.
Used DisplayMagician v1.0.3 release.

Screenshots
When trying to create a new game shortcut:
image
If i click continue, no profiles are found:
image

Reporting Logs

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentException: The path is not of a legal form.
   at System.IO.Path.NewNormalizePath(String path, Int32 maxPathLength, Boolean expandShortPaths)
   at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
   at System.IO.Path.GetFullPathInternal(String path)
   at DisplayMagician.GameLibraries.UplayLibrary.LoadInstalledGames() in H:\vscode-projects\DisplayMagician\DisplayMagician\GameLibraries\UplayLibrary.cs:line 506
   at DisplayMagician.GameLibraries.UplayLibrary.get_AllInstalledGames() in H:\vscode-projects\DisplayMagician\DisplayMagician\GameLibraries\UplayLibrary.cs:line 80
   at DisplayMagician.UIForms.ShortcutForm.ShortcutForm_Load(Object sender, EventArgs e) in H:\vscode-projects\DisplayMagician\DisplayMagician\UIForms\ShortcutForm.cs:line 798
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4300.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
DisplayMagician
    Assembly Version: 1.0.3.40831
    Win32 Version: 1.0.3.0
    CodeBase: file:///C:/Users/joey/Documents/DisplayMagician/DisplayMagician.exe
----------------------------------------
NLog
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.8.12686
    CodeBase: file:///C:/Users/joey/Documents/DisplayMagician/NLog.DLL
----------------------------------------
DisplayMagician.Shared
    Assembly Version: 1.0.3.40830
    Win32 Version: 1.0.3.0
    CodeBase: file:///C:/Users/joey/Documents/DisplayMagician/DisplayMagician.Shared.DLL
----------------------------------------
McMaster.Extensions.CommandLineUtils
    Assembly Version: 3.1.0.0
    Win32 Version: 3.1.0.0
    CodeBase: file:///C:/Users/joey/Documents/DisplayMagician/McMaster.Extensions.CommandLineUtils.DLL
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4270.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4300.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4190.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4320.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Windows.UI
    Assembly Version: 255.255.255.255
    Win32 Version: 10.0.10011.16384
    CodeBase: file:///C:/Windows/system32/WinMetadata/Windows.UI.winmd
----------------------------------------
System.Runtime
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Runtime.dll
----------------------------------------
Newtonsoft.Json
    Assembly Version: 12.0.0.0
    Win32 Version: 12.0.3.23909
    CodeBase: file:///C:/Users/joey/Documents/DisplayMagician/Newtonsoft.Json.DLL
----------------------------------------
System.Numerics
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
----------------------------------------
System.Runtime.Serialization
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4250.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll
----------------------------------------
System.Data
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4270.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_64/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.ServiceModel
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4250.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.ServiceModel/v4.0_4.0.0.0__b77a5c561934e089/System.ServiceModel.dll
----------------------------------------
System.Runtime.InteropServices.RuntimeInformation
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.InteropServices.RuntimeInformation/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Runtime.InteropServices.RuntimeInformation.dll
----------------------------------------
System.ComponentModel.DataAnnotations
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.ComponentModel.DataAnnotations/v4.0_4.0.0.0__31bf3856ad364e35/System.ComponentModel.DataAnnotations.dll
----------------------------------------
System.ValueTuple
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.ValueTuple/v4.0_4.0.0.0__cc7b13ffcd2ddd51/System.ValueTuple.dll
----------------------------------------
System.ServiceModel.Internals
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4250.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.ServiceModel.Internals/v4.0_4.0.0.0__31bf3856ad364e35/System.ServiceModel.Internals.dll
----------------------------------------
SMDiagnostics
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4250.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/SMDiagnostics/v4.0_4.0.0.0__b77a5c561934e089/SMDiagnostics.dll
----------------------------------------
System.IdentityModel
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4250.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.IdentityModel/v4.0_4.0.0.0__b77a5c561934e089/System.IdentityModel.dll
----------------------------------------
ValveKeyValue
    Assembly Version: 0.3.1.152
    Win32 Version: 0.3.1.152
    CodeBase: file:///C:/Users/joey/Documents/DisplayMagician/ValveKeyValue.DLL
----------------------------------------
netstandard
    Assembly Version: 2.0.0.0
    Win32 Version: 4.8.4084.0
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/netstandard/v4.0_2.0.0.0__cc7b13ffcd2ddd51/netstandard.dll
----------------------------------------
Microsoft.Toolkit.Uwp.Notifications
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.0.1
    CodeBase: file:///C:/Users/joey/Documents/DisplayMagician/Microsoft.Toolkit.Uwp.Notifications.DLL
----------------------------------------
Windows.Foundation
    Assembly Version: 255.255.255.255
    Win32 Version: 10.0.10011.16384
    CodeBase: file:///C:/Windows/system32/WinMetadata/Windows.Foundation.winmd
----------------------------------------
System.Runtime.InteropServices.WindowsRuntime
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.InteropServices.WindowsRuntime/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Runtime.InteropServices.WindowsRuntime.dll
----------------------------------------
Windows.Data
    Assembly Version: 255.255.255.255
    Win32 Version: 10.0.10011.16384
    CodeBase: file:///C:/Windows/system32/WinMetadata/Windows.Data.winmd
----------------------------------------
NvAPIWrapper
    Assembly Version: 0.8.1.100
    Win32 Version: 0.8.1.100
    CodeBase: file:///C:/Users/joey/Documents/DisplayMagician/NvAPIWrapper.DLL
----------------------------------------
WindowsDisplayAPI
    Assembly Version: 1.3.0.13
    Win32 Version: 1.3.0.13
    CodeBase: file:///C:/Users/joey/Documents/DisplayMagician/WindowsDisplayAPI.DLL
----------------------------------------
EDIDParser
    Assembly Version: 1.2.0.0
    Win32 Version: 1.2.0.0
    CodeBase: file:///C:/Users/joey/Documents/DisplayMagician/EDIDParser.DLL
----------------------------------------
AudioSwitcher.AudioApi.CoreAudio
    Assembly Version: 4.0.0.308
    Win32 Version: 4.0.0.308
    CodeBase: file:///C:/Users/joey/Documents/DisplayMagician/AudioSwitcher.AudioApi.CoreAudio.DLL
----------------------------------------
AudioSwitcher.AudioApi
    Assembly Version: 4.0.0.308
    Win32 Version: 4.0.0.308
    CodeBase: file:///C:/Users/joey/Documents/DisplayMagician/AudioSwitcher.AudioApi.DLL
----------------------------------------
IconLib
    Assembly Version: 0.73.0.0
    Win32 Version: 0.73.0.0
    CodeBase: file:///C:/Users/joey/Documents/DisplayMagician/IconLib.DLL
----------------------------------------
AutoUpdater.NET
    Assembly Version: 1.6.4.0
    Win32 Version: 1.6.4.0
    CodeBase: file:///C:/Users/joey/Documents/DisplayMagician/AutoUpdater.NET.DLL
----------------------------------------
Microsoft.CSharp
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.CSharp/v4.0_4.0.0.0__b03f5f7f11d50a3a/Microsoft.CSharp.dll
----------------------------------------
System.Dynamic
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Dynamic/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Dynamic.dll
----------------------------------------
Anonymously Hosted DynamicMethods Assembly
    Assembly Version: 0.0.0.0
    Win32 Version: 4.8.4300.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_64/mscorlib/v4.0_4.0.0.0__b77a5c561934e089/mscorlib.dll
----------------------------------------
ImageListView
    Assembly Version: 13.8.2.0
    Win32 Version: 13.8.2.0
    CodeBase: file:///C:/Users/joey/Documents/DisplayMagician/ImageListView.DLL
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

Enviroment (please complete the following information):

  • Windows Version: Windows 10 Pro
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@joeymanson23 joeymanson23 added the bug Something isn't working label Apr 3, 2021
@terrymacdonald
Copy link
Owner

@joeymanson23 Have you got Uplay/Ubisoft Connect installed at all? I've a feeling based on that error message that It is trying to find Uplay, can't find it, and is dying.... I will need to roll a new version as I think I must have forgotten to check for Uplay or Steam not being installed. In any case I'll engineer a fix over the next couple of days.

@terrymacdonald
Copy link
Owner

Further investigation points towards it being a different game file path in the InstallDir registry key within the Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Ubisoft\Launcher\Installs\ registry key that we're expecting.

At present, we read each registry subkey within Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Ubisoft\Launcher\Installs\ to find a game... for example subkey '720' is where Assassin's Creed Unity lives. Within that Subkey is a string value called 'InstallDir' that lists where the game is actually installed. We parse that location to start to get the Icon/Bitmap information from the files within there.

The error you're getting is DisplayMagician complaining that it can't find a real path in that location... which is odd, as that is what should be there. I need to know more information about the erroring subkey to see what it is failing on, and that is probably going to be a pain to get :).

So, can you please open regedit and visit the Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Ubisoft\Launcher\Installs\ registry key for me, and take a screenshot of the subkeys underneath it please? Also please go into one or two of the numeric subkeys under that key, and take a screenshot of what is there? e.g.

image

It should give me enough information about what I need to do.

In the mean time I'll start grabbing some more information into the log file that DisplayMagician creates every run (when it's in debug mode). You can click on the 'Settings' button, and change the logging mode to 'Debug' mode, and it will write a LOT more information into the log file. That may help you (and me) during further troubleshooting.

I'll drop a version that does better Uplay/Steam debugging over the next few days, and we can use that if we can't figure out the answer beforehand.

Thanks
Terry

@joeymanson23
Copy link
Author

Thank you very much Terry for the investigation, I will take a look and give you some feedback soon.

@joeymanson23
Copy link
Author

I have indeed Ubisoft Connect installed.

Folder settings:
image

Registry: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Ubisoft\Launcher:
image

Registry: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Ubisoft\Launcher\Installs:
image

Is it strange that the folder I have set for Ubisoft games D:/games/Ubisoft/ is not present in this registry node?
Thanks a lot!

@terrymacdonald
Copy link
Owner

terrymacdonald commented Apr 4, 2021 via email

@joeymanson23
Copy link
Author

joeymanson23 commented Apr 4, 2021

Hi Terry,
The installs folder is empty just like I tried to explain in the previous comment. Perhaps more clear here:
image

So apparently, in my case, the ubisoft games list can't be found in this location!?

Regards,
Joey

@terrymacdonald
Copy link
Owner

terrymacdonald commented Apr 4, 2021 via email

@joeymanson23
Copy link
Author

Hey Terry,

According to control panel I've installed Ubisoft Connect on 17th December 2020.
And I have a few games. One of them is Assassins creed Valhalla which I got for free with my MSI motherboard I guess.

Thanks,
Joey

@joeymanson23
Copy link
Author

Ah, just noticed now none of the Ubisoft Connect games are installed! :)
Will try installing one tomorrow and check.

@terrymacdonald
Copy link
Owner

terrymacdonald commented Apr 5, 2021 via email

@joeymanson23
Copy link
Author

Hey Terry, I've just installed one game, confirmed the entry is on the registry, but the same exact error is returned when I try to create a new game shortcut.
image

@terrymacdonald
Copy link
Owner

Just an FYI that I've fixed this issue in the develop branch, but I need to fix another steam issue in order to package a release. I am working on it and will hopefully get it out before the weekend.

@terrymacdonald terrymacdonald self-assigned this Apr 7, 2021
@terrymacdonald terrymacdonald added this to the v1.0.4 milestone Apr 7, 2021
@terrymacdonald
Copy link
Owner

terrymacdonald commented Apr 9, 2021

Ok. My testing shows that I've appeared to have fixed the issue, but there is unfortunately another Steam library issue (#5) that I need to fix before I can bake a new release. I'm working on that today, and hopefully I'll have a new release out early next week. Sorry for the delay!

@joeymanson23
Copy link
Author

Hey Terry, no worries! Take your time :).
By the way, were you able to understand why i got the same error even with a game installed, like stated above?

@terrymacdonald
Copy link
Owner

@joeymanson23 I've released v1.0.4, and hopefully it corrects all the issues you're experiencing. To update, just start DisplayMagician, and it will detect there is an update, and will update for you. No need to do it manually.

I believe that your other issue should be fixed by the slew of other bug's I've fixed in this release, but if it isn't fixed, please log a new issue so I can track that separately.

And thank you for using DisplayMagician!

@joeymanson23
Copy link
Author

@terrymacdonald, I've installed the latest release v1.0.4, and it's working like a charm! Awesome work! Thank you!

@terrymacdonald
Copy link
Owner

terrymacdonald commented Apr 10, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants