Mac Client Causes NSDocumentSerializationAPI Freezes
- Dominant language
- Go
- Stars
- 9.2k
- Forks
- 1.3k
- Avg merge
- 12h 58m
- Merged PRs (30d)
- 56
Description
For several months, I've been having freezes while using Banktivity 6, usually when trying to save. The resulting `.hang` file always reports the unresponsive thread like so:
```
Process: Banktivity 6 (Banktivity) [74759]
Path: /Applications/Banktivity 6.app/Contents/MacOS/Banktivity 6
Architecture: x86_64
Parent: launchd [1]
UID: 501
Task size: 1673.42 MB
CPU Time: 0.011s
Note: Unresponsive for 128 seconds before sampling
Note: 2 idle work queue threads omitted
Thread 0x19a1cf9 DispatchQueue 1 17 samples (1-17) priority 47 (base 47)
17 start + 1 (libdyld.dylib + 4373) [0x7fff5cce6115] 1-17
17 NSApplicationMain + 804 (AppKit + 24346) [0x7fff3298df1a] 1-17
17 -[NSApplication run] + 812 (AppKit + 224669) [0x7fff329bed9d] 1-17
17 -[NSApplication(NSEvent) sendEvent:] + 1041 (AppKit + 8214773) [0x7fff3315d8f5] 1-17
17 routeKeyEquivalent + 884 (AppKit + 8225729) [0x7fff331603c1] 1-17
17 -[NSMenu performKeyEquivalent:] + 363 (AppKit + 2544099) [0x7fff32bf51e3] 1-17
17 -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 114 (AppKit + 2548607) [0x7fff32bf637f] 1-17
17 -[NSMenuItem _corePerformAction] + 323 (AppKit + 2549239) [0x7fff32bf65f7] 1-17
17 -[NSApplication(NSResponder) sendAction:to:from:] + 312 (AppKit + 8230746) [0x7fff3316175a] 1-17
17 -[NSDocument(NSDocumentSaving) _saveDocumentWithDelegate:didSaveSelector:contextInfo:] + 95 (AppKit + 12449465) [0x7fff335676b9] 1-17
17 -[NSDocument(NSDocumentSerializationAPIs) performActivityWithSynchronousWaiting:usingBlock:cancellationHandler:] + 448 (AppKit + 6444466) [0x7fff32fad5b2] 1-17
17 -[NSDocument(NSDocumentSerializationAPIs) _performActivity:] + 1266 (AppKit + 6438665) [0x7fff32fabf09] 1-17
17 _dispatch_semaphore_wait_slow + 101 (libdispatch.dylib + 39185) [0x7fff5ccb4911] 1-17
17 semaphore_wait_trap + 10 (libsystem_kernel.dylib + 75774) [0x7fff5ce2c7fe] 1-17
*17 semaphore_wait_continue + 0 (kernel + 2581120) [0xffffff8000476280] 1-17
```
It wasn't until I worked on a project in Keynote and started getting the same kinds of freezes that I realized it might be one of my startup utilities, so I started experimenting, turning them on and off, until I discovered that the freezes went away when I disabled the Keybase client.
It seems like it's doing something that prevents`[NSDocument(NSDocumentSerializationAPIs) _performActivity:]` from doing its thing. I've no idea what, but I can send you some crash files and other diagnostics via email (or Keybase!) if that would help. I'm currently running `Version 1.0.40-20180205183337+269845275 (1.0.40-20180205183337+269845275)`.
Contributor guide
No contributing guide indexed for this repository
Research direction
The report identifies freezes during saves in Banktivity 6 and Keynote when the Keybase client is enabled, with the main thread blocked in NSDocument's NSDocumentSerializationAPIs _performActivity:. Start by reproducing the freeze with Keybase enabled and disabled, then review the supplied .hang file and any additional diagnostics; done means identifying and resolving the interaction or documenting the required fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100