-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Widget rendering strange since Flutter update #28484
Comments
Can you please provide a minimal runnable reproduction |
This page using custom font, and image asset. What can I do? Here is page file // splash-screen.dart
import 'dart:async' show Timer;
import 'dart:io' show Platform;
import 'package:flutter/material.dart';
import 'package:flutter_redux/flutter_redux.dart';
import 'package:flutter_statusbarcolor/flutter_statusbarcolor.dart';
import 'package:google_sign_in/google_sign_in.dart';
import 'package:maat_pick/redux/application-state.dart';
import 'package:maat_pick/redux/auth/auth-middleware.dart';
class SplashPage extends StatefulWidget {
@override
SplashPageState createState() => SplashPageState();
}
class SplashPageState extends State<SplashPage> {
GoogleSignInAccount _googleAccount;
@override
void initState() {
super.initState();
Timer(new Duration(seconds: 1), () => checkLogin(context));
if (Platform.isIOS) {
FlutterStatusbarcolor.setStatusBarWhiteForeground(true);
} else {
FlutterStatusbarcolor.setStatusBarColor(Colors.transparent);
FlutterStatusbarcolor.setStatusBarWhiteForeground(true);
}
}
@override
Widget build(BuildContext context) => Scaffold(
body: Container(
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [const Color(0xffff3fba), const Color(0xffff971f)],
)),
child: Stack(
children: <Widget>[
Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Image.asset(
'assets/icons/icon_splash.png',
width: 160,
),
Padding(
padding: const EdgeInsets.only(top: 16.0),
child: Text(
'맛픽',
style: TextStyle(
fontFamily: 'SongMyung',
fontWeight: FontWeight.normal,
fontSize: 64,
color: Colors.white),
),
),
Padding(
padding: const EdgeInsets.only(bottom: 40),
child: Text(
'ma’at pick',
style: TextStyle(
fontFamily: 'Oswald',
fontWeight: FontWeight.normal,
fontSize: 36,
color: Colors.white),
)),
],
),
),
Container(
alignment: Alignment.bottomCenter,
padding: const EdgeInsets.only(bottom: 50),
child: SizedBox(
width: 160,
height: 3,
child: DecoratedBox(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(const Radius.circular(8.0))),
child: LinearProgressIndicator(
backgroundColor: Color(0x4dffffff),
valueColor: AlwaysStoppedAnimation<Color>(
Colors.white)))),
)
],
)),
);
void checkLogin(BuildContext context) async {
// check login logic
}
} |
Thanks! |
I separate the screen with the problem and tested it. Attach video. -- So I did a test. Remove image widget Image.asset(
'assets/icons/icon_splash.png',
width: 160,
), It didn't happen!! And add image widget > happening again. Attach reduced project file. |
Could you please check if you can reproduce with
There was a related fix recently and I don't know if it is included in
|
I was not able to reproduce
but I have not tried iOS |
I change flutter master channel.
Tested on multiple devices. iOS 12.1.4 > Strange widget rendering Android 9 (Pie) > No problem |
@dsa28s does this happen in release builds too, or just debug builds (debug builds use software rendering instead of GPU rendering)? |
What device models did the bug reproduce on? I tried running this using the Flutter master branch on an iPhone 6, iPhone 6S, and iPhone SE. The sample app appeared to render correctly on each of these devices. |
@dsa28s Is that in the simulator or on a real device or both? |
I just now, updated the Flutter master channel.
Now, It's not a rendering error, it's just a little weird for a second, and rendered normally. iPhone Xs (iOS 12.1.4) Android > Work perfectly. Not tested simulator. |
Also these: |
I used to |
I am from #29289 |
@liyuqian Just curious, in this context, please what is CCPR in full? |
CCPR = Coverage Counting Path Rendering, a new vector path rasterization algorithm on GPU. Its main issue (which is shared by many new algorithms) is skbug.com/6886 (not the glitch here; the glitch here is most likely caused by GPU drivers and probably bugs in their OpenGL implementations). |
The recent upgrade of the Flutter master channel. Removing the png image, does not reproduced. I'm looking at the engine code in case it helps, but it's too complicated. Sorry I didn't help a lot. Flutter version:
|
@xster What is that mean label |
I am also having this issue with iOS. Got an app rejected from the App Store due to this reason. I unfortunately don't have much more info other than this screenshot, and that it seems to be very much related to everyone else having this same issue, but I can provide as much info as I can if you can point me to the right direction. This image was sent to me by the Apple App Store Review team member I am not at my machine at the moment and can't show my flutter doctor/version output, but will update this comment or attach those when I get home. I have not yet tried building with the master branch, but I am also not able to reliably reproduce this. It happens some times, but not others which makes it really hard to see if switching to the master branch actually helped, or I just got lucky on a few runs. Either way, I would like to help as much as I can to diagnose this issue so if anyone has some tips on how they've reproduced this bug, please let me know and I'll try to do the same on my machine and see what I can find out! |
@abogdanovich1 this issue should be fixed on the master channel - can you see if you can reproduce on that channel? |
@tvolkert I will try my best, but as I said in my last comment I'm not even sure how to reliably reproduce it on the Stable channel. I'm gonna attempt to get the issue to pop up at least somewhat reliably in my current build, and switch to master to see if issue goes away. I'll report back what I find out! Edit (3/29/19): Launched app on iPhone, and got the glitch again (Stable Channel). Spent the next hour trying to reproduce, to no avail. Switched to master channel, rebuilt the release app, and resubmitted to App Store. Fingers crossed the glitch is gone, or the testers don't encounter it lol. |
After switching to the master channel, I was able to get my app through the review process. Unfortunately, I cannot fully confirm that the bug is fixed, as I was still not reliably able to reproduce the issue prior to switching to master. When I launched the app once, it glitched immediately upon logging in, but following the exact same steps 23 times afterwards did not trigger the glitch. @michalsuryntequiqo have you found a way to get this to happen every time if you're using one of the problematic flutter builds? |
@abogdanovich1 Nope. Using problematic Flutter's versions it works unpredictable and nondeterministic. Sometimes it works fine, sometimes glitches - the same both when debugging app and in the release mode (deployed via TestFlight). |
Also my bug is not present in v1.1.8 #30565 |
This is happening to me too on iOS Production Releases for Flutter 1.2, i will attach screenshots and logs but it's kinda the same issue everyone here is having. Please note i did create my project using the -i swift flag (Swift) and i'm using the custom embedded views for Google maps; also i'm using Fontawesome icons and flare. |
Flutter 1.2 still has CCPR enabled. CCPR was disabled in Flutter 1.4.0 so please try to see if the issue is still in 1.4.0 or in the master branch. If the issue can still be reproduced in 1.4.0 or master, then getting an SKP screenshot by |
Also, the CCPR's glitch was introduced around 01/07/0219 (https://skia.googlesource.com/skia.git/+/351e80cc28ff6fff947d4272f4792e40615f07ed) so v1.18 (released on 01/08/2019, which probably didn't pick up Skia's change on 01/07 yet) and earlier versions are expected to not have such glitches. |
Switch to flutter channel "master" resolved my issue. Just followed below steps: |
We think this thread described two issues:
CCPR has been disabled and the iOS issue fixed. Closing. |
Can you provide a specific version number of the Flutter that has solved this problem? Thank you. |
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 |
Hello.
I using the Flutter beta channel, widgets rendered as shown in the picture below after updating from 1.1.8 to 1.2.1.
↓ This screenshot flutter version > beta channel v 1.2.1
↓ This screenshot flutter version > beta channel v 1.1.8 (before update)
Platform : iOS
(Current) Here is my flutter information:
The text was updated successfully, but these errors were encountered: