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

[Android] Loading image from stream throws Java.Lang.RuntimeException when large sized image view is used #11230

Open
Deepak1799 opened this issue Nov 9, 2022 · 3 comments
Labels
area-controls-image Image control platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@Deepak1799
Copy link

Deepak1799 commented Nov 9, 2022

Description

When loading image from stream, it throws Java.Lang.RuntimeException when larger sized image views are used. To view banner sized images, we needed to show it in a larger image view example (3000 x 3000). But it throws the following exception in Android platform when doing the same. This too occurs when loading image from stream as we are creating image at run time and load it as stream.

It occurs when testing in mobile device

image

Steps to Reproduce

  1. Download, and build the attached project (which is linked in the public project repository).
  2. Select the framework as Android.
  3. Connect the Android mobile device and select it.
  4. Deploy the project.
  5. Click the button "Show Image". The exception will occur.
  • In the button click, I have created an image view with 3000 x 3000 and loading a image from stream at run time.

Expected outcome: Image should be shown.
Actual outcome: Java.Lang.RuntimeException is thrown.

Link to public reproduction project repository

https://github.com/Deepak1799/NET-MAUI-Samples/tree/master/AndroidImageIssue

Version with bug

6.0.486 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 9.0

Did you find any workaround?

When setting android:hardwareAccelerated="false" in the Android manifest file, the issue does not occurs. But is not recommended to force in the application.

Relevant log output

Java.Lang.RuntimeException
  Message=Canvas: trying to draw too large(301121496bytes) bitmap.
@Deepak1799 Deepak1799 added the t/bug Something isn't working label Nov 9, 2022
@Deepak1799 Deepak1799 changed the title [Android] Loading image from stream throws Java.Lang.RuntimeException when larger sized image views are used [Android] Loading image from stream throws Java.Lang.RuntimeException when large sized image view is used Nov 9, 2022
@Eilon Eilon added the area-image Image loading, sources, caching label Nov 9, 2022
@PureWeen PureWeen added this to the Backlog milestone Nov 9, 2022
@ghost
Copy link

ghost commented Nov 9, 2022

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@XamlTest XamlTest added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jun 2, 2023
@XamlTest
Copy link
Collaborator

XamlTest commented Jun 2, 2023

Verified this on Visual Studio Enterprise 17.7.0 Preview 1.0. This issue does not repro on Windows 11, repro on Android 13.0-API33 with provided Project:
AndroidImageIssue.zip

Android:
image

Windows:
image

@Adelzu
Copy link

Adelzu commented Jun 7, 2023

Using 17.7.0 Preview 1 i can reproduce on Android 8.

@Eilon Eilon added area-controls-image Image control and removed area-image Image loading, sources, caching labels May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-image Image control platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants