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

RangeError (index): Invalid value: Valid value range is empty: 0 #356

Closed
sheetalsavani opened this issue Jan 6, 2024 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@sheetalsavani
Copy link

sheetalsavani commented Jan 6, 2024

Description

There is an error when trying to load the rive file also throws out of memory sometimes

Steps To Reproduce

Steps to reproduce the behavior:

  1. Create a new project
  2. Using rive: ^0.12.4 and copy below code
class _MyHomePageState extends State<MyHomePage> {
  Artboard? _riveArtBoard;
  StateMachineController? _controller;

  @override
  void initState() {
    _initArtBoard();
    super.initState();
  }

  Future<void> _initArtBoard() async {
    if (_riveArtBoard == null) {
      final riveByteData = await rootBundle.load("assets/rive/all_animations.riv");
      RiveFile riveFile = RiveFile.import(riveByteData);
      _riveArtBoard = riveFile.mainArtboard;
    }

    _controller = StateMachineController.fromArtboard(_riveArtBoard!, "buddy-V2") as StateMachineController;

    _controller!.isActive = true;
    _riveArtBoard!.addController(_controller!);

    if (mounted) {
      setState(() { });
    }
  }

  @override
  void dispose() {
    _controller?.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text("Rive Animation"),),
      backgroundColor: Colors.white,
      body: _riveArtBoard == null
          ? const Center(
              child: CupertinoActivityIndicator(
                color: Colors.black,
              ),
            )
          : Rive(
            artboard: _riveArtBoard!,
            fit: BoxFit.contain,
            useArtboardSize: true,
          ),
    );
  }
}
  1. run above code will throw error
image

Source .riv/.rev file

all-animations.riv.zip

Expected behavior

It should be loaded on first try within 5-6 seconds

Screenshots

image

Device & Versions (please complete the following information)

  • Device: Lenovo Tab m8 (4th Gen)
  • OS: SDK API level 33
  • Flutter Version:
Flutter 3.16.4 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 2e9cb0aa71 (4 weeks ago) • 2023-12-11 14:35:13 -0700
Engine • revision 54a7145303
Tools • Dart 3.2.3 • DevTools 2.28.4

@sheetalsavani sheetalsavani added the bug Something isn't working label Jan 6, 2024
@HayesGordon
Copy link
Contributor

@sheetalsavani the Rive Text Engine needs to be manually initialized if you're using RiveFile.import - you can await for RiveFile.initializeText.

Or easier you can use one of the other convenience methods, such as

var riveFile = await RiveFile.asset('path/to/myrive.riv');

Which is async and will call initializeText for you.

I'll update the inline docs to indicate the above.

@sheetalsavani
Copy link
Author

sheetalsavani commented Jan 8, 2024

I changed as you said @HayesGordon is having the same error with 'Out of memory'.

The following OutOfMemoryError was thrown during paint():
Out of Memory

The relevant error-causing widget was: 
  Rive Rive:file:///Users/Projects/lib/views/animated_eyes_view.dart:291:20
When the exception was thrown, this was the stack: 
#0      List._growToNextCapacity (dart:core-patch/growable_array.dart:396:5)
#1      SimpleGlyphRunArray.toList (package:rive_common/src/rive_text_ffi.dart:225:12)
#2      new ParagraphFFI (package:rive_common/src/rive_text_ffi.dart:351:68)
#3      SimpleParagraphArray.toList (package:rive_common/src/rive_text_ffi.dart:308:16)
#4      new TextShapeResultFFI (package:rive_common/src/rive_text_ffi.dart:429:39)
#5      FontFFI.shape (package:rive_common/src/rive_text_ffi.dart:807:12)
#6      Text.computeShape (package:rive/src/rive_core/text/text.dart:507:26)
#7      Text.update (package:rive/src/rive_core/text/text.dart:540:9)
#8      Artboard.updateComponents (package:rive/src/rive_core/artboard.dart:153:21)
#9      Artboard.advance (package:rive/src/rive_core/artboard.dart:213:9)
#10     RiveRenderObject.advance (package:rive/src/rive.dart:336:17)
#11     RiveRenderBox.paint (package:rive/src/rive_render_box.dart:353:10)
#12     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#13     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#14     RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:129:13)
#15     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#16     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#17     RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2882:15)
#18     RenderFlex.paint (package:flutter/src/rendering/flex.dart:1040:7)
#19     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#20     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#21     RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2882:15)
#22     RenderFlex.paint (package:flutter/src/rendering/flex.dart:1040:7)
#23     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#24     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#25     RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2882:15)
#26     RenderCustomMultiChildLayoutBox.paint (package:flutter/src/rendering/custom_layout.dart:408:5)
#27     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#28     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#29     RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:129:13)
#30     _RenderInkFeatures.paint (package:flutter/src/material/material.dart:662:11)
#31     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#32     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#33     RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:129:13)
#34     RenderPhysicalModel.paint.<anonymous closure> (package:flutter/src/rendering/proxy_box.dart:2043:15)
#35     PaintingContext.pushClipRRect (package:flutter/src/rendering/object.dart:575:14)
#36     RenderPhysicalModel.paint (package:flutter/src/rendering/proxy_box.dart:2030:21)
#37     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#38     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#39     RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2882:15)
#40     RenderFlex.paint (package:flutter/src/rendering/flex.dart:1040:7)
#41     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#42     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#43     _RenderColoredBox.paint (package:flutter/src/widgets/basic.dart:7813:15)
...
...
#60     RenderStack.paintStack (package:flutter/src/rendering/stack.dart:640:5)
#61     RenderStack.paint (package:flutter/src/rendering/stack.dart:656:7)
#62     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#63     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#64     RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:129:13)
#65     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#66     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#67     _RenderLayoutBuilder.paint (package:flutter/src/widgets/layout_builder.dart:333:15)
#68     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#69     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#70     RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2882:15)
#71     RenderCustomMultiChildLayoutBox.paint (package:flutter/src/rendering/custom_layout.dart:408:5)
#72     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#73     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#74     RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:129:13)
#75     _RenderInkFeatures.paint (package:flutter/src/material/material.dart:662:11)
#76     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#77     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#78     RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:129:13)
#79     RenderPhysicalModel.paint.<anonymous closure> (package:flutter/src/rendering/proxy_box.dart:2043:15)
#80     PaintingContext.pushClipRRect (package:flutter/src/rendering/object.dart:575:14)
#81     RenderPhysicalModel.paint (package:flutter/src/rendering/proxy_box.dart:2030:21)
#82     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#83     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#84     RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:129:13)
#85     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#86     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#87     RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:129:13)
#88     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#89     PaintingContext._repaintCompositedChild (package:flutter/src/rendering/object.dart:166:11)
#90     PaintingContext.repaintCompositedChild (package:flutter/src/rendering/object.dart:109:5)
#91     PipelineOwner.flushPaint (package:flutter/src/rendering/object.dart:1156:31)
#92     PipelineOwner.flushPaint (package:flutter/src/rendering/object.dart:1166:15)
#93     RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:593:23)
#94     WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:986:13)
#95     RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:457:5)
#96     SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1325:15)
#97     SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1255:9)
#98     SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1113:5)
#99     _invoke (dart:ui/hooks.dart:312:13)
#100    PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:383:5)
#101    _drawFrame (dart:ui/hooks.dart:283:31)
The following RenderObject was being processed when the exception was fired: RiveRenderObject#10c81
...  parentData: <none>
...  constraints: BoxConstraints(w=485.0, h=373.1)
...  size: Size(485.0, 373.1)
RenderObject: RiveRenderObject#10c81
  parentData: <none>
  constraints: BoxConstraints(w=485.0, h=373.1)
  size: Size(485.0, 373.1)
====================================================================================================
D/OpenGLRenderer(14425): onFlyCompress
D/skia    (14425): SkJpegCodec::onGetPixels +
D/skia    (14425): SkJpegCodec::onGetPixels -
I/flutter (14425): CALL false false
D/OpenGLRenderer(14425): onFlyCompress
D/skia    (14425): SkJpegCodec::onGetPixels +
D/skia    (14425): SkJpegCodec::onGetPixels -
D/OpenGLRenderer(14425): onFlyCompress
D/skia    (14425): SkJpegCodec::onGetPixels +
D/skia    (14425): SkJpegCodec::onGetPixels -
D/OpenGLRenderer(14425): onFlyCompress
D/skia    (14425): SkJpegCodec::onGetPixels +
D/skia    (14425): SkJpegCodec::onGetPixels -
I/com.buddy.bot(14425): Background young concurrent copying GC freed 5507(543KB) AllocSpace objects, 65(6948KB) LOS objects, 44% free, 8128KB/14MB, paused 436us,282us total 189.644ms
D/OpenGLRenderer(14425): onFlyCompress
D/skia    (14425): SkJpegCodec::onGetPixels +
D/skia    (14425): SkJpegCodec::onGetPixels -
D/OpenGLRenderer(14425): onFlyCompress
D/skia    (14425): SkJpegCodec::onGetPixels +
D/skia    (14425): SkJpegCodec::onGetPixels -
D/OpenGLRenderer(14425): onFlyCompress
D/skia    (14425): SkJpegCodec::onGetPixels +
D/skia    (14425): SkJpegCodec::onGetPixels -
D/OpenGLRenderer(14425): onFlyCompress
D/skia    (14425): SkJpegCodec::onGetPixels +
D/skia    (14425): SkJpegCodec::onGetPixels -
D/OpenGLRenderer(14425): onFlyCompress
D/skia    (14425): SkJpegCodec::onGetPixels +
D/skia    (14425): SkJpegCodec::onGetPixels -
D/OpenGLRenderer(14425): onFlyCompress
D/skia    (14425): SkJpegCodec::onGetPixels +
D/skia    (14425): SkJpegCodec::onGetPixels -
I/com.buddy.bot(14425): Background concurrent copying GC freed 11985(754KB) AllocSpace objects, 69(7924KB) LOS objects, 49% free, 7167KB/13MB, paused 1.902ms,112us total 196.492ms
D/OpenGLRenderer(14425): onFlyCompress
D/skia    (14425): SkJpegCodec::onGetPixels +
D/skia    (14425): SkJpegCodec::onGetPixels -
D/OpenGLRenderer(14425): onFlyCompress
D/skia    (14425): SkJpegCodec::onGetPixels +
D/skia    (14425): SkJpegCodec::onGetPixels -
D/OpenGLRenderer(14425): onFlyCompress
D/skia    (14425): SkJpegCodec::onGetPixels +
D/skia    (14425): SkJpegCodec::onGetPixels -
D/OpenGLRenderer(14425): onFlyCompress
D/skia    (14425): SkJpegCodec::onGetPixels +
D/skia    (14425): SkJpegCodec::onGetPixels -
D/OpenGLRenderer(14425): onFlyCompress
D/skia    (14425): SkJpegCodec::onGetPixels +
D/skia    (14425): SkJpegCodec::onGetPixels -
D/OpenGLRenderer(14425): onFlyCompress
D/skia    (14425): SkJpegCodec::onGetPixels +
D/skia    (14425): SkJpegCodec::onGetPixels -
D/OpenGLRenderer(14425): onFlyCompress
D/skia    (14425): SkJpegCodec::onGetPixels +
D/skia    (14425): SkJpegCodec::onGetPixels -
D/OpenGLRenderer(14425): onFlyCompress
D/skia    (14425): SkJpegCodec::onGetPixels +
D/skia    (14425): SkJpegCodec::onGetPixels -
D/OpenGLRenderer(14425): onFlyCompress
D/skia    (14425): SkJpegCodec::onGetPixels +
D/skia    (14425): SkJpegCodec::onGetPixels -
D/OpenGLRenderer(14425): onFlyCompress
D/skia    (14425): SkJpegCodec::onGetPixels +
D/skia    (14425): SkJpegCodec::onGetPixels -
D/OpenGLRenderer(14425): onFlyCompress
D/skia    (14425): SkJpegCodec::onGetPixels +
D/skia    (14425): SkJpegCodec::onGetPixels -
D/OpenGLRenderer(14425): onFlyCompress
D/skia    (14425): SkJpegCodec::onGetPixels +
D/skia    (14425): SkJpegCodec::onGetPixels -
I/com.buddy.bot(14425): Background concurrent copying GC freed 10295(701KB) AllocSpace objects, 68(7472KB) LOS objects, 50% free, 7567KB/14MB, paused 287us,286us total 103.684ms
D/OpenGLRenderer(14425): onFlyCompress
D/skia    (14425): SkJpegCodec::onGetPixels +
D/skia    (14425): SkJpegCodec::onGetPixels -
D/OpenGLRenderer(14425): onFlyCompress
D/skia    (14425): SkJpegCodec::onGetPixels +
D/skia    (14425): SkJpegCodec::onGetPixels -

======== Exception caught by rendering library =====================================================
The following RangeError was thrown during paint():
RangeError (index): Invalid value: Valid value range is empty: 0

The relevant error-causing widget was: 
  Rive Rive:file:///Users/Projects/lib/views/animated_eyes_view.dart:291:20
When the exception was thrown, this was the stack: 
#0      List.[] (dart:core-patch/growable_array.dart:264:36)
#1      Text._buildRenderStyles (package:rive/src/rive_core/text/text.dart:264:41)
#2      Text.update (package:rive/src/rive_core/text/text.dart:558:7)
#3      Artboard.updateComponents (package:rive/src/rive_core/artboard.dart:153:21)
#4      Artboard.advance (package:rive/src/rive_core/artboard.dart:213:9)
#5      RiveRenderObject.advance (package:rive/src/rive.dart:336:17)
#6      RiveRenderBox.paint (package:rive/src/rive_render_box.dart:353:10)
#7      RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#8      PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#9      RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:129:13)
#10     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#11     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#12     RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2882:15)
#13     RenderFlex.paint (package:flutter/src/rendering/flex.dart:1040:7)
#14     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#15     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#16     RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2882:15)
#17     RenderFlex.paint (package:flutter/src/rendering/flex.dart:1040:7)
#18     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#19     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#20     RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2882:15)
#21     RenderCustomMultiChildLayoutBox.paint (package:flutter/src/rendering/custom_layout.dart:408:5)
#22     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#23     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#24     RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:129:13)
#25     _RenderInkFeatures.paint (package:flutter/src/material/material.dart:662:11)
#26     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#27     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#28     RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:129:13)
#29     RenderPhysicalModel.paint.<anonymous closure> (package:flutter/src/rendering/proxy_box.dart:2043:15)
#30     PaintingContext.pushClipRRect (package:flutter/src/rendering/object.dart:575:14)
#31     RenderPhysicalModel.paint (package:flutter/src/rendering/proxy_box.dart:2030:21)
#32     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#33     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#34     RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2882:15)
#35     RenderFlex.paint (package:flutter/src/rendering/flex.dart:1040:7)
#36     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#37     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#38     _RenderColoredBox.paint (package:flutter/src/widgets/basic.dart:7813:15)
#39     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#40     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#41     RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:129:13)
#42     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#43     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#44     RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:129:13)
#45     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#46     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#47     RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:129:13)
#48     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#49     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#50     RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:129:13)
#51     RenderTransform.paint (package:flutter/src/rendering/proxy_box.dart:2537:17)
#52     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#53     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#54     RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2882:15)
#55     RenderStack.paintStack (package:flutter/src/rendering/stack.dart:640:5)
#56     RenderStack.paint (package:flutter/src/rendering/stack.dart:656:7)
#57     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#58     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#59     RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:129:13)
#60     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#61     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#62     _RenderLayoutBuilder.paint (package:flutter/src/widgets/layout_builder.dart:333:15)
#63     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#64     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#65     RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2882:15)
#66     RenderCustomMultiChildLayoutBox.paint (package:flutter/src/rendering/custom_layout.dart:408:5)
#67     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#68     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#69     RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:129:13)
#70     _RenderInkFeatures.paint (package:flutter/src/material/material.dart:662:11)
#71     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#72     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#73     RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:129:13)
#74     RenderPhysicalModel.paint.<anonymous closure> (package:flutter/src/rendering/proxy_box.dart:2043:15)
#75     PaintingContext.pushClipRRect (package:flutter/src/rendering/object.dart:575:14)
#76     RenderPhysicalModel.paint (package:flutter/src/rendering/proxy_box.dart:2030:21)
#77     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#78     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#79     RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:129:13)
#80     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#81     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#82     RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:129:13)
#83     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3208:7)
#84     PaintingContext._repaintCompositedChild (package:flutter/src/rendering/object.dart:166:11)
#85     PaintingContext.repaintCompositedChild (package:flutter/src/rendering/object.dart:109:5)
#86     PipelineOwner.flushPaint (package:flutter/src/rendering/object.dart:1156:31)
#87     PipelineOwner.flushPaint (package:flutter/src/rendering/object.dart:1166:15)
#88     RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:593:23)
#89     WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:986:13)
#90     RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:457:5)
#91     SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1325:15)
#92     SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1255:9)
#93     SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1113:5)
#94     _invoke (dart:ui/hooks.dart:312:13)
#95     PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:383:5)
#96     _drawFrame (dart:ui/hooks.dart:283:31)
The following RenderObject was being processed when the exception was fired: RiveRenderObject#10c81
...  parentData: <none>
...  constraints: BoxConstraints(w=485.0, h=373.1)
...  size: Size(485.0, 373.1)
RenderObject: RiveRenderObject#10c81
  parentData: <none>
  constraints: BoxConstraints(w=485.0, h=373.1)
  size: Size(485.0, 373.1)

@HayesGordon
Copy link
Contributor

I tried my side @sheetalsavani and got it working with the original code you shared (building for macOS). I had to change the file's name to load all-animations.riv not all_animations.riv. I don't think this is the issue you're running into though.

Could you check to see if you're experiencing this issue on the latest version of the Rive-Flutter runtime (rive: ^0.12.4).

Could you also confirm if you're getting this error when building for a different platform, for example, Android or Web?

Depending on your findings, could you please share a fully reproducible example project? Once we can reproduce the issue we can help resolve it.

@sheetalsavani
Copy link
Author

As of now just by excluding the text from the rive editor it works. The text was hidden in the .rev file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants