Wordpress-ios: Crash: MediaPicker 0.16 causes a crash when changing sites, loading Media.

Created on 14 Jun 2017  Â·  4Comments  Â·  Source: wordpress-mobile/WordPress-iOS

I've finally nailed this down, and likely the primary cause of the crashes in Fabric matching [WPMediaPickerViewController updateDataWithRemoved:inserted:changed:moved:] and seen in https://github.com/wordpress-mobile/WordPress-iOS/issues/7278 (thanks @theck13).

  1. Uninstall the app from the device (just to ensure the data is cleared)
  2. Install, log in to a .com with multiple sites.
  3. Open the editor, open media picker, select the Media Library group.
  4. Media loads just fine.
  5. Close picker, close editor.
  6. Change sites to a site known to have Media (and particularly one which you haven't already synced Media items for)
  7. Open editor, open media picker, select the Media Library group.
  8. Notice there's a strange transition with the loading indicator.
  9. Shortly after, crash.

I've pinned this down to something that changed in the MediaPicker pod, version 0.16, which I base off of not being able to reproduce the crash with 0.15.

Right now I'm thinking it was this MediaPicker PR: https://github.com/wordpress-mobile/MediaPicker-iOS/pull/172 and later brought into developas 0.16 for our7.6 release here: https://github.com/wordpress-mobile/WordPress-iOS/pull/7112.

I gave it my best shot to try and bring out a fix, but I'm just not familiar enough with what's going on here. @frosty, @SergioEstevao can you take a look at this? I'd consider this high priority as it would be a breaker for anyone with multiple sites trying to pick media.

@elibud we'd probably need to prepare a hot-fix for 7.8 ^

Media [Type] Crash

Most helpful comment

I can have a look on this.

All 4 comments

I can have a look on this.

Thanks for taking this on, @SergioEstevao! (and thanks for the initial investigation, @kurzee!)

Thanks for the heads up @kurzee
I got this crash yesterday and it was exactly under the same conditions, but changing the site icon, which might be faster to do for testing @SergioEstevao

For the record, this _does not_ reproduce with only the Media Library section, only through the picker and when changing the site icon as @elibud mentioned.

Was this page helpful?
0 / 5 - 0 ratings