react-native-blob-util
react-native-blob-util copied to clipboard
Some iOS users crash with `SIGABRT: Failed to grow buffer `
- please provide the version of installed library and RN project.
"react-native": "0.66.2",
"react-native-blob-util": "^0.13.18",
We have reports from iOS users, that when they start uploading photos/videos (with a single endpoint call) the app crashes.
This is what we get in crash report:
SIGABRT: Failed to grow buffer
Any ideas if this is a bug (seems a low memory issues?) or we can change something for these crashes not to occur?
Do you have a line of code for it? It is some kind of problem with the memory allocation, yes. But it could be a wrong length for the data or sth like that.
Sorry @RonRadtke, the crash report did not give me the line number of the JS.
If I see that error again I will let you know, meanwhile we get reported that users tried to upload for example 34 photos in a direct upload and it managed to download some and then crashed.
Will it help memory-wise to split the single large upload of all files into separate uploads? (one per 2 files for example?)
@RonRadtke I have more info on on the line (63) now:
ReactNativeBlobUtilReqBuilder.m, line 63
See also screenshot:
I now upload each image and video separately but it appears that this may not be enough.
They are hi-res images, taken from iPhones.
Same problem. We've tried some other libraries as well, which end up in the same exception. The problem is reproducible with large files (900MB) on iOS.
I assume that the app can't allocate as much memory as it would have to and thus fails. So the only option would be some way of streaming the file in chunks I think.
So the only option would be some way of streaming the file in chunks I think. - How can we do it?