Skip to content

RCTImageLoader crashes when canceling image loads (RN 0.36) #10433

Closed
@SunnyGurnani

Description

@SunnyGurnani

Image Loader Crashing at OSAtomicOr32Barrier (EXC_BAD_ACCESS)

Start of Stack is

- (void)didMoveToWindow
{
  [super didMoveToWindow];

  if (!self.window) {
    // Cancel loading the image if we've moved offscreen. In addition to helping
    // prioritise image requests that are actually on-screen, this removes
    // requests that have gotten "stuck" from the queue, unblocking other images
    // from loading.
    **[self cancelImageLoad];**
  } else if ([self shouldChangeImageSource]) {
    [self reloadImage];
  }
}

image

image

Steps to Reproduce / Code Snippets

Put some Network Images on the Page (Specially in a List View) then scroll or change tabs so Images which are not loaded yet are out of the View Port and go back to same tab/viewport and you will see this error.

Expected Results

No Error

Additional Information

  • React Native version: Latest 0.36.rc.0
  • Platform(s) (iOS, Android, or both?): iOS
  • Operating System (macOS, Linux, or Windows?): macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions