Skip to content
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

[1.5.0] Animation not rendering correctly on certain devices in release mode #87

Open
bbedward opened this issue May 9, 2019 · 14 comments

Comments

@bbedward
Copy link

bbedward commented May 9, 2019

Hi,

I recently started testing our app on a Galaxy J3 Luna Pro, Android 6.0.1, model is SM-S327VL - it's a 32-bit arm device.

Flutter doctor output:

[✓] Flutter (Channel stable, v1.5.4-hotfix.2, on Mac OS X 10.14.1 18B75, locale en-US)
    • Flutter version 1.5.4-hotfix.2 at /Users/bb/flutter/flutter
    • Framework revision 7a4c33425d (10 days ago), 2019-04-29 11:05:24 -0700
    • Engine revision 52c7a1e849
    • Dart version 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/bb/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
    • All Android licenses accepted.

[✓] Android Studio (version 3.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 31.3.1
    • Dart plugin version 181.5656
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[✓] Connected device (2 available)
    • SM S327VL     • ce07d026 • android-arm   • Android 6.0.1 (API 23)
    • ONEPLUS A6013 • bd101760 • android-arm64 • Android 9 (API 28)

Some of the animations we've been using in our app are not rendering correctly, here's one example:

IMG_20190509_095501

It stays as a static image like that, and animates in and out of 0-opacity

The animation is here: https://www.2dimensions.com/a/yekta/files/flare/natrium-welcome-animation

And we're simply using a FlareActor to render it:

FlareActor(
  "assets/welcome_animation.flr",
  animation: "main",
  fit: BoxFit.contain,
  color: StateContainer.of(context)
      .curTheme
      .primary,
),

Full source code is available at: https://github.com/appditto/natrium_wallet_flutter/blob/master/lib/ui/intro/intro_welcome.dart

The animation is rendering correctly on all the other devices that we have personally tested (OnePlus 6T, Pixel 2/3, iPhone 5S, iPhone 7, etc.) This is the only lower-end, 32-bit device we have to test with and it exhibits this issue.

This only occurs in release mode, and there's no errors reported anywhere in the logs.

Thanks

@bbedward bbedward changed the title [1.5.0] Animation not rendering correctly on certain devices [1.5.0] Animation not rendering correctly on certain devices in release mode May 9, 2019
@umberto-sonnino
Copy link
Contributor

Thanks for reporting, we'll try to look into it.
There was a Flutter bug reported a while back, that's been fixed since, this might a regression of it.

@bach942
Copy link

bach942 commented May 10, 2019

We are actually having the same issue. This only occurs on Android devices and only when in release mode (I've actually seen this on the emulator also). This started happening when we updated to the latest stable version of flutter (Never try releases during Google I/O).

What I've been able to figure out is that the animation seems to fade out, the large white diamonds (which we don't do in flare) and then you never see it again. We have one .flr file that has two animations on it. The first is normal then at the end of it, it fades out and the second animation never shows the large white diamonds. We are not doing anything special except using the completed callback to move to the next animation (that loops) calling set state.
Our environment:

[✓] Flutter (Channel stable, v1.5.4-hotfix.2, on Mac OS X 10.14.4 18E226, locale en-US)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 10.2.1)
[✓] Android Studio (version 3.4)
[✓] Connected device (2 available)

The build command:

flutter build apk -t lib/main_test.dart --release

The widget build:

@override
  Widget build(BuildContext context) {
    return Container(
      height: widget.height,
      width: widget.width,
      child: FlareActor(
        'assets/animations/Constellation_Reflect.flr',
        alignment: Alignment.center,
        fit: BoxFit.contain,
        animation: 'ConstellationBuildIn',
        callback: (currentAnimationName) {
          if (currentAnimationName == 'ConstellationBuildIn') {
            setState(() {
              _animationName = 'ConstellationLoop';
            });
          }
        },
      ),
    );
  }

The images of what it should look like and what it looks like when it's faded out (missing the large diamonds):
Screen Shot 2019-05-10 at 8 51 45 AM
IMG_0310

@luigi-rosso
Copy link
Contributor

@bach942 could you post the link to your file on 2dimensions.com? If it's a private file, could you email me a downloaded copy at luigi@2dimensions.com?

@bach942
Copy link

bach942 commented May 10, 2019

@luigi-rosso I've emailed you the .flr file that we are using.

@luigi-rosso
Copy link
Contributor

Thanks @bach942. Both of the files referenced in the issue are working on the Samsung S8 we're currently testing with (in both debug and release). I'll get my hands on a Nokia 6 a little later today and test there too.

@bach942
Copy link

bach942 commented May 10, 2019

@luigi-rosso hopefully this helps.. I was able to check our CI pipeline and narrow down when the issue started.. When everything worked we were on version v1.2.1 of flutter. Then 3 days ago v1.5.4-hotfix.2 was pushed to the stable branch and caused the issue to appear.

In our CI we had been downloading and installing 1.2.1 then running flutter upgrade (Which never had a change until then). This was the first time a new version was pushed to stable.

The list of flutter SDKs:
https://flutter.dev/docs/development/tools/sdk/releases

@bach942
Copy link

bach942 commented May 10, 2019

@luigi-rosso so I was able to use our current code with current versions of packages. flare_flutter v1.5.0 with flutter stable 1.2.1 and the issue disappeared (Which confirms somehow the latest stable version of flutter 1.5.4-hotfix-2 is causing the issue). I think I'll have to find out now from 1.2.1...1.5.4-hotfix-2 flutter version which caused the issue.

@artur-ios-dev
Copy link

artur-ios-dev commented May 14, 2019

I am having the same issue with my Wallet animation - https://www.2dimensions.com/a/artrmz/files/flare/wallet/preview

The body and bills are not visible in release mode on Android. So seems like some rectangles are not rendering properly.

Flutter: 1.5.4-hotfix-2
flare_flutter: 1.5.0
Devices: Huawei P8 Lite (tested on some other Huawei and had some issue as well, can't remember the model though)

@luigi-rosso
Copy link
Contributor

Sounds like the Flutter team cannot reproduce this on v1.6.1-pre.80:
flutter/flutter#32708 (comment)

Could someone with one of the devices exhibiting this problem give it a try? @artrmz @bach942 @bbedward @grandpa-guru

@luigi-rosso
Copy link
Contributor

Nevermind! They confirmed it's only reproduces on 32bit ARM.

@localpcguy
Copy link

localpcguy commented May 22, 2019

I was seeing this on 64bit ARM devices (both on a Pixel XL and a Pixel 3). I work with @bach942 so it is the same file and code sample that was submitted earlier. cc: @luigi-rosso

@rodydavis
Copy link

I have this same issue but just for Android and just for release mode. Happens on 64-bit devices too

@artur-ios-dev
Copy link

@AppleEducate It will be fixed once Flutter hits another stable version.

@rodydavis
Copy link

Ok cool 😎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants