react-native-document-scanner icon indicating copy to clipboard operation
react-native-document-scanner copied to clipboard

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

Open julianklumpers opened this issue 6 years ago • 3 comments

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.

julianklumpers avatar Sep 06 '19 22:09 julianklumpers

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

mariot avatar Sep 07 '19 18:09 mariot

Mariot this issue is iOS specific apparently

Michaelvilleneuve avatar Sep 07 '19 18:09 Michaelvilleneuve

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

humphreyja avatar Jan 15 '20 23:01 humphreyja