Replacing open autosaved document with unsaved document hangs in -[NSFileCoordinator _blockOnAccessClaim:]

Originator:nriley
Number:rdar://13700898 Date Originated:20-Apr-2013 11:01 AM
Status:Duplicate/8820573 Resolved:24-May-2013 06:44 PM
Product:OS X Product Version:10.8.3/12D78
Classification:Crash/Hang/Data Loss Reproducible:Always
 
Summary:
Saving another document on top of an existing open autosaved document causes the application to hang in -[NSFileCoordinator _blockOnAccessClaim:].

Steps to Reproduce:
1. Open TextEdit.
2. Save the untitled document in location X.
3. Create a new document.
4. Save the new document in location X, choosing to replace the existing document.

Expected Results:
Both document windows reflect the current state of the document on disk, or the first-opened window closes.

Actual Results:
TextEdit hangs indefinitely until the application with the open document is forced to quit.

Regression:
Preview also exhibits this behavior.

While the application is hung, other applications also hang when they attempt to save over the top of the document.

Notes:

Call graph:
    930 Thread_3750820   DispatchQueue_1: com.apple.main-thread  (serial)
    + 930 start  (in libdyld.dylib) + 1  [0x7fff87a617e1]
    +   930 NSApplicationMain  (in AppKit) + 869  [0x7fff888f2c06]
    +     930 -[NSApplication run]  (in AppKit) + 517  [0x7fff8894e1d3]
    +       930 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]  (in AppKit) + 128  [0x7fff88956e22]
    +         930 _DPSNextEvent  (in AppKit) + 685  [0x7fff88957563]
    +           930 BlockUntilNextEventMatchingListInMode  (in HIToolbox) + 62  [0x7fff8a8a9ae3]
    +             930 ReceiveNextEventCommon  (in HIToolbox) + 356  [0x7fff8a8a9c52]
    +               930 RunCurrentEventLoopInMode  (in HIToolbox) + 209  [0x7fff8a8a9eb4]
    +                 930 CFRunLoopRunSpecific  (in CoreFoundation) + 290  [0x7fff85f320e2]
    +                   930 __CFRunLoopRun  (in CoreFoundation) + 1948  [0x7fff85f32c7c]
    +                     930 __CFRunLoopDoBlocks  (in CoreFoundation) + 255  [0x7fff85f0e47f]
    +                       930 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__  (in CoreFoundation) + 18  [0x7fff85f4dcd2]
    +                         930 __block_global_44  (in AppKit) + 175  [0x7fff88ca1652]
    +                           930 __block_global_232  (in AppKit) + 273  [0x7fff88c8f6aa]
    +                             930 -[NSDocument continueFileAccessUsingBlock:]  (in AppKit) + 222  [0x7fff88827999]
    +                               930 __block_global_233  (in AppKit) + 45  [0x7fff88c8f763]
    +                                 930 -[NSDocument _revertToVersion:preservingFirst:error:]  (in AppKit) + 186  [0x7fff88c6c49d]
    +                                   930 -[NSDocument performSynchronousFileAccessUsingBlock:]  (in AppKit) + 45  [0x7fff88827246]
    +                                     930 __53-[NSDocument _revertToVersion:preservingFirst:error:]_block_invoke_0  (in AppKit) + 349  [0x7fff88c6c63a]
    +                                       930 -[NSFileCoordinator coordinateReadingItemAtURL:options:error:byAccessor:]  (in Foundation) + 132  [0x7fff8f75a880]
    +                                         930 -[NSFileCoordinator(NSPrivate) _coordinateReadingItemAtURL:options:error:byAccessor:]  (in Foundation) + 604  [0x7fff8f75aaf5]
    +                                           930 -[NSFileCoordinator(NSPrivate) _blockOnAccessClaim:]  (in Foundation) + 202  [0x7fff8f75ae6c]
    +                                             930 _dispatch_semaphore_wait_slow  (in libdispatch.dylib) + 241  [0x7fff8e43c486]
    +                                               930 semaphore_wait_trap  (in libsystem_kernel.dylib) + 10  [0x7fff855376c2]

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!