Skip to content

App crashes when attempting to display an image loaded from an URI in a grid. #31740

@czuck

Description

@czuck

Description

App crashes with
Java.Lang.RuntimeException: 'Canvas: trying to draw too large(184320000bytes) bitmap.'

Steps to Reproduce

Run the attached app on a Nexus 10 using API 35. It does crash with some other devices but this is the most consistent.
From the hamburger menu select the item 'Image Aspect in Grid'. The app will crash. It is attempting to put an image in a grid cell with a URI source.

Link to public reproduction project repository

https://github.com/czuck/MauiTest.git

Version with bug

9.0.110 SR11

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

No response

Did you find any workaround?

If the image has a local source it does not create fail. In my test app the red image is local and the blue one comes from the URI.

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-imageImage loading, sources, cachingplatform/androids/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions