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 saving Display Profile first time #257

Open
MrGarrettSmith opened this issue Sep 27, 2023 · 14 comments
Open

Unhandled Exception when saving Display Profile first time #257

MrGarrettSmith opened this issue Sep 27, 2023 · 14 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@MrGarrettSmith
Copy link

Upon first time installation of DisplayMagician version 2.5.0,
an unhandled exception occurs and I am unable to save a Display profile, as this message occurs each time.

Let me know if there is anything else needed from me to help resolve this issue.

Thank you.

DisplayMagician-Support-20230927-1158.zip
Unhandled Exception.txt
Screenshot 2023-09-27 120235

@MrGarrettSmith MrGarrettSmith added the bug Something isn't working label Sep 27, 2023
@terrymacdonald
Copy link
Owner

Hi @MrGarrettSmith ,

Do you have .Net Framework 4.8.1 installed? This could happen if that framework isn't installed. You can download and install it from microsoft here: https://dotnet.microsoft.com/en-us/download/dotnet-framework/thank-you/net481-web-installer

If this doesn't fix the issue then please drop a note here and we can do some more troubleshooting.

Thanks
Terry

@terrymacdonald
Copy link
Owner

Hi @MrGarrettSmith,

After a bit more research I actually think this error is due to the bug I recently found in DisplayMagician v2.5.0, where it incorrectly misses some windows in some configurations of multi-GPU laptops. Was your device you ran this on a gaming laptop? Or a machine that has multiple different video cards in it?

I think this could be fixed with my upcoming release of DisplayMagician v2.6.0, so I will paste a test version here in the next few days for you to test.

Thanks
Terry

@terrymacdonald terrymacdonald added this to the 2.6.0 milestone Jan 12, 2024
@MrGarrettSmith
Copy link
Author

MrGarrettSmith commented Jan 13, 2024

It is a custom desktop build.
CPU: i7-6700K
GPU: GTX 1080 mini

I'll try the suggestions, thank you for replying!

@terrymacdonald
Copy link
Owner

terrymacdonald commented Jan 13, 2024 via email

@terrymacdonald
Copy link
Owner

@MrGarrettSmith I've created a new test version of DisplayMagician that may fix the issue that you're experiencing, and I've attached it to this Github issue. Please download the attached zip file, extract the msi installer from the zip file, and then run the installer. It should upgrade your existing Display Profiles.

DisplayMagicianSetup-v2.6.0.446.zip

This new version of DisplayMagician has the ability to 'update' Display Profiles - effectively overwriting the display layout with the one that is currently being used. So if you start If you still start having issues with a Display Profile not working, simply:

  • setup your display layout the way you want it
  • then open DisplayMagician's Display Profiles Window
  • select on the saved Display Profile you wish to update
  • click the Update button
  • say 'Yes' when asked if you really want to overwrite settings

Your DisplayMagician Display Profile will now be recreated using the current display settings, and they will overwrite the old settings. This will hopefully get rid of any display layout issues, and it doesn't require any changes to your Game Shortcuts. Nice!

There is a single known issue at the moment, which is that the NVIDIALibrary SetDisplayConfig function doesn't work for NVIDIA video cards. Luckily this issue shouldn't have much impact at all as the WindowsLibrary functions should do enough configuration of their own to ensure it all works. If you have some special NVIDIA settings that you use then this version of DisplayMagician may not apply them correctly. You will unfortunately just have to test if that is the case for your particular setup.

I am currently troubleshooting the NVIDIALibrary SetDisplayConfig function error but it looks like it could be a bit of a pain to fix, so I didn't want to hold up the test release; I'd rather get the test version into your hands so I can see what other bugs are in there!

If this fixes your issue please reply here, and if you find another bug please log a new Github issue so I can track them separately.

Thanks
Terry

@terrymacdonald
Copy link
Owner

@MrGarrettSmith I did find some issues with the earlier v2.6.0.446 version. I've made a lot of revisions to how DisplayMagician works in v2.6.0.485 (attached) that should make it way more reliable. But it is highly likely you will need to 'update' your Display Profiles to make them work properly.

I'd recommend first of all applying a Display Profile, and then press the 'update' button. That will recreate the config for the Display Profile and should make it work properly. You'll need to do that to each of your saved Display Profiles. Then please test out changing between your Display Profiles to see if everything works as expected.

Here is the latest test version of DisplayMagician:
DisplayMagicianSetup-v2.6.0.485.zip

Thanks for all your help testing.

Terry

@terrymacdonald
Copy link
Owner

@MrGarrettSmith, I've added in more checks and logic to avoid crashes. Could you please try this latest version?
DisplayMagicianSetup-v2.6.0.508.zip

I'm hoping this will work, but at the very least it should allow DisplayMagician to boot up enough for you to create a Support ZIP File. Let's see whether I've fixed it 🤞.

@terrymacdonald
Copy link
Owner

@MrGarrettSmith The latest test version should be working properly, and hopefully fixes your issue. Could you please test it for me so I know that it fixes your issue? If it does then I'll be able to close this issue as the fix will be part of the next full release.

DisplayMagicianSetup-V2.6.0.515-No-NvApi_SetDisplayConfig.zip

As I've not really had any feedback from you recently I'll give it a week and then close this issue if I have no further responses. We can always reopen this issue in the future if need be.

Thanks!

@terrymacdonald
Copy link
Owner

@MrGarrettSmith Oops I broke the setup with my previous version. This version has a corrected setup that should install everything properly.

DisplayMagicianSetup-v2.6.0.522-corrected-setup.zip

Thanks
Terry

@MrGarrettSmith
Copy link
Author

@terrymacdonald Pardon my lack of responses! I will test your software this weekend! I miss it very much.
Would it be alright for me to upgrade to Windows 11?

@terrymacdonald
Copy link
Owner

terrymacdonald commented Feb 15, 2024 via email

@Grizzler89
Copy link

@terrymacdonald I have the same error. Your posted versions didn't work for me. They didn't start. No error messages.

The Errormessage thrown by 2.5.0 seems to be the same as the authors one:
System.ArgumentException: Parameter is not valid. at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format) at DisplayMagicianShared.ProfileIcon.ToTightestBitmap(PixelFormat format) at DisplayMagicianShared.ProfileItem.get_ProfileTightestBitmap() at DisplayMagician.UIForms.DisplayProfileForm.btn_save_as_Click(Object sender, EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

My Setup is diffrent form MrGarrettSmith.
I'm using an Lenovo Thinkpad X260 (i5-6300U with IntelGraphics).
One Display is connected via HDMI, one via DP. Four Displays are connected via two DisplayLink USB-Adapters.
So including the Laptops own Display there are seven in total.
OS is Windows 11 Enterprise.

The same Setup with 2xDP and 4x USB-DisplayLink works fine using DisplayMagician on my Desktop PC. (Win11, AMD Ryzen 3900X, Nvidia 980 TI).

@terrymacdonald
Copy link
Owner

terrymacdonald commented Feb 26, 2024 via email

@MrGarrettSmith
Copy link
Author

MrGarrettSmith commented Apr 10, 2024

Yep. DisplayMagician is developed on win 11 so works with it fine.

On Fri, 16 Feb 2024, 07:18 Garrett Smith, @.> wrote: @terrymacdonald https://github.com/terrymacdonald Pardon my lack of responses! I will test your software this weekend! I miss it very much. Would it be alright for me to upgrade to Windows 11? — Reply to this email directly, view it on GitHub <#257 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLU5LCKYCZWPJ6VBH54VVLYTZGONAVCNFSM6AAAAAA5J2J3QSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBWHA2DIOBUGI . You are receiving this because you were mentioned.Message ID: @.>

Terry,

I just wanted to let you know that I have no issues on Windows 11 for my installation! I am terribly sorry for being so slow getting back to you.

Please know that I absolutely LOVE this software. Switching to Nvidia Surround mode so easily is frickin' SWEET!

Let me know if there is anything else I can do for you.

  • Garrett

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

3 participants