Comments (11)
@robmikh
Ok, I'm almost certain what you said is indeed the issue.
Did a loop that's only doing -
GraphicsCaptureItem item = CaptureHelper.CreateItemForWindow(client.WindowHandler);
Every 100ms to speed up the process.
After a few minutes, my Windows Start menu is completely bugged, sometimes works, and sometimes takes 15 seconds to open.
The calculator app also.
Closing my App doesn't fix the issue as I mentioned before, a restart of the PC is required.
Maybe restarting explorer.exe would do the trick? I'll test .
edit -
Restarting explorer.exe also works.
from windows.ui.composition-win32-samples.
@robmikh
Ya, ran it for a few minutes and my explorer died completely.
from windows.ui.composition-win32-samples.
Not sure yet, I'll have to debug it on Monday.
from windows.ui.composition-win32-samples.
The GraphicsCaptureItems are backed by shell objects, it's conceivable that there's an issue that has down stream effects on explorer. But I haven't seen this reported.
It would be interesting to know whether keeping the GraphicsCaptureItems around instead of creating new ones mitigates the issue at all.
I'll see if I can repro when I get some time.
from windows.ui.composition-win32-samples.
I'll try to implement your suggestion, creating a single instance of GraphicsCaptureItems per window and keeping those in memory instead of recreating an item on every iteration.
Kind of hard to debug as this issue might take hours to reproduce, can't pinpoint it yet...
Will try reducing the interval time to speed-up the process guessing that's what causing the issue.
If you get the chance to repro and confirm I'd appreciate it if you can let me know.
Thanks
from windows.ui.composition-win32-samples.
@robmikh
Just an update, I've tested it during the night with 5 instances of GraphicsCaptureItem without recreating them. (using the screenshot service I shared above)
It's not as bad but the issue still occurs.
Start Menu/Calculator lags, etc.
So basically I can't see a workaround that lets me use this API without telling my users they need to restart their explorer.exe every 24h ><"
Please let me know if you can think of a hotfix/workaround that I might be able to upload until a fix is provided.
Thanks
from windows.ui.composition-win32-samples.
I think I'm able to repro, but just to be sure can you try running this code and see if it reproduces your issue after a few minutes? https://github.com/robmikh/manyitemstest
You'll need to use CTRL+C to exit it.
from windows.ui.composition-win32-samples.
Does this also explain why the last test I did (5 instances without recreating) also caused explorer.exe to lag after a while?
from windows.ui.composition-win32-samples.
Hey Rob,
Can I ask for an update and if you can provide an ETA by any chance?
So that I can plan ahead and understand if I can wait for a fix or if I have to develop a fix with the old capture approach using user32.dll as my app is currently live and customers Explorer is dying lol
from windows.ui.composition-win32-samples.
Sorry but I have no ETA at this time. You may want to roll back if the issue is pressing.
from windows.ui.composition-win32-samples.
Got it, nothing to roll back to, the app was built around this API.
Would appreciate an update once there is one so I can forward it to my customers, thanks.
from windows.ui.composition-win32-samples.
Related Issues (20)
- Cannot use IGraphicsCaptureItemInterop::CreateForWindow with electron apps HOT 6
- This repo is missing important files HOT 4
- How to capture Windows10/11 Virtual Desktop via Windows.Graphics.Capture ? HOT 2
- Accessing screen capture image bytes with MapFlags.DoNotWait for better CPU usage HOT 3
- Can I do successive captures on two different windows HOT 8
- ScreenCapture Sample - write capture stream to disk mp4? HOT 5
- Capture area of a monitor HOT 4
- Memory Leak? HOT 5
- BSODs on 4 separate Hard Drives HOT 3
- Capture OnFrame Callback very slow on Win11 23H2 HOT 7
- access_denied in CreateForMonitor in some cases HOT 5
- Cannot catch errors in CreateCaptureItemForWindow HOT 3
- WGC CaptureFrame returns wrong SystemRelativeTime in window capture mode HOT 2
- Cursor may become invisible when recording some fullscreen games using WGC HOT 7
- Frame has issue after change window state (maximize from normal/ normal from maximize/ ...) HOT 1
- ScreenCaptureforHWND sample leaks handles leading to "Out of memory" crash HOT 1
- ScreenCaptureforHWND sample main thread hang HOT 2
- ScreenCaptureforHWND: How to get the byte data of the captured frame? HOT 4
- CreateForWindow 0x80070057 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from windows.ui.composition-win32-samples.