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

main live example crashes after 2 minutes #103

Open
vasilich6107 opened this issue Mar 13, 2020 · 3 comments
Open

main live example crashes after 2 minutes #103

vasilich6107 opened this issue Mar 13, 2020 · 3 comments

Comments

@vasilich6107
Copy link

Hi. Thanks for the package.
I'm trying to use examples from this package. Unfortunately the main_live example crashes after 2 minutes of streaming camera into detector.

Here is a memory usage - https://tppr.me/bFZbX

Doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel dev, v1.15.20, on Mac OS X 10.15.3 19D76, locale en-UA)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 3.6)
[!] IntelliJ IDEA Ultimate Edition (version 2018.3)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.40.2)
[✓] Connected device (4 available)

@vasilich6107
Copy link
Author

vasilich6107 commented Mar 13, 2020

It seems that this issue relates to the camera plugin itself
if i comment

_cameraController.startImageStream(_processImage);

There will be no memory leaks.
The next I've checked - I left the _processImage callback empty so it does no image processing.

The memory leak gets back again.
The temp fix could be to set resolution to medium...

resolution: ResolutionPreset.low,

I'll try to play around with camera plugin versions.

@Cayke
Copy link

Cayke commented Apr 28, 2020

@vasilich6107 i am having same issue here. Are you having this on both plataforms? Have you found any workaround?

@vasilich6107
Copy link
Author

Workaround - only to lower the image quality)
As far as this package uses two native ones through the flutter layer it’s harder to find what causes the issue. My next step will be writing the required functionality by myself based on this library sources.

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