Tyrrrz / LightBulb

Reduces eye strain by adjusting screen gamma based on the current time
MIT License
2.27k stars 141 forks source link

Crash with "SystemInvalidOperationException: DialogHost is already open." #242

Closed tomasz1986 closed 2 years ago

tomasz1986 commented 2 years ago

Version

ver 2.4.4 / Windows 10

Details

I've experienced this error several times in a row when playing around with display resolution and DPI scaling. I've got a dual monitor setup, and it appears to happen when changing those settings on the second display, although I can't be 100% sure, because the issue isn't exactly reproducible at will. It just seems to occur randomly after changing the resolution/DPI-related Windows settings.

This is what I see when the program crashes:

image

Then, after pressing "OK":

image

Next, Lightbulb crashes and needs to be restarted manually.

Steps to reproduce

Play around with monitor resolutions and DPI scaling with LightBulb running in the background. A multi-monitor setup may or may not be required. I apologise for a lack of more specific steps, which is due to being unable to reproduce the problem at will.

Tyrrrz commented 2 years ago

Can you please try the latest CI build to see if it fixed the problem?

tomasz1986 commented 2 years ago

Difficult to say for sure, but I've tried to change the DPI and resolution several times in a row, and the program didn't crash during the operation, so let's say that it's fixed 🙂.