Michaelvilleneuve / react-native-document-scanner

Document scanner, features live border detection, perspective correction, image filters and more ! 📲📸
MIT License
849 stars 290 forks source link

Scanner crashes sometimes when taking a photo. Terminated due to memory issue #57

Open julianklumpers opened 5 years ago

julianklumpers commented 5 years ago

So now and then the scanner crashed right after taking a photo. the log in xcode says the following: Terminated due to memory issue.

Someone else experiencing this problem or maybe know how to solve this.

Thanks.

mariot commented 5 years ago

I had that for old phones running Android. You could try to ask for more memory with android:largeHeap="true"

https://stackoverflow.com/questions/27396892/what-are-advantages-of-setting-largeheap-to-true

Michaelvilleneuve commented 5 years ago

Mariot this issue is iOS specific apparently

humphreyja commented 4 years ago

Yeah I ran into this issue as well. The iOS code is really old and filled with memory leaks. I actually rebuilt this package from the ground up to fix these issues and update the iOS stuff. I changed the API so be sure to check out the full example for how to use it. Or just take the iOS code and add a PR to this package to fix the issues.

https://github.com/HarvestProfit/react-native-rectangle-scanner