Skip to content

Content Sizing Resize called on raster thread #181573

Closed

Description

@mboetger

Steps to reproduce

Start the new content sizing sample

Expected results

FlutterView resizes itself.

Actual results

The app crashes sometimes.

Logs

Logs

2026-01-27 15:27:52.280 18860-18882 flutter dev.flutter.example.androidView E [ERROR:flutter/fml/platform/android/jni_util.cc(206)] android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. Expected: main Calling: 1.raster (Ask Gemini)
at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:11023)
at android.view.ViewRootImpl.requestLayout(ViewRootImpl.java:2473)
at android.view.View.requestLayout(View.java:28020)
at android.view.View.requestLayout(View.java:28020)
at android.view.View.requestLayout(View.java:28020)
at android.view.View.requestLayout(View.java:28020)
at android.view.View.requestLayout(View.java:28020)
at android.view.View.requestLayout(View.java:28020)
at androidx.constraintlayout.widget.ConstraintLayout.requestLayout(ConstraintLayout.java:3605)
at android.view.View.requestLayout(View.java:28020)
at androidx.recyclerview.widget.RecyclerView.requestLayout(RecyclerView.java:4927)
at android.view.View.requestLayout(View.java:28020)
at android.view.View.requestLayout(View.java:28020)
at android.view.ViewGroup.onSetLayoutParams(ViewGroup.java:8112)
at android.view.View.setLayoutParams(View.java:20528)
at io.flutter.embedding.android.FlutterView$3.resizeEngineView(FlutterView.java:211)
at io.flutter.embedding.engine.FlutterJNI.maybeResizeSurfaceView(FlutterJNI.java:1335)

Activity

  1. self-assigned this
    on Jan 27, 2026
  2. added
    engineflutter/engine related. See also e: labels.
    platform-androidAndroid applications specifically
    c: crashStack traces logged to the console
    P1High-priority issues at the top of the work list
    on Jan 28, 2026
  3. github-actions commented on Feb 13, 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.

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

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listc: crashStack traces logged to the consoleengineflutter/engine related. See also e: labels.platform-androidAndroid applications specificallyteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions