rive-flutter
rive-flutter copied to clipboard
Error:- Fatal signal 5 (SIGTRAP), code 1 (TRAP_BRKPT), fault addr
Description
I have migrated to the latest master branch of flutter for one of my apps which was also uses rive but I found that my app is crashing with an error Fatal signal 5 (SIGTRAP), code 1 (TRAP_BRKPT), fault addr 0x7712afa500 in tid 32050 (1.ui), pid 26471 (ample.test_rive)
after few seconds the rive animation starts. But this only happens with some assets. So, I tried the teddy example with some edits and found that it also crashed.
Steps To Reproduce
- Download the edited teddy animation from here riv-rev.zip.
- Upgrade to flutter master branch.
- Import the rive package and above asset into a new flutter project and replace the main.dart code with this:
import 'package:flutter/material.dart';
import 'package:rive/rive.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatelessWidget {
const MyHomePage({Key? key, required this.title}) : super(key: key);
final String title;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(title),
),
body: const SizedBox(
height: 200,
child: Center(
child: RiveAnimation.asset(
"assets/rive/animated_login_screen.riv",
),
),
),
);
}
}
- Let the animation run for a few seconds to crash app.
- See error ⚠️
I/Gralloc4(26471): Adding additional valid usage bits: 0x8202000
F/libc (26471): Fatal signal 5 (SIGTRAP), code 1 (TRAP_BRKPT), fault addr 0x7712afa500 in tid 32050 (1.ui), pid 26471 (ample.test_rive)
Lost connection to device.
Source .riv
/.rev
file
Expected behavior
Expected the animation to continue without crashing the app.
Device & Versions
- Device: Android Physical Device (Redmi Note 10 Pro)
- OS: Android 12
- Flutter Version:
Flutter 3.1.0-0.0.pre.2541 • channel master • https://github.com/flutter/flutter.git
Framework • revision f62ef93e06 (3 hours ago) • 2022-08-27 14:43:25 -0400
Engine • revision 9c54176218
Tools • Dart 2.19.0 (build 2.19.0-146.0.dev) • DevTools 2.16.0
Additional context
I faced this problem only in the master version of flutter.
Also, looking forward to knowing the reason for the crash.
Thank you.