Local images loading bug

Fuse version 1.8.1 (build 15610)
OS: macOS
Device: iPhone 6 iOS 11.3

I am trying to show lot of images from device documents/tmp folder. After about 100-200 images are not loading. Getting “Too many files open” error in Xcode.

I am saving images from base64 just for reproducing purpose. Same problem for real local files.

Steps to reproduce:
Run this code on iOS device in debug or preview mode. Scroll about 100-300 images.

<App>
	<JavaScript>
        var Observable = require("FuseJS/Observable");
        var images = Observable();

        var ImageTools = require("FuseJS/ImageTools");

        var base64Image =    "iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPAQMAAAABGAcJAAAABlBMVEX9//wAAQATpOzaAAAAH0l" +
                        "EQVQI12MAAoMHIFLAAYSEwIiJgYGZASrI38AAAwBamgM5VF7xgwAAAABJRU5ErkJggg==";

        var i;
		var counter = 0;
        for(i = 0; i < 500; i++) {
            saveImage(i);
        }

        function saveImage() {
            ImageTools.getImageFromBase64(base64Image)
            .then(function(image) {
                images.add({id: counter, image: image.path});
				counter++;
            });
        }

        exports.images = images;

    </JavaScript>


    <ScrollView LayoutMode="PreserveVisual">
        <StackPanel>
            <Each Items="{images}" ux:Name="theEach" Reuse="Frame">
                <Rectangle Color="Green" Height="200" Width="200">
                    <Text Color="Black" FontSize="20" Value="{id}" />
                    <Image File="{image}" StretchMode="UniformToFill" MemoryPolicy="QuickUnload"/>
                </Rectangle>
            </Each>
        </StackPanel>
        
        <ScrollViewPager Each="theEach" ux:Name="svp"/>
    </ScrollView>
</App>

Any thoughts?

Hey.

This error is Mac OS X related. This thread should help.