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

[PTRun] System.Runtime.InteropServices.COMException: {Desktop composition is disabled} #31226

Open
AlexDeMoura opened this issue Feb 1, 2024 · 19 comments
Assignees
Labels
Issue-Bug Something isn't working Needs-Repro We can't figure out how to make this happen. Please help find a simplified repro. Needs-Team-Response An issue author responded so the team needs to follow up Priority-1 Bug that is high priority Product-PowerToys Run Improved app launch PT Run (Win+R) Window

Comments

@AlexDeMoura
Copy link

Microsoft PowerToys version

0.78.0.0

Installation method

PowerToys auto-update

Running as admin

Yes

Area(s) with issue?

General

Steps to reproduce

When I was choosing a font in the font menu of Excel, the screen went dark for one second or something, and it came back showing this window: Power Toys Run ran into an issue. Something went wrong. The attached log contents:
2024-02-01.txt
The following software was running under an updated Windows 10 (8 MB RAM, 18 GB fixed VM, GPU0 Intel HD 530, GPU1 NVidia not active):

  1. One File Explorer window in the folder containing the Excel file I was working on;
  2. One Opera One (version: 105.0.4970.34) densely tabbed window, with Update stream: Stable, under System: Windows 10 64-bit (WoW64), and Chromium version:119.0.6045.199 - Browser identification: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 OPR/105.0.0.0 - Installation type:
    Stand-alone installation (USB), but the opera is installed in a C: folder (I love portable stuff, you know - portable means freedom);
  3. One Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17318.20000) 64-bit running a single <70 KB file in a C: folder;
  4. Background software running in Taskbar: PowerToys 0.78.0.0 (updated yesterday) and five more apps. OneDrive, Webroot anti-virus, f.lux v4.131 (screen brightness management), and two Lenovo hardware monitors (bundled software);
  5. Plus, a lot of stuff in Task Manager that I don't care and it is too much to post here, but it includes at least a bunch of Adobe processes and a half dozen MS Edge processes, even if the Acrobat, Photoshop, and Edge browser are not in use. By the way, MS Edge is the default browser - but I am not a great fan. I like Opera Portable better.

The fonts menu in Excel contains many Asian fonts, mainly Hebraic versions of the most common MS Office fonts. I was choosing one of them (Arial, Calibri, or Roboto) for a single cell.
The screen background contains a static picture (no Slideshow) from the Pinnula Dynamic Theme (background management, last version) installed from the Microsoft Store.

✔️ Expected Behavior

Such things shouldn't be happening. It gives me the creeps and sometimes a heart attack. But I like the PowerToys so much, I don't want to uninstall it. The ones I use the most are (in this order):

  1. Text Extractor: a lot, but with limited capability of Microsoft OCR Packs (please give me my Tesseract) - ORP files, two installed: English and Portuguese - both are just... fair;
  2. PowerRename: powerful, despite I hate REGEX with all my guts - I do NOT care what Chomsky said about it - I consider this "language" as LASHEMO (LAzy SHorthand for English MOnoglots). Down with ASCII and its keyboards - welcome UNICODE! Long live the REPUBLICA and the Excel functions, the world's only translatable computer language, but the MS ORPs can't recognize those functions as a text to be OCRed - go figure. I would use an 'extended' MS-DOS BATCH language mixed with some old BASIC string functions and maybe some well-known Excel string functions, but that is me. No need to change - but some numbering (01, 02, ...) or alphabetic itemization (a., b., ...) without using REGEX I think it is necessary;
  3. Color Picker: nice - a loveable one. It needs a few more features to become perfect, such as optional picker areas larger than a single pixel - I suggest 8-around-1 and 16-around-9 - and a few more standard color libraries such as Munsell for painting, the European/German RAL mainly used in varnish, powder coating, and plastics, and the IEC 60062:2016 RKM code for electronic components. The world was not made for software developers only, you know.
  4. Shortcut Guide: it is OK, but why is it limited to [WIN] key's functions only on a single screen? Why combinations aren't available while the Shortcut Guide is ON the screen? Such as, after the Shortcut Guide shows, press [SHIFT] and all [SHIFT]+[WIN] functions appear, press [ALT] and all [ALT]+[WIN] functions show up, press [CTRL] and we have all [CTRL]+[WIN] functions on the screen, and so on - but the thing vanishes with any key pressed or any mouse click.

Is there any Browser Selector (by link, domain, or user's choice) in your roadmap? Or is it against THE company's policy?

Am I asking too much? I appreciate your work, but you guys opened Pandora's box - it was full of users' wishes.

❌ Actual Behavior

Thank God the computer didn't freeze this time, but it already happened once this year. I didn't lose the work - I continued to work on the Excel spreadsheet. No other app was closed - however, I had to restart Excel since its visual elements and components, such as buttons, menus, bars, and a few others, went black or empty (with their background color only).

Thanks for your excellent work, and best regards.

Other Software

No response

@AlexDeMoura AlexDeMoura added Issue-Bug Something isn't working Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Feb 1, 2024
@jaimecbernardo jaimecbernardo added the Product-PowerToys Run Improved app launch PT Run (Win+R) Window label Feb 1, 2024
@jaimecbernardo jaimecbernardo added this to To do in 0.79 Release via automation Feb 1, 2024
@jaimecbernardo
Copy link
Collaborator

[2024-02-01 00:10:25.7737] [FATAL]

Exception

System.Runtime.InteropServices.COMException: {Desktop composition is disabled} The operation could not be completed because desktop composition is disabled. (0x80263001)
   Source: PresentationFramework
   TargetAssembly: PresentationFramework, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
   TargetModule: PresentationFramework.dll
   TargetSite: Void DwmExtendFrameIntoClientArea(IntPtr, Standard.MARGINS ByRef)
   at Standard.NativeMethods.DwmExtendFrameIntoClientArea(IntPtr hwnd, MARGINS& pMarInset)
   at System.Windows.Shell.WindowChromeWorker._ExtendGlassFrame()
   at System.Windows.Shell.WindowChromeWorker._UpdateFrameState(Boolean force)
   at System.Windows.Shell.WindowChromeWorker._HandleDwmCompositionChanged(WM uMsg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Shell.WindowChromeWorker._WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Environment

  • Command Line: C:\zz\D\Util\PowerToys_user\PowerToys.PowerLauncher.dll -powerToysPid 12720 --started-from-runner
  • Timestamp: 02/01/2024 00:10:25
  • Wox version: 0.78.0.0
  • OS Version: Microsoft Windows NT 10.0.19045.0
  • IntPtr Length: 8
  • x64: True
  • CLR Version: 8.0.1
  • Installed .NET Framework:
    • v2.0.50727 2.0.50727.4927 SP2
    • v3.0 3.0.30729.4926 SP2
    • v3.5 3.5.30729.4926 SP1
    • v4 Client 4.8.09037
    • v4 Full 4.8.09037
    • v4.0 Client 4.0.0.0

@jaimecbernardo jaimecbernardo added the Needs-Repro We can't figure out how to make this happen. Please help find a simplified repro. label Feb 1, 2024
@davidegiacometti
Copy link
Collaborator

This is a duplicate of #30507

@gokcekantarci
Copy link
Collaborator

/needinfo

Hi,
Desktop composition should always be enabled.
https://learn.microsoft.com/en-us/windows/win32/dwm/wm-dwmcompositionchanged

I tried to force PTRun with some benchmark and stress tests but I couldnt reproduce it. Can you share your machine specs to check and compare?

I also found same issues in other apps too.
https://forums.bohemia.net/forums/topic/217460-computer-keep-crashing-and-here-is-the-log-error-can-someone-help/
https://itecnote.com/tecnote/c-desktop-composition-is-disabled-error/

Does this issue still persist? If so, please share the Task Manager screenshot with GPU priority and /bugreport to check PTRun settings you have.

Also please update your graphics card driver and try again.

Thanks,

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Feb 5, 2024
@AlexDeMoura
Copy link
Author

AlexDeMoura commented Feb 5, 2024 via email

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams Needs-Team-Response An issue author responded so the team needs to follow up and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Feb 5, 2024
@AlexDeMoura
Copy link
Author

AlexDeMoura commented Feb 5, 2024 via email

@Jay-o-Way
Copy link
Collaborator

Please update issue title to be more specific? :)

@AlexDeMoura
Copy link
Author

AlexDeMoura commented Feb 6, 2024 via email

@Jay-o-Way
Copy link
Collaborator

That's okay. Maybe one of the core people can :⁠-⁠)

@gokcekantarci gokcekantarci changed the title Power Toys Run ran into an issue. Something went wrong. [PTRun] System.Runtime.InteropServices.COMException: {Desktop composition is disabled} Feb 7, 2024
@Frooastside
Copy link

I have the same issue and it happened while installing a new Graphics Driver for my Intel Arc A770, maybe his graphics card that is not active still got some update or something like that

@chryscrz
Copy link

Hello had the same error message regarding desktop composition:

Version: 0.77.0.0 OS Version: Microsoft Windows NT 10.0.22631.0 IntPtr Length: 8 x64: True Date: 2/16/2024 10:28:43 Exception: System.Runtime.InteropServices.COMException (0x80263001): {Desktop composition is disabled} The operation could not be completed because desktop composition is disabled. (0x80263001) at Standard.NativeMethods.DwmExtendFrameIntoClientArea(IntPtr hwnd, MARGINS& pMarInset) at System.Windows.Shell.WindowChromeWorker._ExtendGlassFrame() at System.Windows.Shell.WindowChromeWorker._UpdateFrameState(Boolean force) at System.Windows.Shell.WindowChromeWorker._HandleDwmCompositionChanged(WM uMsg, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Shell.WindowChromeWorker._WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Happened while switching screens from HDMI to internal on my laptop (Ryzen CPU, AMD graphics).
Apparently the video driver crashed (timed-out) as well.

@AlexDeMoura
Copy link
Author

Guys, sorry for the inconvenience. Yesterday the PowerToys finally reached update 0.81, a version that, at least, I was waiting for with some anxiety. I read the 'What's new' carefully, and in addition to a new utility and several improvements, it seems that the topics covered refer more to version 0.80 bug fixes.

The 'crash issue' reported in this thread (#31226) is on the 0.81 'To Do' list, but I can't say it has been completely resolved - I believe it requires a more complex solution - or set of solutions.

Is there any expected date or version for solution #31226? And if so, update the 'To Do'.
Please let us know if any more information can be provided to help find a solution. I trust in your ability to resolve this issue once and for all.
Many thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug Something isn't working Needs-Repro We can't figure out how to make this happen. Please help find a simplified repro. Needs-Team-Response An issue author responded so the team needs to follow up Priority-1 Bug that is high priority Product-PowerToys Run Improved app launch PT Run (Win+R) Window
Projects
Status: No status
Status: No status
Development

No branches or pull requests