-
Notifications
You must be signed in to change notification settings - Fork 28.5k
[Google3 Bug]: App crash due to Flutter roll #168445
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
Comments
@letramygoogle This seems similar to #167489 which was fixed couple of weeks ago. If you could try with latest master version to see if it resolves ? |
Hi I have tried with the latest master version that's rolled into google3 and it seems that the issue is still reproducible. |
Output from fg3 doctor when running fg3 but built from source
|
The flutter tools issue is a red herring - unrelated to the crash being reported. letramygoogle is attempting to create a minimal repro now and will report back with more public info 🙏🙏🙏🙏🙏🙏 |
Pasting the stack trace here
|
Thanks for the logs, I'll keep the issue open and label for team's tracking based on the error report and log. |
Looks like it's probably this setState, based on the stacktrace:
And that gets called when the MaterialState changes, for example when hovering the button or something like that. Maybe that helps in tracking down a repro. |
The roll in the description only has 3 PRs... #167614 I think is the most likely culprit, but we can't know without more information to reproduce it. |
Attached the minimum reprod in cl/759384483 |
I was able to reproduce it only once. I still don't know how. EDIT: Finally able to repro on iOS simulator. tooltip.bug.repro.movSample codeimport 'package:flutter/material.dart';
void main() => runApp(const ReproApp());
class ReproApp extends StatelessWidget {
const ReproApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: InitialPage(title: 'Flutter Demo Home Page'),
);
}
}
class InitialPage extends StatelessWidget {
final String title;
InitialPage({Key? key, required this.title}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(title, style: TextStyle(fontFamily: 'ProductSans')),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text('Welcome to the Initial Page!'),
SizedBox(height: 20),
ElevatedButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => MyHomePage(title: 'Flutter Demo Home Page')),
);
},
child: Text('Go to Counter Page'),
),
],
),
),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key? key, required this.title}) : super(key: key);
final String title;
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
int _counter = 0;
void _incrementCounter() {
setState(() {
_counter++;
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title, style: TextStyle(fontFamily: 'ProductSans')),
),
body: Center(
child: Column( // Use Column to place multiple widgets vertically
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
'Button tapped $_counter time${_counter == 1 ? '' : 's'}.',
key: Key('CountText'),
),
SizedBox(height: 20), // Add some space
ElevatedButton(
onPressed: () {
// Navigate to the new DetailsPage
Navigator.push(
context,
MaterialPageRoute(builder: (context) => DetailsPage()),
);
},
child: Text('Go to Details Page'),
),
],
),
),
floatingActionButton: FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
),
);
}
}
class DetailsPage extends StatelessWidget {
const DetailsPage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Details Page', style: TextStyle(fontFamily: 'ProductSans')),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
'This is the details page!',
style: Theme.of(context).textTheme.headlineSmall,
),
SizedBox(height: 20),
ElevatedButton(
onPressed: () {
Navigator.pop(context);
},
child: Text('Go Back'),
),
],
),
),
);
}
} |
Confirmed, #167614 causes the bug. cc @rkishan516 who was the PR author. |
Yes @victorsanni, I think #168546 should be able to resolve this issue. Can you please test ? |
EDIT by @matanlurey: This has nothing to do with the Flutter tool, it was a red herring. See #168445 (comment).
Help us understand the severity of this issue
Steps to reproduce
Crash report: b/416159318
It seems that the culprit is this Flutter roll cl/753573741
Expected results
App doesn't crash
Actual results
App crashed
Code sample
Not adding a minimal repro as not sure what caused the crash
Screenshots or Video
Attached in b/416159318
Logs
Attached in b/416159318
Flutter Doctor output
The text was updated successfully, but these errors were encountered: