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

GDI object leak on right-click context menu #127

Closed
TReKiE opened this issue Jan 25, 2021 · 1 comment
Closed

GDI object leak on right-click context menu #127

TReKiE opened this issue Jan 25, 2021 · 1 comment
Labels

Comments

@TReKiE
Copy link

TReKiE commented Jan 25, 2021

Right-clicking the Volume² notification area icon creates more GDI objects and never releases them. Eventually, the per-process limit (10,000) is reached and the OSD will no longer come up, nor will Options, nor the built-in volume control UI (Standard regulator) function. The results are identical to the issues reported in #119.

Repro

  1. Open Task Manager
  2. Go to the Details (Win8+) or Processes tab
  3. Right-click on one of the columns, choose Select columns
  4. Find the GDI objects, select it and choose OK
  5. Click on the GDI objects field to sort
  6. Run Volume² if not already started
  7. Go to the notification area (system tray) and right-click on the Volume² icon
  8. Observe GDI objects for Volume2.exe rising
  9. Repeat right-clicking and watch the GDI objects value

Since no one wants to spend all day clicking, here is an AutoHotKey script to continuously right-click the icon, and an executable version if you don't have AutoHotKey handy. The script will begin immediately right-clicking upon startup.

Here's a sped up GIF showing this. It takes about 2 minutes normally:

Although the volume control part still works, since only two new GDI objects can be created, it can't create the OSD, the built-in volume control UI, nor the Options, as shown here:

  • Windows version: 10 (20H2 and 21296 [current insider dev])
  • Volume² version: 1.1.6.411 and 1.1.6.428

Additional
GDIView shows the vast majority of these objects as being bitmaps. Also, out of curiosity, why are 1,461 objects used at startup when nothing is on the screen? All the parts of the UI that the user interacts with are created later. I suspect this leak at initialization may be part of it as well.

@irzyxa
Copy link
Owner

irzyxa commented Jan 27, 2021

Fixed version 1.1.7.432

@irzyxa irzyxa closed this as completed Jan 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants