Closed Bug 1412897 Opened 8 years ago Closed 8 years ago

Crash in SELUIPasteboardChanged

Categories

(Firefox for iOS :: General, enhancement, P1)

Other
iOS
enhancement

Tracking

()

RESOLVED FIXED
Tracking Status
fxios 10.0 ---

People

(Reporter: garvan, Assigned: garvan)

Details

Attachments

(1 file)

55 bytes, text/x-github-pull-request
justindarc
: review+
Details | Review
Beta 7473, seeing crash report of infinite loop in SELUIPasteboardChanged: ``` #23 (null) in @objc ClipboardBarDisplayHandler.SELUIPasteboardChanged() at Client/Frontend/Browser/ClipboardBarDisplayHandler.swift:46 #24 (null) in __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ () #25 (null) in _CFXRegistrationPost () #26 (null) in ___CFXNotificationPost_block_invoke () #27 (null) in -[_CFXNotificationRegistrar find:object:observer:enumerator:] () #28 (null) in _CFXNotificationPost () #29 (null) in -[NSNotificationCenter postNotificationName:object:userInfo:] () #30 (null) in _sendPasteboardChangedNotification () #31 (null) in +[_UIConcretePasteboard _pasteboardNamed:createIfNotFound:] () #32 (null) in @objc ClipboardBarDisplayHandler.SELUIPasteboardChanged() at Client/Frontend/Browser/ClipboardBarDisplayHandler.swift:46 ```
Priority: -- → P1
Assignee: nobody → gkeeley
The first line of `SELUIPasteboardChanged()` calls `UIPasteboard.general` which triggers a pasteboard changed notification. Easy fixes are: 1) Add re-entrancy guard, and/or 2) Remove listener when function is hit, re-add when done
Attached file Pull request
I couldn't repro the crash; I am not able to trigger a notification when accessing UIPasteboard.general. I can see in the assembly that UIPasteboard accessor function is returning before hitting the notification; I assume that is because `general` already existed -I am "assuming" because I am not trying to figure out the assembly there :).
Attachment #8923555 - Flags: review?(jdarcangelo)
Whiteboard: [needsuplift[
Whiteboard: [needsuplift[ → [needsuplift]
Attachment #8923555 - Flags: review?(jdarcangelo) → review+
Whiteboard: [needsuplift]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: