EjayH Posted February 8 Share Posted February 8 (edited) Hi Rick... not Morty here! Is it just me or do others get an error when hitting CTRL-C and CTRL-V in quick succession? There is no crash log, just a popup error saying there is an Unauthorised Access Error on OpenClipboard function. My suggestion is that when I hit the COPY, the clipboard is locked and data is captured to it... if you hit PASTE before the copy is done, the clipboard is locked and the error occurs. It happens sporadically and it's not linked to say copying a large image section. But I only get it if I CTRL-C-V quickly. Can't there be a wait and retry built into the code? paintnet 5.0.1 There was an error getting the image from the clipboard. Exception : System. UnauthorizedAccessException: OpenClipboard ( ) returned FALSE (5, ERROR_ACCESS_DENIED) Edited February 9 by EjayH shorten Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted February 8 Share Posted February 8 You're copying from Paint.NET, and pasting into Paint.NET? Shouldn't be possible to get the error in that case, since you can't do anything else while the copying is in progress I've seen this happen if you copy from, say, Chrome and then do a paste into PDN faster than Chrome is able to copy to the clipboard. Even if a retry loop is added, it'll only help when the copy operation fits within the timeout/retry loop's duration. The moment you try to copy a larger image, you'll just get the same error. It can't be a bulletproof solution, in other words. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
EjayH Posted February 9 Author Share Posted February 9 (edited) Thanks Rick. Edited February 9 by EjayH Ignorance Quote Link to comment Share on other sites More sharing options...
Tactilis Posted February 9 Share Posted February 9 Quote been using it since PSP became bloatware in the late-90's and I found this in about 2003 or 4 if memory serves when I was final year varsity - v1 or 1.1.. then you jumped to v2... but I could be way off... it's too many years ago. Yesterday I wanted to send a bank payment receipt but wanted to remove my huge bank balance I'm not sure that your "huge bank balance" or the other personal history you have given is relevant. It's best to include only pertinent details in problem reports. You write it only once - but it is read by 100s of people. Quote Link to comment Share on other sites More sharing options...
Tactilis Posted February 9 Share Posted February 9 18 minutes ago, EjayH said: Definitely a copy within Paint.net and then a quick fire paste into the exact same image Why are you CTRL+C copying the image and then immediately CTRL+V pasting "into the exact same image"? What is the purpose of that operation? Quote Link to comment Share on other sites More sharing options...
andyz Posted February 22 Share Posted February 22 (edited) I can confirm this is an issue, at least with a fast Ctrl c/v on a large image - obviously you might want to copy and paste from a section of an image to duplicate it. Not sure if this error would be easy to get in general use but even on a fast computer it is repeatable - you get an error about getting the image from the clipboard: Exception: System.UnauthorizedAccessException: OpenClipboard() returned FALSE (5, ERROR_ACCESS_DENIED) at PaintDotNet.Interop.WindowsUtil.ThrowWin32Error(String message, Int32 lastWin32Error) in D:\src\pdn\src\Windows\Interop\WindowsUtil.cs:line 24 at PaintDotNet.SystemLayer.Clipboard.ClipboardTransaction.Create(IClipboard clipboard, HWND hwnd) in D:\src\pdn\src\SystemLayer\Clipboard\ClipboardTransaction.cs:line 62 at PaintDotNet.Actions.PasteImageAction.<PerformActionImpl>b__5_0() in D:\src\pdn\src\PaintDotNet\Actions\PasteImageAction.cs:line 94 at PaintDotNet.Runtime.RetryManager.RunMemorySensitiveOperation[T,TFunc](Int32 maxAttempts, TFunc& func) in D:\src\pdn\src\Base\Runtime\RetryManager.cs:line 227 at PaintDotNet.Actions.PasteImageAction.PerformActionImpl() in D:\src\pdn\src\PaintDotNet\Actions\PasteImageAction.cs:line 91 Application paint.net 5.0.2 (Stable 5.2.8451.6614) Build Date 20 February 2023 Windows 11 Edited February 22 by andyz Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted February 22 Share Posted February 22 @andyz, I'm unable to replicate this on my Ryzen 7950X if I rapidly press Ctrl+C Ctrl+V. If you've got more specific reproduction instructions, please post them. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.