Skip to content

[Windows] Local engine rendering stalls without input when UI/platform threads are merged #192513

Closed

Description

@KevMCarp

When running local builds of the windows engine the UI stalls unless there in input in the application window (touch, mouse or pen).

I've tried multiple revisions between master and a804b26.

Steps to reproduce

  1. On Windows follow the instructions on setting up the engine development environment.

  2. Sync dependencies gclient sync -D

  3. Build the engine et build --config host_release.
    host_debug will also work but is less severe.

  4. Run a Flutter Windows app using the local engine:

import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Spinny',
      theme: ThemeData.light(),
      darkTheme: ThemeData.dark(),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(body: Center(child: CircularProgressIndicator()));
  }
}

flutter run -d windows --release --local-engine host_release --local-engine-host host_release

  1. Let the app sit idle without moving the mouse, touching the window, or using pen input.

Expected results

The app should continue rendering frames normally while the window is idle.

Screen.Recording.2026-09-09.220714.mp4

Actual results

With the locally built engine, rendering only appears to progress when there is window input, such as mouse movement, touch input, or pen movement.

In release mode, the app can appear completely stalled when there is no input. Moving the mouse or otherwise generating input causes rendering to resume.

In debug/unoptimized builds, the issue is less severe but the UI appears choppy.

Screen.Recording.2026-09-07.200018.mp4

Additional context

Rebuilding without merged threads causes the app to render as expected.

  // main.cpp
  flutter::DartProject project(L"data");
  project.set_ui_thread_policy(flutter::UIThreadPolicy::RunOnSeparateThread);

This appears to be a latent issue in the Windows merged UI/platform thread scheduling path that is surfaced by locally building the engine with a different Windows toolchain than the official prebuilt artifacts.

The same engine revision works when using the official prebuilt Flutter 3.47.2 Windows engine artifact, but a locally built engine at the same revision stalls unless merged threads are disabled.

Windows 11 Pro 23H2
OS Build 22631.6199
MSVC 14.51.36231

Activity

  1. puneetkukreja98 commented on Sep 10, 2026

    @puneetkukreja98
    Contributor

    @KevMCarp Thanks for reporting this. I have not been able to verify the issue, as I don't currently have the windows local engine env on my machine. Routing this to team-windows for further investigation.

  2. added
    engineflutter/engine related. See also e: labels.
    team-windowsOwned by the Windows platform team
    and removed
    in triagePresently being triaged by the triage team
    on Sep 10, 2026
  3. mattkae commented on Sep 23, 2026

    @mattkae
    Contributor

    @KevMCarp Can you try it with current main? There has been a fix in the runloop that could have caused this: #193181

  4. KevMCarp commented on Sep 27, 2026

    @KevMCarp
    Author

    Yeah, this is working for me now.

  5. added a commit that references this issue on Oct 8, 2026
  6. github-actions commented on Oct 11, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  7. locked as resolved and limited conversation to collaborators on Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: desktopRunning on desktopengineflutter/engine related. See also e: labels.team-windowsOwned by the Windows platform team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions