react-native-photos-framework icon indicating copy to clipboard operation
react-native-photos-framework copied to clipboard

CreateAssets(): Got memory pressure notification (critical)

Open MobileAppVault opened this issue 7 years ago • 1 comments

Hi,

I try to upload 400 Pictures to the camera roll and after 5 seconds i got the following errors and the app crashed:

RNPhotosFramework.createAssets({
                images : images,
                album : album, 
                includeMetadata : false
            }).then((res) => {
                console.log('done');
            }).catch((err) => {
                console.log(error);
            });
[812:43385] Error: Timeout waiting for response from assetsd in -[PHChangeRequestHelper _generateUUIDIfNecessary:]
[812:43385] [PhotoKit] Timeout waiting for response from assetsd in -[PHChangeRequestHelper _generateUUIDIfNecessary:] (retries 3)
[812:43001] Got memory pressure notification (critical)
Message from debugger: Terminated due to memory issue

The pics are very big and the first 5 pics are uploaded to the camera roll.

Is there anything i can do to avoid that or improve the memory?

Many thanks!

MobileAppVault avatar Nov 18 '17 12:11 MobileAppVault

Have you tried uploading the pictures in batches? If you have 400 images, you can try uploading them in batches of 50 for example, maybe that could help with the memory pressure.

Kobzol avatar Nov 27 '17 21:11 Kobzol