wordpress-mobile / wordpress-mobile/WordPress-iOS
Cannot form weak reference to instance of class PUPickerRemoteViewController
Open
Nobody has claimed this yet.
[Type] Crash
Aztec
- Dominant language
- Swift
- Stars
- 3.9k
- Forks
- 1.2k
- Avg merge
- 23h 51m
- Merged PRs (30d)
- 58
Description
Cannot form weak reference to instance (0x109349a00) of class PUPickerRemoteViewController. It is possible that this object was over-released, or is in the process of deallocation. > objc[2323]: Cannot form weak reference to instance (0x109349a00) of class PUPickerRemoteViewController. It is possible that this object was over-released, or is in the process of deallocation.
Sentry
The crash is grouped with other SIGABRT crashes on Jetpack and WordPress. However, the current spike is mostly related to PUPickerRemoteViewController:
Observations
- iPad only
- PHPickerViewController (and consequentially PUPickerRemoteViewController) doesn’t get deallocated, since it’s held strongly by AztecPostViewController (https://github.com/wordpress-mobile/WordPress-iOS/blob/9ee96a5a70988ff877793c6c30dc701b9285433b/WordPress/Classes/ViewRelated/Aztec/ViewControllers/AztecPostViewController.swift#L426). We could make it weak and keep it same behavior.
AztecPostViewControllercontains code, with a commentWe need to auto-close the input media picker when multitasking panes are resized:
if UIDevice.isPad() {
closeMediaPickerInputViewController()
}
Steps to reproduce the behavior
Tested on [device], iOS [version], Jetpack iOS / WordPress iOS [version]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in AztecPostViewController.swift around the PHPickerViewController reference at line 426 and review closeMediaPickerInputViewController(), including its iPad multitasking resize behavior. Verify the picker remains usable while avoiding the PUPickerRemoteViewController weak-reference crash, then test the behavior on iPad.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, swift
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100