You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
🐛 Bug Report: Pastebar locks clipboard for too long, causing CLIPBRD_E_CANT_OPEN in other apps #323
🐛 Bug Report: PasteBar locks clipboard for too long, causing CLIPBRD_E_CANT_OPEN in other apps
Description:
I've encountered an issue where PasteBar seems to hold the Windows clipboard lock for an extended period when intercepting/reading new entries. This causes other applications that are actively trying to write to the clipboard to freeze, time out, or throw exceptions.
Impact & Evidence:
Specifically, when using "Flow Launcher" alongside PasteBar, any copy action from Flow Launcher hangs for several seconds and eventually throws a "Failed to copy" error.
Checking the error logs of Flow Launcher reveals a direct clipboard lock exception caused by PasteBar holding the lock too long: System.Runtime.InteropServices.COMException (0x800401D0): OpenClipboard failed (0x800401D0 (CLIPBRD_E_CANT_OPEN))
Even though Flow Launcher has a built-in retry mechanism for writing to the clipboard, PasteBar holds the lock longer than the maximum retry duration, ultimately forcing the crash/error.
Steps to Reproduce:
Keep PasteBar running in the background.
Run Flow Launcher and trigger an action to copy text to the clipboard.
Flow Launcher will hang significantly and eventually throw an OpenClipboard failed timeout error.
Close/Exit PasteBar completely.
Try copying from Flow Launcher again -> It works instantly without any issues.
Expected Behavior:
PasteBar should optimize its clipboard monitoring and reading logic to release the Windows clipboard lock much faster. It shouldn't block other applications from accessing the clipboard for such a long duration.
Environment:
Windows Version:Windows 11 Pro, Version 25H2 (OS Build 26200.7840)
Just to provide some additional technical context on what might be causing this under the hood:
It seems the root cause is related to how the Windows clipboard global lock (Mutex) is being handled. The standard best practice for a clipboard manager is the "quick in, quick out" approach:
Open the clipboard.
Copy data to memory.
Immediately close/release the clipboard lock.
Process the data asynchronously in the background (e.g., UI updates, database saving, etc.).
Right now, it appears PasteBar might be performing synchronous processing while still holding the OpenClipboard lock. Because the clipboard is a globally exclusive resource in Windows, holding this lock for too long starves other applications.
For example, Flow Launcher actually has a built-in retry mechanism (RetryActionOnSTAThreadAsync) to handle temporary clipboard locks. However, PasteBar holds the lock longer than Flow Launcher's maximum retry duration, which ultimately forces the CLIPBRD_E_CANT_OPEN crash on their end.
Decoupling the clipboard read action from the data processing action should resolve these conflicts and likely improve PasteBar's overall performance. Hope this helps point you in the right direction!
@moxuanyuan Thanks for the detailed report and technical context.
I have 30K+ active Windows users and haven’t seen this reported before, but this does suggest there may be a real clipboard contention issue in PasteBar under specific conditions. Flow Launcher may be exposing the issue more clearly because it is sensitive to longer clipboard locks, but PasteBar still should not hold clipboard access long enough to cause retry exhaustion in another app.
I’ll review the Windows clipboard monitoring path and look into this issue, but you free to create a PR if you can find anything that can fix the issue for you in source code.
P.S I just tried Flow Launcher on my Windows 10 machine, it works fine with PasteBar I don't see any issues. Did you use any plugins for Clipboard ? Maybe best to use only one clipboard manager on your system as well, if you like Flow Launcher clipboard history you can disable PasteBar history capture and use only saved clips and native paste menu instead of full clipboard history / capture functionality.
Thank you so much for the quick response and for personally testing this! I truly appreciate your openness to investigating this.
I've performed some more thorough isolation testing on my end to provide more context:
Environmental Limits: I am using Windows 11. Unfortunately, I don't have another machine with Windows 10 or a clean install to verify if this is specific to my environment, but I have tried to eliminate all possible variables.
Minimal Setup: To be clear, I am only using PasteBar as my clipboard manager. During my tests:
I have completely disabled the built-in clipboard history in Flow Launcher.
I have also manually disabled Windows 11's native "Clipboard History" and "Sync" features in the system settings.
Observation: Despite PasteBar being the only active clipboard listener, Flow Launcher still fails its core "copy to clipboard" function, consistently triggering the CLIPBRD_E_CANT_OPEN error in its logs.
Thank you again for your time and for creating such a great tool. I'll stay tuned for any updates!
Flow Launcher still fails its core "copy to clipboard" function, consistently triggering the CLIPBRD_E_CANT_OPEN error in its logs.
Can you please specify that did you type in Flow Launcher to use copy to clipboard functionality. I could not find any command that FL has for copy to clipboard. I could not replicate this error CLIPBRD_E_CANT_OPEN on my setup.
I have completely disabled the built-in clipboard history in Flow Launcher.
how would you do enable / disable this in FL ?
here is what I see with standard FL on copy to clipboard
the only clipboard functionality I found is using plugins
Can you see if you using any clipboard plugins, if so, try to disable it.
I am not using any clipboard plugins in Flow Launcher.
Yesterday I was on another PC, completely reinstalled windows 11 25H2, only installed Flow Launcher and Pastebar, and the problem still exists.
Also, I found that Pastebar is also in conflict with ContextMenuManager.
As pictured above, when I click on "Copy GUID", sometimes the first or second time it pops up an error prompt like the following. When I close the paste bar, everything works fine.
@moxuanyuan could you provide step by step instruction how to copy with Flow Launcher ? I use it daily and do not see any issues with PasteBar, but I do not use Flow Launcher to copy anything, I do not know how to do it. Let me know.
@kurdin you can trigger the clipboard (and thus the error with FL and Pastebar) with the calculator plugin. type any number or calculation in flow launcher, press enter and the error will appear.
Activity
moxuanyuan commentedon Mar 10, 2026
Just to provide some additional technical context on what might be causing this under the hood:
It seems the root cause is related to how the Windows clipboard global lock (Mutex) is being handled. The standard best practice for a clipboard manager is the "quick in, quick out" approach:
Right now, it appears PasteBar might be performing synchronous processing while still holding the
OpenClipboardlock. Because the clipboard is a globally exclusive resource in Windows, holding this lock for too long starves other applications.For example, Flow Launcher actually has a built-in retry mechanism (
RetryActionOnSTAThreadAsync) to handle temporary clipboard locks. However, PasteBar holds the lock longer than Flow Launcher's maximum retry duration, which ultimately forces theCLIPBRD_E_CANT_OPENcrash on their end.Decoupling the clipboard read action from the data processing action should resolve these conflicts and likely improve PasteBar's overall performance. Hope this helps point you in the right direction!
kurdin commentedon Mar 10, 2026
@moxuanyuan Thanks for the detailed report and technical context.
I have 30K+ active Windows users and haven’t seen this reported before, but this does suggest there may be a real clipboard contention issue in PasteBar under specific conditions. Flow Launcher may be exposing the issue more clearly because it is sensitive to longer clipboard locks, but PasteBar still should not hold clipboard access long enough to cause retry exhaustion in another app.
I’ll review the Windows clipboard monitoring path and look into this issue, but you free to create a PR if you can find anything that can fix the issue for you in source code.
P.S I just tried Flow Launcher on my Windows 10 machine, it works fine with PasteBar I don't see any issues. Did you use any plugins for Clipboard ? Maybe best to use only one clipboard manager on your system as well, if you like Flow Launcher clipboard history you can disable PasteBar history capture and use only saved clips and native paste menu instead of full clipboard history / capture functionality.
moxuanyuan commentedon Mar 10, 2026
@kurdin
Thank you so much for the quick response and for personally testing this! I truly appreciate your openness to investigating this.
I've performed some more thorough isolation testing on my end to provide more context:
CLIPBRD_E_CANT_OPENerror in its logs.Thank you again for your time and for creating such a great tool. I'll stay tuned for any updates!
kurdin commentedon Mar 11, 2026
@moxuanyuan
here is what I see with standard FL on copy to clipboard

the only clipboard functionality I found is using plugins

Can you see if you using any clipboard plugins, if so, try to disable it.
Thank you for your help.
moxuanyuan commentedon Mar 27, 2026
I am not using any clipboard plugins in Flow Launcher.
Yesterday I was on another PC, completely reinstalled windows 11 25H2, only installed Flow Launcher and Pastebar, and the problem still exists.
Also, I found that Pastebar is also in conflict with ContextMenuManager.
As pictured above, when I click on "Copy GUID", sometimes the first or second time it pops up an error prompt like the following. When I close the paste bar, everything works fine.
kurdin commentedon Apr 4, 2026
@moxuanyuan could you provide step by step instruction how to copy with Flow Launcher ? I use it daily and do not see any issues with PasteBar, but I do not use Flow Launcher to copy anything, I do not know how to do it. Let me know.
randomhero0 commentedon Jun 25, 2026
@kurdin you can trigger the clipboard (and thus the error with FL and Pastebar) with the calculator plugin. type any number or calculation in flow launcher, press enter and the error will appear.
Hope that helps.