-
Notifications
You must be signed in to change notification settings - Fork 222
Closed
Labels
Description
Rive Animation Freezing Issue Report
Issue Summary
Title: New Files created on editor v0.8.3243 are freezing in a few seconds on Android and Windows & on window resize on Windows
Environment Information
Flutter & Dart Version
[√] Flutter (Channel stable, 3.32.7, on Microsoft Windows [Version 10.0.26200.5710], locale en-IN)
[√] Windows Version (11 Home Insider Preview Single Language 64-bit, 25H2, 2009)
[√] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Build Tools 2022 17.14.2)
[√] Android Studio (version 2022.3)
[√] VS Code (version 1.102.1)
[√] Connected device (4 available)
[√] Network resources
Dependencies
- Rive Version:
^0.14.0-dev.3(Latest dev version) - Flutter UI Framework: Fluent UI
^4.12.0 - Target Platforms: Android, Windows
Rive Editor Version
- Editor Version: v0.8.3243
Problem Description
Symptoms
- Android Platform: Rive animations freeze after a few seconds of running
- Windows Platform:
- Animations freeze after a few seconds of running
- Additional freezing occurs on window resize events
- Timing: Issue appears consistently within seconds of animation start
- Scope: Affects new files created with Rive editor v0.8.3243
Current Implementation
The issue occurs in the StoreStage widget which loads a Rive animation:
// File: lib/screens/windows/store_module/store_stage.dart
final fileLoader = rive.FileLoader.fromAsset(
'assets/rive/dash.riv',
riveFactory: rive.Factory.rive,
);
return rive.RiveWidgetBuilder(
fileLoader: fileLoader,
builder: (context, state) => switch (state) {
rive.RiveLoading() => const Center(child: ProgressRing()),
rive.RiveFailed() => Center(/* Error handling */),
rive.RiveLoaded() => rive.RiveWidget(
controller: state.controller,
fit: rive.Fit.fill,
),
},
);Steps to Reproduce
Prerequisites
- Install Flutter 3.32.7 (stable channel)
- Add
rive: ^0.14.0-dev.3topubspec.yaml - Create a new Rive file using Rive editor v0.8.3243 with align taget on pointer move
- Set up a Flutter project targeting Android and/or Windows
Reproduction Steps
For Android:
-
Setup:
flutter create rive_test_app cd rive_test_app -
Add Rive dependency:
# pubspec.yaml dependencies: flutter: sdk: flutter rive: ^0.14.0-dev.3
-
Create assets folder:
mkdir assets mkdir assets/rive
-
Add Rive asset created with editor v0.8.3243 to
assets/rive/ -
Update pubspec.yaml:
flutter: assets: - assets/rive/
-
Implement the widget:
// Create a widget similar to StoreStage with RiveWidgetBuilder // Load the animation using FileLoader.fromAsset // Use RiveWidget with Fit.fill
-
Run on Android device:
flutter run -d android
-
Observe: Animation plays for a few seconds then freezes
For Windows:
-
Follow steps 1-6 from Android setup
-
Run on Windows:
flutter run -d windows
-
Test scenarios:
- Launch app and observe animation freezing after few seconds
- Resize window during animation playback
- Observe additional freezing on window resize events
Expected Behavior
- Rive animations should play smoothly and continuously
- Window resize events should not cause animation freezing
- Animations should maintain consistent performance across platforms
Actual Behavior
- Animations freeze after 2-5 seconds of playback
- Windows platform shows additional freezing on resize
- Issue is consistent across different devices and emulators
Additional Information
Project Structure
lib/
├── screens/
│ └── windows/
│ └── store_module/
│ └── store_stage.dart # Widget containing the Rive animation
assets/
├── rive/
│ ├── weather.riv # Main problematic animation file
│ ├── bg_test.riv
│ ├── dash.riv
│ ├── interactive_blur_waves.riv
│ ├── number4.riv
│ └── untitled.riv
Workarounds Attempted
- Tried different
Fitoptions (cover, contain, fill, etc.) - Tested with different Rive file formats
- Attempted manual controller management
- Tested on multiple devices/emulators