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

[Bug report] load lots of file image, sometimes will show too many files open #639

Open
q2564063 opened this issue Nov 23, 2023 · 3 comments

Comments

@q2564063
Copy link

Version

8.1.1

Platforms

dart, iOS

Device Model

iPhone 13

flutter info

[✓] Flutter (Channel stable, 3.13.8, on macOS 14.0 23A344 darwin-arm64, locale zh-Hans-CN)
    • Flutter version 3.13.8 on channel stable at /Users/bmi/fvm/versions/3.13.8
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 6c4930c4ac (5 weeks ago), 2023-10-18 10:57:55 -0500
    • Engine revision 767d8c75e8
    • Dart version 3.1.4
    • DevTools version 2.25.0
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/bmi/Library/Android/sdk
    • Platform android-33, build-tools 34.0.0
    • ANDROID_HOME = /Users/bmi/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15A507
    • CocoaPods version 1.13.0

How to reproduce?

use ExtendedImage.file method to load lots of file images.
I found the source code not to cache the file object, which will cause the files open too many times, the 'too many files open' error shows.

Logs

No response

Example code (optional)

No response

Contact

No response

@zmtzawqlp
Copy link
Member

The same as Image.file, it's better to provide a runnable demo to reproduce it

@q2564063
Copy link
Author

q2564063 commented Nov 23, 2023

I think use custom ImageProvider with flutter_cache_manager might fix it. It's not easy to reproduce.

The same as Image.file, it's better to provide a runnable demo to reproduce it

@zmtzawqlp
Copy link
Member

I think use custom ImageProvider with flutter_cache_manager might fix it. It's not easy to reproduce.

The same as Image.file, it's better to provide a runnable demo to reproduce it

The file bytes are cached in memory as Image.file do, so i don't think your problem is about it. i can't do anything if i can't reproduct it.

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

No branches or pull requests

2 participants