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

Cannot save any profiles Unhandled Exception - Parameter is not valid #203

Open
Soletta4Haumea opened this issue Mar 3, 2023 · 26 comments
Assignees
Labels
bug Something isn't working cant fix Cannot fix this as it is an upstream problem, or something that can't be fixed for some reason
Milestone

Comments

@Soletta4Haumea
Copy link

Describe the bug
I am unable to save any profiles, when clicking the save button I get this error.
error.txt

unhandled exception

Reporting Logs
DisplayMagician-Support-20230303-0552.zip

Enviroment (please complete the following information):

  • Windows Version: Win10
  • DisplayMagician Version 2.5.0
  • Video Card: Main NVIDIA GTX2080 Super - Secondary NVIDIA GT 710
  • Number and make/model of monitors:
  • (On Main GPU NVIDIA GTX2080 Super) x1 LG Electronics UltraGear (Main) - x1 Dell P3414T - x1 Dell SR2320L - x1 Asus VG24VQ3
  • (On Secondary GPU) NVIDIA GT 710) x1 Acer X233H - x1 HP S2031 x1 VIZIO D32f-E1

Additional context
I recently had to revert the drivers on my secondary card. The last time I tried to update it suddenly stopped letting me run both cards at once and would only load one or the other at a time. I spent a long time trying to troubleshoot this but I couldn't find any relevant information on 2 card issues like that. Not sure if that is relevant for this problem but I can look into it more if you think that is a factor. Thanks for any help!

@Soletta4Haumea Soletta4Haumea added the bug Something isn't working label Mar 3, 2023
@terrymacdonald
Copy link
Owner

Hi @Soletta4Haumea,

I think that the removal of drivers is affecting DisplayMagician. DisplayMagician asks the NVIDIA driver, AMD driver and Windows display drivers for a large amount of their settings, and then it records those settings into Display Profiles. When you change to a different Display Profile, all the driver settings are given to each of the drivers to use. The information in there is very much specific to each driver, so if any of the drivers change, then the settings will change as well. This

This design means that DisplayMagician can set a while lot of different driver settings easily, but it also has its drawbacks. Firstly, and most importantly for you, if a video driver changes, then the settings that that driver can handle may change, and that in turn causes errors like the one you posted above.

(To be 100% correct I believe that the error you are seeing is from the driver knowing there is a card, but being unable to retrieve the information from the card).

Can you please confirm that you are seeing the above happen with a new installation of DisplayMagician? It looks like you are using a new install based on the logs.

I'm not really sure that I can add a workaround for this issue, as DisplayMagician is expecting the NVIDIA card to have NVIDIA drivers. If you've had to remove those NVIDIA drivers from the secondary video card, then DisplayMagician is probably hitting an error there.

I think we need more detail in the logs. Can you please go into DisplayMagician Settings, then change the Logging Level to TRACE, then try to create a new Display Profile until you get the error. Hopefully that will then create a log file with more information in it that will point me to where the underlying problem is. Please then create a new Support ZIP File and upload it here through your web browser. I'll take a look when you send it through.

Thanks
Terry

@terrymacdonald terrymacdonald added the cant fix Cannot fix this as it is an upstream problem, or something that can't be fixed for some reason label Mar 3, 2023
@Soletta4Haumea
Copy link
Author

Soletta4Haumea commented Mar 17, 2023

Hi Terry thanks for the reply. I am indeed using a new installation of DisplayMagician. I installed for the first time after I reverted to the NVIDIA drivers that worked with both my NVIDIA cards operating at the same time. I am not sure I understand exactly what you meant by the removal of drivers affecting DisplayMagician. I still am running NVIDIA drivers both my NVIDIA cards. My secondary card is just a version that is slightly older that the most up to date one, and this was the case before I installed DisplayMagician for the first time, the drivers haven't changed since the installation. Both cards are recognized by NVIDIA Control Panel. Sorry if this is not relevant and I misinterpreted your comment. Below I attached the requested files.
![NVIDIACards](https://user-images.githubusercontent.com/126455567/225986745-ec9f795e-8ece-424a-b825-736c89315544.png
DisplayMagician-Support-20230317-1409.zip
DisplayMagician###.1.log

@Supertriton
Copy link

Hello @terrymacdonald,

I have exactly the same problem as @Soletta4Haumea with an Intel Arc A770 (Probably not yet supported?) should I create a new incident with my support file ?

Regards

Supertriton

@terrymacdonald
Copy link
Owner

terrymacdonald commented Mar 23, 2023 via email

@Supertriton
Copy link

Hmmmmm. That's interesting @Supertriton.... there may be an underlying bug in the way DM v2.5 handles downstream errors for the drivers. Can you please create a new Github issue and upload a new Support ZIP File to that new issue. I'll see if I can take a look over the next week or so. Life's been a bit hectic recently so I've not had as much time to troubleshoot things as I'd have liked. Thanks Terry

I'll do that !

Thx for your answer.

@terrymacdonald
Copy link
Owner

So that this is written here for posterity, @Supertriton bug is related to the fact that DisplayMagician doesn't support Intel Arc video cards, so is unlikely to be related to the issue that @Soletta4Haumea is having.

@terrymacdonald
Copy link
Owner

@Soletta4Haumea Can you please go into your DisplayMagician Settings and change the Logging Level to 'TRACE' please? This will increase the amount of logging that DisplayMagician performs, and it will hopefully provide me with more information about what is happening to your installation. At the moment there isn't anything unexpected in your logs... it looks fine.

There are the normal errors we get from exe's missing icon files, though it does look like one of your displays isn't returning an EDID value when it's being asked to. This isn't all that strange, as some displays aren't very good at communicating with Windows.

2023-03-03 05:50:12.8358|ERROR|DisplayMagician.Program|NVIDIALibrary/NVIDIALibrary: Exception intialising NVIDIA NVAPI library. NvAPI_Initialize() caused an exception.|EXCEPTION OCCURRED :EDIDParser.Exceptions.InvalidEDIDException: EDID checksum failed.
   at EDIDParser.EDID..ctor(Byte[] data) in C:\Users\s_fal\Documents\Personal\Open-Source Projects\EDIDParser\EDIDParser\EDID.cs:line 33
   at DisplayMagicianShared.NVIDIA.NVIDIALibrary.GetSomeDisplayIdentifiers(Boolean allDisplays)
   at DisplayMagicianShared.NVIDIA.NVIDIALibrary.GetCurrentDisplayIdentifiers()
   at DisplayMagicianShared.NVIDIA.NVIDIALibrary.GetNVIDIADisplayConfig(Boolean allDisplays)
   at DisplayMagicianShared.NVIDIA.NVIDIALibrary.GetActiveConfig()
   at DisplayMagicianShared.NVIDIA.NVIDIALibrary..ctor()

I can't find anything else strange with the logs I currently have.

@Soletta4Haumea
Copy link
Author

@terrymacdonald Thanks for the response. I had my program already set to trace but it appears I accidentally uploaded the wrong log, here is a new one.
DisplayMagician###.1.log

@versedi
Copy link

versedi commented May 3, 2023

Running into the same issue (updated long time ago, had no issues, disconnected all displays today to give the PC some nice cleaning maintenance from dust, replugged every display the same way (I have them labeled to save myself the hassle of knowing which one is which).

First problem was the DM wasn't able to change the profiles at all - displays not detected after starting the PC after cleaning.
Redid the profiles, had some weird Windows bugs with the flipped landscape mode but it worked.

Switched back to desk profile... worked. Switched back to Surround profile... monitors stuck in limbo. F13.

Updated the Nvidia Drivers thinking it might be something with that. The surround suddenly opened up on the 3 side monitors in rig.

Redid my profiles again. Tried to switch from one profile to another. Back in limbo. F13.

Display Magician shown JSON issues on the boot.

Deleted all AppData of the app. Restarted PC.

Recreated the profiles.

I am able to switch Desk -> Surround.

But when switching Surround -> Desk the app always crashes (it does switches the profile thankfully :) )

Should I create a separate bug report since it's different cause but same outcome?

2070s
One Full HD desk monitor
Triple 1440p Surround setup on rig
Windows 10
NV Driver 531.79

DisplayMagician.log
obraz
obraz

Edit: More testing done... it doesn't crash 100% of the time. I'm honestly out of pattern to say what causes it. Sometimes it crashes, sometimes it doesn't.

@terrymacdonald
Copy link
Owner

terrymacdonald commented May 3, 2023 via email

@versedi
Copy link

versedi commented May 4, 2023

Does DM scans registry for apps? I might have some broken entries there from the PhpStorm -> Toolbox swap.

DisplayMagician-Support-20230504-0447.zip

@versedi
Copy link

versedi commented May 4, 2023

Cannot reproduce at all any more.

Just works now again.

@terrymacdonald
Copy link
Owner

terrymacdonald commented May 5, 2023 via email

@Soletta4Haumea
Copy link
Author

@terrymacdonald did you get a chance to review my trace log? When you initially asked I accidentally uploaded the wrong log. The last post I made has the correct one. Thanks

@versedi
Copy link

versedi commented May 6, 2023

Hmmmm. I wonder if one of your displays is intermittently reporting the wrong data? DisplayMagician queries your displays to find out their capabilities, and sometimes that doesn't always work reliably due to windows problems, drivers and hardware issues. Will keep this issue open for the next month to see if it returns again. Thanks Terry

On Fri, 5 May 2023, 11:52 Tadeusz Stępnikowski, @.> wrote: Cannot reproduce at all any more. Just works now again. — Reply to this email directly, view it on GitHub <#203 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLU5LHVQ5UUVCUUQKLEJF3XEQ6LDANCNFSM6AAAAAAVOPS5WY . You are receiving this because you were mentioned.Message ID: @.>

Is there a way to force DM to refresh devices?

Edit: Additional info: I remember one of the DP cables wasn't entirely plugged in, will that cause issues with IDing the display device?

@terrymacdonald
Copy link
Owner

terrymacdonald commented May 7, 2023 via email

@terrymacdonald
Copy link
Owner

@Soletta4Haumea I think this issue was related to a bug I recently found in the screen processing logic. I have completely rewritten the logic in this area, and I will be shortly releasing v2.6.0. This should hopefully fix your issue. I will post a link in this issue for you to download a test version of the software. Once you can confirm this fixes things then I'll be hopefully able to release this to the general public.

Expect something in the next 2 weeks.

Thanks
Terry

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

@terrymacdonald Thanks that's good to hear, look forward to trying it out!

@terrymacdonald
Copy link
Owner

@Soletta4Haumea 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

Hmmmm. I wonder if one of your displays is intermittently reporting the wrong data? DisplayMagician queries your displays to find out their capabilities, and sometimes that doesn't always work reliably due to windows problems, drivers and hardware issues. Will keep this issue open for the next month to see if it returns again. Thanks Terry

On Fri, 5 May 2023, 11:52 Tadeusz Stępnikowski, @.> wrote: Cannot reproduce at all any more. Just works now again. — Reply to this email directly, view it on GitHub <#203 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLU5LHVQ5UUVCUUQKLEJF3XEQ6LDANCNFSM6AAAAAAVOPS5WY . You are receiving this because you were mentioned.Message ID: _@**.**_>

Is there a way to force DM to refresh devices?

Edit: Additional info: I remember one of the DP cables wasn't entirely plugged in, will that cause issues with IDing the display device?

DM actually refreshes it data periodically automatically. It basically listens for any change to screen layout, and then decides then if it needs to refresh. It refreshes quite often when in the Display Profiles window, as that window is expecting the user to Alt-Tab away from DM to their display settings window, then make some changes, then Alt-Tab back to save the profile. This continuous monitoring is why the display layout automatically changes when you alt-tab back to the Display Profile window.

DisplayMagician attempts to find out as much information as it can in order to keep[ track of which videocards and devices are plugged in, what their settings are and how they are connected. It does this so that it builds up a 'fingerprint' for how everything is connected. This fingerprint is then used to determine what display profiles are valid for the current display setup.

If your screen is only partially connnected then DisplayMagician won't recognise the screen, and it won't match the fingerprint, so any DisplayProfiles expecting that screen won't match.

Hopefully that makes sense.

Thanks
Terry

Terry

@terrymacdonald
Copy link
Owner

@Soletta4Haumea 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

@Soletta4Haumea, 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 🤞.

@Soletta4Haumea
Copy link
Author

@Soletta4Haumea, 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 I've been out of town for the past week but I just tried the latest version you posted and everything is working on my end. Thanks! Do you still need a support zip or is that only if it didn't work?

@terrymacdonald
Copy link
Owner

terrymacdonald commented Feb 5, 2024 via email

@terrymacdonald
Copy link
Owner

@Soletta4Haumea The latest test version should be working properly, and hopefully fully 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

Thanks!

@terrymacdonald
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cant fix Cannot fix this as it is an upstream problem, or something that can't be fixed for some reason
Projects
None yet
Development

No branches or pull requests

4 participants