musescore / MuseScore

MuseScore is an open source and free music notation software. For support, contribution, bug reports, visit MuseScore.org. Fork and make pull requests!
https://musescore.org
Other
12.39k stars 2.68k forks source link

Musescore 4 crashes when moved to a new screen #24601

Open justinrf opened 2 months ago

justinrf commented 2 months ago

Issue type

Crash or freeze

Description with steps to reproduce

I have a Lenovo P16 laptop with an i9 processor and Intel graphics drivers (RaptorLake-S, Intel UHD - driver version 31.0.101.5590). I have 2 external monitors which run from a Lenovo docking station. Recently I updated the system, including the docking station firmware via the Lenovo Commercial Vantage app.

When I open Musescore 4 on the main laptop screen, it opens fine, and works. but if I move it to one of the external monitors it "crashes".

This was not a problem before I updated the system. It's worth pointing out that my main monitor and one of the external monitors are capable of 4K, but are set to 1920 X 1200 - but Musesocre crashes on the non-4K external monitor too.

The crash manifests by only resizing the wire frame around the app. The app background is frozen and if one resizes, the stuff behind the app in that monitor is visible. If I close Musescore on one of the external monitors, then reopen it, it comes up as only a wireframe. I can grab the top of the wireframe where the menus should be, and drag it to the main laptop monitor, and it seems to be ok.

OS: Windows 11 Version 2009 or later, Arch.: x86_64, MuseScore Studio version (64-bit): 4.4.1-242490810, revision: github-musescore-musescore-0b3dd00

Supporting files, videos and screenshots

.

What is the latest version of MuseScore Studio where this issue is present?

4.4.1-242490810

Regression

No.

Operating system

Windows 11

Additional context

This started happening AFTER I updated my system. I've updated Musescore at least twice since then. It seems not to like either my graphics driver, the docking station firmware, or both.

This is the only software on my system that has such an issue.

Checklist

bkunda commented 2 months ago

Can you please upload the diagnostic files as a .zip file here? (Go to Diagnostic > Save diagnostic files).

And just to clarify, this started happening after you updated your system (OS)? Did you ever encounter this issue with previous versions of MuseScore Studio (E.g. 4.3)?

justinrf commented 2 months ago

To be (semi) clear - I updated the drivers from Lenovo Commercial Vantage. That included the video drivers, but probably some other stuff too. It also updated the docking station firmware, but the OS was not updated - in as much as I'd consider an OS update to come from Microsoft.

I wondered if the issue was QT, but googling for other Windows apps developed in QT, I see Sibelius and Dorico are both using the QT creator platform, and both work on my system.

justinrf commented 2 months ago

MS4.zip

cbjeukendrup commented 2 months ago

All the crash dumps in this ZIP file appear to be from MS4.3.2. I looked at them nevertheless, and those crashes occur so deep inside Qt code and Windows code, that it is unlikely that we can do anything about it.

The absence of 4.4 crash dumps means that in 4.4.1 the process technically doesn't crash; it's rather the graphics that stops working (which seems to match your explanation).

The log files that are included are from 4.4.0 and 4.4.1; one or two of them mentioned something like this:

2024-09-05T14:11:48.191 | WARN  | 2704            | Qt              | Device loss detected in Present()
2024-09-05T14:11:48.191 | WARN  | 2704            | Qt              | Graphics device lost, cleaning up scenegraph and releasing RHI

In the Qt bug tracker, I found an issue about this: https://bugreports.qt.io/browse/QTBUG-101200 According to that issue, that would only happen at the moment that you left MuseScore running while updating graphics drivers.

So that gives us still no clue about what's happening. I do think it is likely to be a Qt bug; the difference between us and Dorico/Sibelius is that we probably use a different version, and we use (almost) only QML, while Dorico and Sibelius are mostly still QtWidgets, if I'm not mistaken. In a future update, we will switch to an even newer version of Qt (MuseScore 4.4 updated from Qt 5.15 to 6.2, and in 4.5 we'll probably update to Qt 6.8).

justinrf commented 2 months ago

Hi Caspar.

Thanks for this. I found some stuff regarding QTwidgets and Opengl, though nothing specifically mentions a fix. I found this, but I'm not sure if it's relevant.

https://forum.qt.io/topic/73255/qglwidget-blank-screen-on-different-computer/7

cbjeukendrup commented 2 months ago

Unfortunately, the fix from that post doesn't apply to Qt 6 anymore.

I see that I apparently haven't pointed you at https://github.com/musescore/MuseScore/pull/24644 yet. That PR may actually fix this issue, based on similar reports. See How to download test builds from pull requests for instructions how to test that PR.

justinrf commented 2 months ago

Workaround. Anyone with a similar system can disable this driver (Intel UHD Graphics). The disadvantage is that it stops you from being able to change the resolution of your main monitor, but the QT bug doesn't make itself known if you do this. Screenshot 2024-09-27 105723

cbjeukendrup commented 2 months ago

@justinrf Could you please try if this works correctly without workaround in the latest 4.4.3 nightly build? https://musescore.org/en/nightly-builds

justinrf commented 1 month ago

Unfortunately, that didn't work either - BUT I found a solution. It turns out the QT Widget bug in tandem with Intel graphics drivers can be fixed with the windows performance settings. What I did was go to System | Display | Graphics

Under Custom settings for applications, I hit the button marked Add desktop app. From there I navigated to C:\Program Files\MuseScore 4\bin and selected MuseScore4.exe

It comes up in the list as "Let Windows decide" I changed this to "High Performance (Intel(R) Arc(TM) Pro A30M Graphics)" and this caused everything to work properly on all monitors.

It seems that the "Let Windows decide" setting automatically sets power saving mode, and this mode causes all the problems.