Skip to content

[beta] Cherry pick fix GTK redraw call being called from non-GTK thread #173667

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

Open
wants to merge 1 commit into
base: flutter-3.35-candidate.0
Choose a base branch
from

Conversation

robert-ancell
Copy link
Contributor

@robert-ancell robert-ancell commented Aug 13, 2025

Cherry pick of #173602

Impacted users: All Linux users of Flutter
Impact Description: Due to calling gtk_window_redraw on a Flutter thread a lock up may occur. The Flutter app will then become unresponsive.
Workaround: No workaround
Risk: Low - fix is to run the GTK call on the GTK thread which is what the correct behaviour should be.
Test coverage: Rendering covered by existing tests, use of thread not explicitly tested, but #173660 opened to add this in future.
Validation Steps: Run test program in #173447 which generates many frames and maximizes the chance of a lock up.

gtk_widget_queue_draw is not thread-safe, call it from an idle callback.

Fixes flutter#173447
@robert-ancell robert-ancell requested review from a team and matanlurey as code owners August 13, 2025 00:05
@github-actions github-actions bot added a: tests "flutter test", flutter_test, or one of our tests a: text input Entering text in a text field or keyboard related problems platform-android Android applications specifically platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels. framework flutter/packages/flutter repository. See also f: labels. engine flutter/engine repository. See also e: labels. a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) platform-web Web applications specifically platform-linux Building on or for Linux specifically a: desktop Running on desktop f: integration_test The flutter/packages/integration_test plugin team-ios Owned by iOS platform team labels Aug 13, 2025
@robert-ancell robert-ancell changed the base branch from master to flutter-3.35-candidate.0 August 13, 2025 00:06
@flutter-dashboard
Copy link

This pull request was opened from and to a release candidate branch. This should only be done as part of the official Flutter release process. If you are attempting to make a regular contribution to the Flutter project, please close this PR and follow the instructions at Tree Hygiene for detailed instructions on contributing to Flutter.

Reviewers: Use caution before merging pull requests to release branches. Ensure the proper procedure has been followed.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request is a rollup of several changes, including a fix for a Linux window resize lockup, and a major refactoring of iOS device launching to support LLDB. The changes are generally high quality and well-tested. I have one suggestion to improve the new iOS launch logic by reducing code duplication and using the newly introduced launcher class more consistently.

Copy link
Contributor

@matanlurey matanlurey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Copy link
Member

@loic-sharma loic-sharma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@robert-ancell robert-ancell changed the title [beta] Cherry pick fix lock up when window resized with merged UI and platform threads [beta] Cherry pick fix GTK redraw call being called from non-GTK thread Aug 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) a: desktop Running on desktop a: tests "flutter test", flutter_test, or one of our tests a: text input Entering text in a text field or keyboard related problems engine flutter/engine repository. See also e: labels. f: integration_test The flutter/packages/integration_test plugin framework flutter/packages/flutter repository. See also f: labels. platform-android Android applications specifically platform-ios iOS applications specifically platform-linux Building on or for Linux specifically platform-web Web applications specifically team-ios Owned by iOS platform team tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants