Skip to content

Content Sizing Resize called on raster thread #181573

@mboetger

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)

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
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions