Thanks to visit codestin.com
Credit goes to github.com

Skip to content

(Android Crash) Canvas: trying to draw too large #1378

@BaoHG1508

Description

@BaoHG1508

Description

I'm on version 7.3.3 and react native 0.8.1, on android whenever I tried to render the attached json on android the app crashed immediately, checking the logcat I saw it saying that and on sentry it shows the same error

Canvas: trying to draw too large(277822224bytes) bitmap.

I tried enable safe mode but it removed most of the thing in the animation, on iOS everything works as expected.

I have 8 json of animation and only on json 8 it crashes the app.

Json 8:

8.json

Others:

7.json

Code:

        <LottieView
          ref={animationRef}
          source={source
          autoPlay={true}
          loop={false}
          style={[
            styles.animation,
            {
              width: sizeDimensions.width,
              height: sizeDimensions.height,
            },
          ]}
          onAnimationFinish={handleAnimationFinish}
          resizeMode="contain"
        />

Steps to reproduce

  1. Download the json and use it in LottieView component

Snack or a link to a repository

No link, just a json to test https://github.com/user-attachments/files/22579832/8.json

Lottie React Native version

7.3.3

React Native version

0.80.1

Platforms

Android

Workflow

React Native

Architecture

Paper (Old Architecture)

Build type

None

Device

None

Acknowledgements

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions