OverwolfUtils - Failed to place data on clipboard

Related app/team name: PoE Overlay
Issue Description: App is unable to set data to the clipboard sporadically.
Can you reproduce it: I can’t reproduce it myself. It happens on some user systems. User(s) is(are) also willing to help if needed.
Impact for my app: It blocks key features of the app. I don’t have a exact % number.
Do you currently have a workaround? No.

2021-04-24 11:59:54,831 (ERROR) [76] <173.58MB> OverwolfUtils - Failed to place data on clipboard: System.Runtime.InteropServices.COMException (0x800401D0): OpenClipboard Failed (Exception from HRESULT: 0x800401D0 (CLIPBRD_E_CANT_OPEN))
   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   at System.Windows.Clipboard.Flush()
   at System.Windows.Clipboard.CriticalSetDataObject(Object data, Boolean copy)
   at OverWolf.Client.CommonUtils.Utils.ClipboardUtils.<>c__DisplayClass1_0.<PlaceOnClipboardAsync>b__0()

OverwolfLogs_2021-04-24_18-54-22.zip (1.2 MB)

I know we had this issue in this past and it got fixed with a different implementation of the clipboard set. I’ve asked the user for running AHK scripts and there were none. Let me know if you need further information. Thanks!

Hi, and thanks for the feedback.

We will check the issue and we will update you here.

Thanks.

1 Like

Hi,

We added the bug to our backlog. Currently, there is no ETA, but I will update you here once the fix is released.

Thanks.

@Kyusung4698 Hi,

We can’t reproduce the issue.
We’ll need steps to reproduce or to contact a user that can reproduce it.

Thanks

Hi,

excuse my late reply, i didn’t see the notification.

The user also shared a windows event log entry with me which happens around the same time:

Event 2004, PerfNet "Unable to open the Server service performance object. The first four bytes (DWORD) of the Data section contains the status code."

You can also contact him on Discord under his tag skorov#5753

Thanks for looking into it!

@Kyusung4698 thanks. But we will need before that - the steps to reproduce? The user probably complained that they couldn’t do something. Or some error has happened.
Would you please give me more details on how this bug reflected and how it can be reproducible (even though it happens sporadically)?

I’m using the clipboard to paste a message or a command into the in-game chat. If the clipboard writes action fails, either a wrong message or an empty string is posted to the in-game chat.
Some features that use this technique can only be run once e.g. the trade actions in my trade helper to prevent spamming. So if this happens the user is stuck with an incomplete workflow.

Best way to reproduce this, is using either a command bound to a hotkey or the trade helper it self by sending a trade whisper to yourself. But again it only happens for some users. Most user can use the app just fine and will never encounter this, but for others it breaks the app completely. The mentioned user is really willingly to help debugging this and get this resolved before the next league 23.07.

The affected code looks like this:

const prevContent = await odk.getFromClipboard();
const nextContent = event.message;
odk.placeOnClipboard(nextContent);
await sleep(10);
odk.sendKeyStroke('Enter');
await sleep(30);
odk.sendKeyStroke('Ctrl+V');
await sleep(10);
odk.sendKeyStroke('Enter');
await sleep(200);
odk.placeOnClipboard(prevContent);
await sleep(10);

Thanks. I will check it and update it. Our R&D team or I might contact the user.

Thanks

@Kyusung4698, the R&D will do an initial inspection of this at the beginning of the next week. If required, we also contact directly the user that complained, through his DIscord.

Thanks