UpdateTextureRegions crashes on IOS

I can’t get UpdateTextureRegions to work on my ipad air (IOS)

My application terminates right after it is called. However, it works fine for Win64 and Mac platform. The texture uploaded correctly.

Using BulkData.Lock works on IOS but it is too slow since I intend to update texture every frame with device’s camera image stream. Does anyone knows a more suitable method?

Here is a simplified function that crashes after a call on IOS (i made it into an exec function of a playercontroller):

   void ASimpleTest_PlayerController::UTT( )
    {
        static FUpdateTextureRegion2D Region = FUpdateTextureRegion2D(0, 0, 0, 0, 256, 256);
        static unsigned char array[256*256*4];
        for (int r = 0; r < 256;++r)
            for (int c = 0; c < 256;++c)
                for (int k = 0; k < 4;++k)
                {
                    array[r*256*4 + c*4 + k] = c+r;
                }
        
        CameraImageTexture = UTexture2D::CreateTransient(512, 512);
        CameraImageTexture->AddToRoot();
        // Allocate the texture HRI
        CameraImageTexture->UpdateResource();
        UpdateTextureRegions(CameraImageTexture, 0, 1, &Region, 256*4, 4, array, false);
    }

Thanks

HI Peam:
Did u solve this problem now, I encountered same problem, currently I have to use BulkData.Lock, however iphone6 is powerful enough to make it real time.

Hi Peam & , I added task UERNDR-8 to investigate/fix this; it’s crashing as it requires pixel buffer objects (not available on ES 2). A workaround is to call Lock/Unlock.

I used Lock and Unlock to go around this problem. It works but takes a little bit more time to lock.