-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PowerToys Run Calculator Click to 'Copy this number to clipboard' fails, with error dialogue #25437
Comments
I have been having the same issue for a few months on multiple Windows 10 machines. |
xref #13024 (comment) |
same issue. i have admin on |
/bugreport |
I personally ran into this issue this morning. Stalebots are counterproductive. This is a very real issue, as confirmed by multiple people in this thread. The lack of response from the original author is irrelevant. Closing issues automatically like this only serves to obscure the actual bugs that software has. @davidegiacometti can the stalebot be disabled for this issue? (or the whole repo..) Regarding the |
same issue, adding that if you press enter(to copy), wait 1-2 seconds after the popup, and then press enter again it copies the result as expected and closes the popup. |
Yeah! I have updated the labels so the bot shouldn't bother anymore. |
I've quickly tested via this code and for me, it was Parsec that locked the clipboard that made fail from powertoys run. Here's the code for whoever wants to test it: using System.Diagnostics;
using System.Runtime.InteropServices;
namespace ClipboardTester
{
internal class Program
{
// https://stackoverflow.com/questions/6583642/determine-which-process-is-locking-the-clipboard
[DllImport("user32.dll", SetLastError = true)]
static extern IntPtr GetOpenClipboardWindow();
[DllImport("user32.dll", SetLastError = true)]
static extern int GetWindowThreadProcessId(IntPtr hWnd, out int lpdwProcessId);
static void Main(string[] args)
{
while (true)
{
int processId;
GetWindowThreadProcessId(GetOpenClipboardWindow(), out processId);
var process = Process.GetProcessById(processId);
Console.WriteLine($"Process name: {process.ProcessName} ({processId})");
Thread.Sleep(50);
}
}
}
} Update) this issue persists even the svchost is holding the clipboard, dunno where to solve, maybe windows bug? |
I've been experiencing this issue for a while as well. |
same issue. report file here: |
same issue. |
Same issue can confirm that closing parsec stops the error. |
+1 |
I don't have Parsec installed but also have this issue... |
@umarbutler this is an issue where another program takes control of the clipboard and Windows does not allow other programs to interact with it. While this degrades the experience on PowerToys this is ultimately an issue with Windows and the architecture of the clipboard API. As earlier comments have made clear PowerToys can only really highlight which program is abusing the API so the user can take action as they see fit. |
@TheJoeFin I’ve never once seen any program other than PowerToys fail to copy something to the clipboard on Windows, which makes me skeptical that the problem truly is with Windows, and not with PowerToys. I have also encountered this error dialog even when I’m not running anything that could possibly be interacting with the clipboard, as I mentioned in an earlier comment. I haven’t personally run into this as much lately, but that’s probably more of a result of changing how I use my computer than anything, but I’m still subscribed to this thread, and I don’t think this issue is so easily dismissed. |
@coder543 that's fair, I would guess we have more than one issue going on here. Adding code like this comment linked below might help figure out the conflicts vs other bugs. Have you gone though any of the bug reports and found anything which might indicate what is going on other than conflicting with the clipboard API? |
@coder543, the thing is that it does not fail to copy to the clipboard (at least in my case) it just shows the error. |
I've been experiencing this issue for over a year now. It would be really helpful to have the option to suppress these error messages about the clipboard, so they don't pop up at all. Especially because the copy-to-clipboard actually is working properly. I don't know if everyone else is having the same experience, but it's INCREDIBLY annoying getting an error pop-up that says something isn't working, when it is, in-fact, working flawlessly. |
The lack of errors in the bugreports makes sense when there is no error and just an annoying message box being shown when it shouldn't. |
Hi @TheJoeFin, I looked into the logs and in the last 2 log reports, I found the same 2 exceptions with the same 2 applications - I think this is triggering the block below, and hence, displaying the dialog - |
I was investigating this issue on my local. Here's what I found so far. ExceptionThe
The clipboard is a global resource in Windows, shared by all applications. Only one app at a time can access it. I tried to call I couldn't identify the conflicting app. It may be Windows Clipboard History or something else. Copying to clipboard in PowerToysI walked through other tools and plugins in PowerToys and checked how they work with clipboard. These use the same
ColorPicker is using The ColorPicker's way works on my machine. The last group calls
I don't know why, but this sequence works. Therefore, I suggest using this until we know more. |
Hi @josefblaha, did you test all the apps in the same environment? |
Not all apps, but I tested all the ways of copying. I tried copying in ColorPicker, and in Unit Converter, Folder and TimeDate plugins. Those using just |
I see @josefblaha. This issue is only reported for the Calculator plugin but applies to all the utilities using just @htcfreek is it better to add the temporary fix to these utilities (since this seems like a high-priority bug) or should we wait for the core team's decision on this? Also, this seems like the right time to say, but @josefblaha, could you post a video or an image reproducing the error and then another video with the clear statement above so we can have a look if it is indeed working? |
not sure if this helps. i found this thread while trying to figure out why it was spontaneously mad at me. |
Microsoft PowerToys version
0.69.0
Installation method
GitHub
Running as admin
No
Area(s) with issue?
PowerToys Run
Steps to reproduce
Type a calculation into Run, eg "1+1".
Result is given with an option to click to copy:
Clicking to copy to causes the program to freeze, then throws up an error dialogue box.
✔️ Expected Behavior
Calculation result is copied to clipboard
❌ Actual Behavior
Calculation result is NOT copied to clipboard, error given instead:
Other Software
No response
The text was updated successfully, but these errors were encountered: