rive-app / rive-app/rive-flutter

Crash happens when using rive flutter latest version and run it on windows machine release mode

Open
#592 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Dart
Stars
1.5k
Forks
240
PR merge metrics
No merged PRs in 30d

Description

Rive Flutter Windows GPU Crash Issue

Description

On Windows (x64), using the Rive Flutter runtime rive: 0.14.0, the app crashes in Release on machines with dedicated GPUs (but not on machines with integrated GPUs) when rendering .riv animations with Factory.flutter. The crash manifests as native heap corruption (0xC0000374) and access violations.

Rive docs mention the latest runtime is published as 0.14.0-dev.x and recommend using the latest dev for newest fixes/features. Changelog notes include prior Windows crash fixes (e.g., issue #529) and Windows debugging symbol improvements. rive_native changelog also references "Fixed a crash when using the Flutter renderer" and allowing native to work even if the Rive Renderer context doesn't initialize.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Create a new Flutter project and enable Windows desktop.
  2. Add rive: 0.14.0 to pubspec.yaml.
  3. Add any .riv file to assets/ and include it in pubspec.yaml.
  4. Run on a Windows machine with a dedicated GPU (NVIDIA/AMD) in Release.
  5. Render the .riv using Factory.flutter (example below).
  6. App eventually crashes with native heap corruption (0xC0000374) / access violations. On integrated GPU machines, it does not reproduce.
Minimal code:
import 'package:flutter/material.dart';
import 'package:rive/rive.dart';

void main() {
  runApp(const MaterialApp(home: Scaffold(body: Center(child: Demo()))));
}

class Demo extends StatelessWidget {
  const Demo({super.key});
  @override
  Widget build(BuildContext context) {
    return RiveAnimation.asset(
      'assets/sample.riv',
      fit: BoxFit.contain,
      factory: Factory.flutter,
    );
  }
}

Expected behavior

Factory.flutter should render reliably on Windows (including on dedicated GPU machines) without native heap corruption crashes.

Screenshots

N/A (crash / blank output). Can provide screen recording if needed.

Device & Versions

Device: Windows desktop (x64)

OS: Windows 11 (ntdll.dll 10.0.26100.6899; seems like 24H2)

GPU:

  • Works: Integrated GPU machines (e.g., Intel iGPU)
  • Crashes: Dedicated GPU machines (e.g., NVIDIA/AMD dGPU)

(Will add exact GPU model(s) + driver versions)
Testing on: Nvidia RTX 3050

Flutter Version: 3.35.7

Rive Version: rive: 0.14.0 (pub.dev)

Additional context

With --no-enable-impeller, crash presents as:

  • Faulting module: ntdll.dll
  • Exception code: 0xc0000374 (heap corruption)

WinDbg stack (k) shows heap corruption detected during RtlFreeHeap, with frames involving Flutter's GPU texture path and rive_native:

flutter_windows!InternalFlutterGpu_Texture_AsImage
rive_native!enableFallbackFonts+... (symbol name; project has no text in the .riv files)

Earlier also observed:

Exception thrown at ... (rive_native.dll) ... 0xC0000005: Access violation reading location 0x00000000FFFFFFF7

on dGPU machines.

If helpful, I can attach the full crash dump + WinDbg output.


Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Release-mode crash with the provided minimal Flutter example on a Windows machine with an NVIDIA or AMD GPU, then inspect the WinDbg output and crash dump around flutter_windows GPU texture handling and rive_native. Done means Factory.flutter renders the .riv animation reliably without heap corruption or access violations on dedicated GPUs.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
computer-graphics, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.