Comments (5)
This issue only occurs in beta2, beta 1 works as expected.
481 changed files with 15,759 additions and 6,408 deletions.
Could you bisect a bit further?
from avalonia.
This is what I got
eee71a62718653583f6b2e96f873a8f945701eaf is the first bad commit
commit eee71a62718653583f6b2e96f873a8f945701eaf
Author: Steven Kirk <[email protected]>
Date: Sat Apr 20 03:29:12 2024 +0300
Fix input starvation issues on resource-constrained devices. (#15137)
* Use 0.2 seconds for input starvation cutoff.
1 second was too long when running on resource-constrained devices.
* Allow input starvation code to run.
Using `ScheduleRender(true)` here prevented the input starvation code from running.
* Add DispatcherOptions.
And allow setting the input starvation timeout there.
src/Avalonia.Base/Media/MediaContext.Compositor.cs | 2 +-
src/Avalonia.Base/Media/MediaContext.cs | 13 ++++++++++---
src/Avalonia.Base/Threading/DispatcherOptions.cs | 21 +++++++++++++++++++++
3 files changed, 32 insertions(+), 4 deletions(-)
create mode 100644 src/Avalonia.Base/Threading/DispatcherOptions.cs
Edit: Adding this seems to make the deadlock less likely to happen (though it still can):
new DispatcherOptions { InputStarvationTimeout = TimeSpan.FromSeconds(10) }
from avalonia.
That particular PR has changed the way composition batches are being scheduled on the UI thread.
Are you sure that you aren't trying to call _mutex->AcquireSync
before the latest UpdateWithKeyMutexAsync
is completed?
from avalonia.
I. e. the input starvation logic can enforce all input to be handled before scheduled render pass. So if you aren't awaiting the latest task it would indeed result in a deadlock once that kicks in.
from avalonia.
Ok, I've gotten it fixed by ensuring the Task completed before attempting to render again.
I used the GpuInterop sample as reference for this and on the surface, the only place the LastPresent
task is used in the sample is in the Dispose method, I had to go hunting elsewhere to find that it is actually checked before another pass.
from avalonia.
Related Issues (20)
- iOS apps don't build HOT 1
- CPU usage is really high again... HOT 5
- DataGrid Adaptive exception HOT 6
- AutoCompleteBox not biding SelectedItem when using AsyncPopulator HOT 1
- Screen API refactoring HOT 5
- Android - Crash on bluetooth keyboard device connection and disconnection HOT 2
- [Linux] WindowStartupLocation does not respect DesktopScaling factor HOT 2
- [11.1-beta2] Regression: Window System buttons is not visible when `ExtendClientAreaToDecorationsHint="True"` HOT 2
- AccessViolationException when using RenderDoc on Windows HOT 1
- Copying of file not working as expected
- TabControl item headers go invisible after screen change
- Windows OpenGL FullScreen artifacts with popups and wrong mouse hittests HOT 3
- Double autocompletebox dropdown HOT 2
- Feature Request: Keep a single VkDevice alive per VkInstance so RenderDoc works HOT 1
- Using a string literal for a Label target provokes InvalidCastException when used in a ControlTemplate
- FluentTheme ignores TopLevel.ActualTransparencyLevel HOT 1
- Inconsistent Gesture event names HOT 1
- Consider unsealing the Render() of the Panel? HOT 6
- Alt codes do not produce expected characters
- "Call from invalid thread" process crash after tray icon menu item is invoked HOT 5
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 avalonia.