Time Out icon Time Out
You deserve a break

Time Out breaks copy/paste buffer

If I leave Time Out running for a while, the copy/paste buffer breaks. Specifically, I cannot copy new text into the buffer -- I can only paste what's already in there. To restore copy/paste functionality, I have to restart my machine and disable Time Out, which is a shame because I'd like to be able to use both.

This happened to my friend as well, who also independently confirmed that Time Out was the app that broke his copy/paste functionality.

David Sinclair's picture

Re: Time Out breaks copy/paste buffer

Sorry about this! It is a known issue that affects a few people. It's an OS bug, that Time Out and some other apps occasionally trigger, but Apple hasn't been able to help me find a workaround, unfortunately.

See this FAQ answer for more information.

Re: Time Out breaks copy/paste buffer

Hi David,

I created a post about this issue right before your hosting provider caused you some data lost (back around April 11), and I'm finally getting around to re-posting it. :-P I saw johnson923's post and figured it'd be better to dump my info here instead of creating multiple threads about the same issue.

Here's the info from my original post:

Title:
Clipboard Problem: CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : Lock timeout

Version:
Version 2.0.2 (2022)

Body:
Hi there,

Time Out is great, for the record. :-)

After upgrading to the newest version (the overhauled version), I started encountering an odd problem with my mac, and after some testing, I have high confidence that the issue is connected to Time Out somehow.

What happens is my clipboard stops working - I can't copy/paste anything in any app, and I can't drag-and-drop things in Finder. The only way to fix the issue is to reboot. I can kill or reload the OS X pasteboard process/service, but that leads to weird behavior. The clipboard starts working again, but only between apps that were opened prior to the problem, and then separately between apps opened after the process was restarted. That means there effectively becomes two clipboards, which means all apps have to be restarted to get on the same clipboard, but that doesn't fix anything for background processes and whatnot. So, rebooting is the only clean fix I've found so far.

When the issue manifests, I start to see a bunch of these errors in the Console:
CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : Lock timeout

That message comes from any process attempting to access the clipboard for any reason.

When analyzing the Console logs, I saw that when the issue did manifest, it seemed to be very shortly after a Time Out break was processed. The issue didn't happen every time a break happened, but whenever the issue happened, the pattern seemed to be that a Time Out break had preceded it by a short amount of time.

To test the theory that the lock timeout was connected to Time Out, I tried going about the day as usual, but with Time Out not running. I also ran a basic set of commands that monitored for the clipboard issue and would alert me to it when it was detected. Several days passed, and the issue never manifested.

Today, I opened Time Out for the first time in days, and within approximately 45 minutes, the clipboard lock timeout issue manifested. My monitor script (the 'pbpaste' entry below) was checking for the issue every 5 seconds; as can be seen in the output below, the monitor script ran a second after a Time Out break was processed, and the issue was present. So the lock issue manifested sometime between 12:26:41 and 12:26:46.

------------------------------CONSOLE LOGS------------------------------
4/7/16 12:26:09.444 Time Out[33507]: Micro break NotificationAction (4625E932-05CD-4A6E-9555-2002B8DBCAF9): 30 secs before due; title: Time Out - Micro Break; message: T-Minus 30 seconds...; sound: Blow.aiff
4/7/16 12:26:09.445 Time Out[33507]: removed NotificationAction (4625E932-05CD-4A6E-9555-2002B8DBCAF9): 30 secs before due; title: Time Out - Micro Break; message: T-Minus 30 seconds...; sound: Blow.aiff; remaining: (
)
4/7/16 12:26:41.433 Time Out[33507]: Micro break is due (at 4/7/16, 12:26, 1.851849019527435 seconds ago)
4/7/16 12:26:41.434 Time Out[33507]: Micro break due now (scheduled)
4/7/16 12:26:41.459 Time Out[33507]: we can start as scheduled now: we are not in a break
4/7/16 12:26:41.459 Time Out[33507]: Starting the Micro break!
4/7/16 12:26:41.461 Time Out[33507]: startBreak: ; <_NSXPCDistantObjectWithError: 0x7feec0fc32c0>
4/7/16 12:26:41.463 Time Out[33507]: saveBreak received: Break: Micro Config (Micro): duration: 30 seconds = 30.00 seconds, frequency: 20 minutes = 1200.00 seconds, availability: any time, from: DejalTime: 08:00:00, to: DejalTime: 17:00:00, start: 2 secs, finish: 2 secs, State [CHANGED] next due: DejalDate [CHANGED]: 4/7/16, 12:46 ('2016-04-07T19:46:41Z'), last started: DejalDate [CHANGED]: 4/7/16, 12:26 ('2016-04-07T19:26:41Z'), last deferred: DejalDate: 3/30/16, 15:16 ('2016-03-30T22:16:54Z'), last done: DejalDate: 3/30/16, 15:19 ('2016-03-30T22:19:29Z'), paused until: DejalDate: 12/29/01, 16:07 ('0001-12-30T00:00:00Z'); enabled: yes, starting
4/7/16 12:26:41.466 Time Out[33507]: found at index: 1 in (
"Break: Normal Config (Normal): duration: 10 minutes = 600.00 seconds, frequency: 1 hour = 3600.00 seconds, availability: any time, from: DejalTime: 08:00:00, to: DejalTime: 17:00:00, start: 3 secs, finish: 3 secs, State [CHANGED] next due: DejalDate [CHANGED]: 4/7/16, 12:46 ('2016-04-07T19:46:38Z'), last started: DejalDate: 3/30/16, 15:44 ('2016-03-30T22:44:04Z'), last deferred: DejalDate: 3/29/16, 12:59 ('2016-03-29T19:59:57Z'), last done: DejalDate: 3/30/16, 12:48 ('2016-03-30T19:48:17Z'), paused until: DejalDate: 12/29/01, 16:07 ('0001-12-30T00:00:00Z'); enabled: yes, pending",
"Break: Micro Config (Micro): duration: 30 seconds = 30.00 seconds, frequency: 20 minutes = 1200.00 seconds, availability: any time, from: DejalTime: 08:00:00, to: DejalTime: 17:00:00, start: 2 secs, finish: 2 secs, State [CHANGED] next due: DejalDate [CHANGED]: 4/7/16, 12:46 ('2016-04-07T19:46:41Z'), last started: DejalDate [CHANGED]: 4/7/16, 12:26 ('2016-04-07T19:26:41Z'), last deferred: DejalDate: 3/30/16, 15:16 ('2016-03-30T22:16:54Z'), last done: DejalDate: 3/30/16, 15:19 ('2016-03-30T22:19:29Z'), paused until: DejalDate: 12/29/01, 16:07 ('0001-12-30T00:00:00Z'); enabled: yes, starting"
)
4/7/16 12:26:41.468 xpcproxy[36764]: LaunchServices: received XPC_ERROR_CONNECTION_INTERRUPTED trying to map database
4/7/16 12:26:41.468 xpcproxy[36764]: LaunchServices: Database mapping failed with result -10822, retrying
4/7/16 12:26:41.468 xpcproxy[36764]: LaunchServices: received XPC_ERROR_CONNECTION_INTERRUPTED trying to map database
4/7/16 12:26:41.473 xpcproxy[36764]: CFPreferences could not connect to its daemon.
Preferences using the connection 0x0 will be volatile and will not be persisted to disk.
4/7/16 12:26:41.493 xpcproxy[36764]: LaunchServices: received XPC_ERROR_CONNECTION_INTERRUPTED trying to map database
4/7/16 12:26:41.493 xpcproxy[36764]: LaunchServices: Database mapping failed with result -10822, retrying
4/7/16 12:26:41.493 xpcproxy[36764]: LaunchServices: received XPC_ERROR_CONNECTION_INTERRUPTED trying to map database
4/7/16 12:26:41.521 taskgated[431]: no application identifier provided, can't use provisioning profiles [pid=36764]
4/7/16 12:26:41.581 6Z7QW53WB6.com.dejal.timeout.break[36764]: resetTimeoutForInterval: 30
4/7/16 12:26:41.596 6Z7QW53WB6.com.dejal.timeout.break[36764]: resetTimeoutForInterval: 64
4/7/16 12:26:42.442 Time Out[33507]: Scheduler:
idle (for 0 secs); Normal due 4/7/16, 12:46 (in 19 min, 56 sec); Micro due 4/7/16, 12:46 (in 19 min, 59 sec)
4/7/16 12:26:43.702 Time Out[33507]: beginningBreak: Break: Micro Config (Micro): duration: 30 seconds = 30.00 seconds, frequency: 20 minutes = 1200.00 seconds, availability: any time, from: DejalTime: 08:00:00, to: DejalTime: 17:00:00, start: 2 secs, finish: 2 secs, State next due: DejalDate: 4/7/16, 12:46 ('2016-04-07T19:46:41Z'), last started: DejalDate: 4/7/16, 12:26 ('2016-04-07T19:26:41Z'), last deferred: DejalDate: 3/30/16, 15:16 ('2016-03-30T22:16:54Z'), last done: DejalDate: 3/30/16, 15:19 ('2016-03-30T22:19:29Z'), paused until: DejalDate: 12/29/01, 16:07 ('0001-12-30T00:00:00Z'); enabled: yes, started
4/7/16 12:26:45.159 6Z7QW53WB6.com.dejal.timeout.break[36764]: resetTimeoutForInterval: 30
4/7/16 12:26:45.161 Time Out[33507]: endingBreak: Break: Micro Config (Micro): duration: 30 seconds = 30.00 seconds, frequency: 20 minutes = 1200.00 seconds, availability: any time, from: DejalTime: 08:00:00, to: DejalTime: 17:00:00, start: 2 secs, finish: 2 secs, State next due: DejalDate: 4/7/16, 12:46 ('2016-04-07T19:46:41Z'), last started: DejalDate: 4/7/16, 12:26 ('2016-04-07T19:26:41Z'), last deferred: DejalDate: 3/30/16, 15:16 ('2016-03-30T22:16:54Z'), last done: DejalDate: 3/30/16, 15:19 ('2016-03-30T22:19:29Z'), paused until: DejalDate: 12/29/01, 16:07 ('0001-12-30T00:00:00Z'); enabled: yes, finishing; finished: no
4/7/16 12:26:45.161 Time Out[33507]: Skipped the break.
4/7/16 12:26:45.163 Time Out[33507]: no remaining actions; phase & actions reset
4/7/16 12:26:45.443 Time Out[33507]: Scheduler:
idle (for 0 secs); Normal due 4/7/16, 12:46 (in 19 min, 53 sec); Micro due 4/7/16, 12:46 (in 19 min, 56 sec)
not yet idle for at least 30 seconds
4/7/16 12:26:46.559 pbpaste[36772]: CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : Lock timeout
------------------------------------------------------------------------

Is xpcproxy related to Time Out? I also saw those errors when first investigating the clipboard lock timeout issue. However, in searching the logs, no xpcproxy errors occurred during the days Time Out wasn't running.

So, I don't know if xpcproxy is causing the issue, or if it's Time Out directly, but the two processes (and errors) are connected somehow.

Thank you for your time. Let me know if I can do anything to further troubleshoot this.

Anyone else experiencing this on their systems? I have Time Out at home, too (same OS version, older mac), and I don't have the problem. So, not sure what's going on here. :-P

David Sinclair's picture

Re: Time Out breaks copy/paste buffer

Hi,

Thank you for your efforts to trace this issue. It's a very vexing one, more-so because I don't experience it either, which makes it much harder to figure out. And Apple hasn't been able to help me so far. Maybe your additional information could spark a suggestion from them?

Time Out does use XPC to communicate with the break helper (agent). As you may know, that is the modern (and sandbox-friendly) way for inter-process communication.

Speaking of which, another data point: are you using the direct or Mac App Store edition? Are both machines on the same edition? Perhaps you could try the other one on your problem machine. They are very similar, but the direct one is not sandboxed (as that doesn't work with the Sparkle app updater) and the MAS one is (of course). So that could affect XPC communication.

XPC may not be the trigger of this issue, but it's certainly an interesting clue.

Oh, and: do you use iTerm2? That has been a common factor, so you could also try disabling that, if you use it, to eliminate that possibility.

Re: Time Out breaks copy/paste buffer

I still have this issue. I've been using the App Store version. I don't use iTerm2 (nor do I even have it installed). I do use the regular Terminal.app a lot, though (I practically live in it).

Re: Time Out breaks copy/paste buffer

I also have this problem. Copy and paste stops working every couple of days, along with drag and drop functionality. If I disable Timeout, the problem doesn't appear to occur. I don't use iTerm2 but I do use the regular Terminal.app a lot.

I think I could live with it if I can script a fix for it, that I can just run whenever it happens, but so far logging out has been the only thing that fixes it.

Happy to provide any information that might help with a fix.

David Sinclair's picture

Re: Time Out breaks copy/paste buffer

I'm sorry about this. I really wish I could figure out a workaround. I'll try again soon, but so far Apple hasn't been any help.