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

ImageLoader.getSize can lead to an infinite interval loop #2749

Open
1 task done
lkinasiewicz opened this issue Dec 30, 2024 · 0 comments · May be fixed by #2750
Open
1 task done

ImageLoader.getSize can lead to an infinite interval loop #2749

lkinasiewicz opened this issue Dec 30, 2024 · 0 comments · May be fixed by #2750
Labels

Comments

@lkinasiewicz
Copy link

lkinasiewicz commented Dec 30, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Describe the issue

getSize implementation is more complicated than should be. There are intervals involved which, in some conditions, can keep running "forever". I have stumbled upon this issue, when I used getSize in some jest tests. The problem occurs, when an image fails to decode and naturalWidth, naturalHeight are 0.

Expected behavior

  1. No potential for infinite timers.
  2. failure callback is called when an image fails to decode.

Steps to reproduce

Unit tests will be provided in a merge request

Test case

Unit tests will be provided in a merge request

Additional comments

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant