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

Kinda worked but now it crashes #211

Open
bolf51 opened this issue Mar 26, 2023 · 15 comments
Open

Kinda worked but now it crashes #211

bolf51 opened this issue Mar 26, 2023 · 15 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@bolf51
Copy link

bolf51 commented Mar 26, 2023

Describe the bug
I can sometimes get into the 'create profile' screen from right clicking on desktop but an icon for displaymagician doesn't appear in my taskbar, and if I click "back" it closes the application. When I start the application from start menu it shows message about loading then disappears. If I delete the files from the appdata folder, it seems to work fine until I save my two profiles the way I want them and test switching between the two, then it starts crashing.
displaymagician.zip

Expected behaviour

Screenshots

Reporting Logs

Enviroment (please complete the following information):

  • Windows Version: win11
  • DisplayMagician Version 2.50.352
  • Video Card: zotac nvidia 4090
  • Number and make/model of monitors: 1x asus pg27uq, 3x gigabyte m32q
  • Date of last video driver update: 2023-03-25
  • Date of last windows update: 2023-03-25
@bolf51 bolf51 added the bug Something isn't working label Mar 26, 2023
@terrymacdonald
Copy link
Owner

Hi @bolf51,

Unfortunately your log doesn't contain enough information for me to troubleshoot. Can you please edit your Settings_2.5.json file, and change

  "LogLevel": "Warn",

line to

  "LogLevel": "Trace",

Then please restart DisplayMagician and try to perform a video swap between them. If you can, then please go into DisplayMagician Settings window and click on the 'Create Support ZIP File' button. Upload the ZIP file that is made to this issue through your web browser.

I'll take a closer look then.

Thanks
Terry

@terrymacdonald
Copy link
Owner

Hi @bolf51

I actually took a look now. It all looks fine.

Your Surround config has 4 screens connected to your nice new RTX4090, 3 via Displayport, and 1 via HDMI via a DVI dongle? The 3 Displayport devices are in a 1x3 mosaic/Surround group and is 7780x1440 in overall size. Your single screen is showing a desktop 3840x2160 in size. There is a weird NVIDIA setting in here where it thinks your mosaic display settings are only 2560x1440, so I think NVIDIA is grabbing the size of your primary display (which is one of the surrounds screens).

Your normal profile is just the Asus display at 2560x1440.

Both those profiles look ok to me.

Do you have any error message appear on the screen when you have a problem?

Thanks
Terry

@bolf51
Copy link
Author

bolf51 commented Mar 27, 2023

Hi, thanks for taking a look!

I have 2 displayport monitors with 1 HDMI direct to the video card for the surround group, each at 2560x1440, and the single asus 4k monitor on displayport. I don't see any error messages, just closes the application completely. The only screen i'm able to get to is 'create profile' via right clicking on desktop, and the back button crashes it

@bolf51
Copy link
Author

bolf51 commented Mar 27, 2023

I've messed with it a bit more, it seems to be able to switch between them but it crashes after it does so, and I managed to get an error message. I'm not able to get to the main menu or settings after creating the profiles but I changed the .json file to "Trace" log and uploaded a new log file:

DisplayMagician.log

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at DisplayMagician.Program.ApplyProfileTask(ProfileItem profile)
at DisplayMagician.UIForms.DisplayProfileForm.Apply_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)

************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9139.0 built by: NET481REL1LAST_B
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll

DisplayMagician
Assembly Version: 2.5.0.352
Win32 Version: 2.5.0.352
CodeBase: file:///C:/Program%20Files/DisplayMagician/DisplayMagician.exe

System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9075.0 built by: NET481REL1LAST_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.9139.0 built by: NET481REL1LAST_B
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.9032.0 built by: NET481REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

NLog
Assembly Version: 5.0.0.0
Win32 Version: 5.1.1.1522
CodeBase: file:///C:/Program%20Files/DisplayMagician/NLog.DLL

System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9139.0 built by: NET481REL1LAST_B
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll

System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9032.0 built by: NET481REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9032.0 built by: NET481REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

DisplayMagician.Shared
Assembly Version: 2.4.2.0
Win32 Version: 2.4.2.0
CodeBase: file:///C:/Program%20Files/DisplayMagician/DisplayMagician.Shared.DLL

McMaster.Extensions.CommandLineUtils
Assembly Version: 4.0.2.0
Win32 Version: 4.0.2.0
CodeBase: file:///C:/Program%20Files/DisplayMagician/McMaster.Extensions.CommandLineUtils.DLL

Microsoft.Toolkit.Uwp.Notifications
Assembly Version: 7.1.0.0
Win32 Version: 7.1.3.1
CodeBase: file:///C:/Program%20Files/DisplayMagician/Microsoft.Toolkit.Uwp.Notifications.DLL

Windows.ApplicationModel
Assembly Version: 255.255.255.255
Win32 Version: 10.0.10011.16384
CodeBase: file:///C:/WINDOWS/system32/WinMetadata/Windows.ApplicationModel.winmd

Windows.Storage
Assembly Version: 255.255.255.255
Win32 Version: 10.0.10011.16384
CodeBase: file:///C:/WINDOWS/system32/WinMetadata/Windows.Storage.winmd

System.Runtime
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9032.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Runtime.dll

DynamicComActivator
Assembly Version: 0.0.0.0
Win32 Version: 7.1.3.1
CodeBase: file:///C:/Program%20Files/DisplayMagician/Microsoft.Toolkit.Uwp.Notifications.dll

Newtonsoft.Json
Assembly Version: 13.0.0.0
Win32 Version: 13.0.2.27524
CodeBase: file:///C:/Program%20Files/DisplayMagician/Newtonsoft.Json.DLL

System.Numerics
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9032.0 built by: NET481REL1
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.9032.0 built by: NET481REL1
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.9110.0 built by: NET481REL1LAST_B
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll

AudioSwitcher.AudioApi.CoreAudio
Assembly Version: 4.0.0.308
Win32 Version: 4.0.0.308
CodeBase: file:///C:/Program%20Files/DisplayMagician/AudioSwitcher.AudioApi.CoreAudio.DLL

AudioSwitcher.AudioApi
Assembly Version: 4.0.0.308
Win32 Version: 4.0.0.308
CodeBase: file:///C:/Program%20Files/DisplayMagician/AudioSwitcher.AudioApi.DLL

System.Runtime.InteropServices.RuntimeInformation
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9032.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.9032.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.9032.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.ValueTuple/v4.0_4.0.0.0__cc7b13ffcd2ddd51/System.ValueTuple.dll

PInvokeDelegateFactoryInternalAssembly
Assembly Version: 0.0.0.0
Win32 Version: 2.4.2.0
CodeBase: file:///C:/Program%20Files/DisplayMagician/DisplayMagician.Shared.dll

EDIDParser
Assembly Version: 1.2.5.3
Win32 Version: 1.2.5.3
CodeBase: file:///C:/Program%20Files/DisplayMagician/EDIDParser.DLL

ImageListView
Assembly Version: 13.8.2.0
Win32 Version: 13.8.2.0
CodeBase: file:///C:/Program%20Files/DisplayMagician/ImageListView.DLL

Anonymously Hosted DynamicMethods Assembly
Assembly Version: 0.0.0.0
Win32 Version: 4.8.9139.0 built by: NET481REL1LAST_B
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/mscorlib/v4.0_4.0.0.0__b77a5c561934e089/mscorlib.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:

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.

@terrymacdonald
Copy link
Owner

@bolf51 That helps I think. I think sometimes the NVIDIA driver reports a 0x0 screen, and that is tricking my logic which expects a valid screen size. This is then causing an issue when it attempts to show that display layout:

2023-03-27 00:04:33.6277|TRACE|DisplayMagician.Program|ProfileItem/GetNVIDIAScreenPositions: Processing screen source index #0.|
2023-03-27 00:04:33.6277|TRACE|DisplayMagician.Program|ProfileItem/GetNVIDIAScreenPositions: Processing target screen ID:2147881090.|
2023-03-27 00:04:33.6277|TRACE|DisplayMagician.Program|ProfileItem/GetNVIDIAScreenPositions: The screen ID:2147881090 is NOT part of a cloned group.|
2023-03-27 00:04:33.6277|ERROR|DisplayMagician.Program|ProfileItem/GetNVIDIAScreenPositions: The screen width is 0 and it shouldn't be! Skipping this display id #2147881090.|
2023-03-27 00:04:33.6277|ERROR|DisplayMagician.Program|ProfileItem/GetNVIDIAScreenPositions: The screen height is 0 and it shouldn't be! Skipping this display id #2147881090.|
2023-03-27 00:04:33.6277|TRACE|DisplayMagician.Program|ProfileItem/GetNVIDIAScreenPositions: NVIDIA Screen 2147881090 is the primary monitor.|
2023-03-27 00:04:33.6407|TRACE|DisplayMagician.Program|ProfileItem/GetNVIDIAScreenPositions: Position of the taskbar on display 2147881090 is on the Bottom of the screen.|
2023-03-27 00:04:33.6407|TRACE|DisplayMagician.Program|ProfileItem/GetNVIDIAScreenPositions: (2) Added a non-surround NVIDIA Screen 2147881090 (3840x2160) at position 0,0.|
2023-03-27 00:04:33.6407|TRACE|DisplayMagician.Program|ProfileItem/GetWindowsScreenPositions: Position of the taskbar on display 4353 is on the Bottom of the screen.|
2023-03-27 00:04:33.6407|WARN|DisplayMagician.Program|ProfileItem/GetWindowsScreenPositions: Problem trying to get the position of the taskbar on primary display 4353. Assuming it's on the bottom edge.|
2023-03-27 00:04:33.6407|TRACE|DisplayMagician.Program|ProfileItem/GetWindowsScreenPositions: Added a new Screen  (0x0) at position 0,0.|
2023-03-27 00:04:33.6407|TRACE|DisplayMagician.Program|ProfileItem/GetNVIDIAScreenPositions: (3) Added a Windows Screen  (0x0) at position 0,0.|

As you can see above, it has Added a new Screen (0x0) at position 0,0 which shouldn't be right. This is also shown here later on in the log file:

2023-03-27 00:05:05.8197|WARN|DisplayMagician.Program|ProfileItem/GetWindowsScreenPositions: Problem trying to get the position of the taskbar on primary display 5120. Assuming it's on the bottom edge.|
2023-03-27 00:05:05.8197|TRACE|DisplayMagician.Program|ProfileItem/GetWindowsScreenPositions: Added a new Screen  (0x0) at position 0,0.|

I think this could be part of your issue.... I'll do some more digging, but I will probably ask you to test the video library separately with some other software I have specifically for testing the video libraries. . I'll have a bit more of a look and then I'll send through some instructions for testing the video libraries.

Thanks
Terry

@bolf51
Copy link
Author

bolf51 commented Mar 29, 2023

Sounds good

@terrymacdonald
Copy link
Owner

@bolf51 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
@terrymacdonald
Copy link
Owner

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

@bolf51
Copy link
Author

bolf51 commented Jan 23, 2024 via email

@terrymacdonald
Copy link
Owner

terrymacdonald commented Jan 23, 2024 via email

@bolf51
Copy link
Author

bolf51 commented Jan 23, 2024 via email

@terrymacdonald
Copy link
Owner

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

@bolf51, 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

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

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
Projects
None yet
Development

No branches or pull requests

2 participants