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

App crashes on iOS Device #29

Open
hrishikeshd10 opened this issue Jun 5, 2020 · 5 comments
Open

App crashes on iOS Device #29

hrishikeshd10 opened this issue Jun 5, 2020 · 5 comments

Comments

@hrishikeshd10
Copy link

hrishikeshd10 commented Jun 5, 2020

Screenshot 2020-06-05 at 11 22 04 AM
The app Crashed on clicking The floating action button to select image in example project.
No error was thrown.
The complete debug console log is here:

`Launching lib/main.dart on iPhone S in debug mode...

Xcode build done. 66.6s

Connecting to VM Service at ws://127.0.0.1:52406/Nm_PiFrIudM=/ws

Lost connection to device.

Exited
(sigterm)`

@Letalus
Copy link

Letalus commented Jun 10, 2020

could you run the code in xcode on an iOS emulator and post the error from the xcode console? Most of the time the "Lost connection to device" error is a native error. If there is no error, could you check if the simulator closes the app due to a too high cpu usage.

@Mangielijah
Copy link

Mangielijah commented Jul 6, 2020

I think the prob is with the compute function and how it was called.
what happen is when the for each filter in the list of filter the compute function is call which spawns up an isolate to add the the filter to image. but not all the isolates get destroy so even when you select and click save the isolate is still taking up memory. so if you use the filter future about 3 times the app is going to crash or loss connection probably due to lack of memory as each isolate should take about 2 Mb of memory or more.

My solution was since you don't have the power to terminate the compute function create an isolate Worker class to spin up an isolate which you can dispose after using the image filter module. My app no longer crashes

@skkallayath
Copy link
Owner

skkallayath commented Jul 25, 2020

@Mangielijah Thanks for the fix. It will be very helpful if you can create a pull request with the changes. Thanks in advance

@skkallayath skkallayath pinned this issue Sep 18, 2020
@gulmensedat
Copy link

I think the prob is with the compute function and how it was called.
what happen is when the for each filter in the list of filter the compute function is call which spawns up an isolate to add the the filter to image. but not all the isolates get destroy so even when you select and click save the isolate is still taking up memory. so if you use the filter future about 3 times the app is going to crash or loss connection probably due to lack of memory as each isolate should take about 2 Mb of memory or more.

My solution was since you don't have the power to terminate the compute function create an isolate Worker class to spin up an isolate which you can dispose after using the image filter module. My app no longer crashes

How did you make the isolation? I choose the photo from the album, then I exit the screen and return to the previous screen, I choose from the album again, it explodes.

@vinothvino42
Copy link

It's not working for me in iPhone 5s, it simply showing the screen (at some times) and destroys the app automatically

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

6 participants