Willy-Kimura / SharpClipboard

A library for anonymously monitoring clipboard entries.
188 stars 36 forks source link

Occasionally crashes when text is copied from the Chrome navigation bar. #6

Closed satyris closed 4 years ago

satyris commented 5 years ago

Occasionally the program crashes with an exception within the component when text is copied from the Chrome navigation bar.

System.NullReferenceException HResult=0x80004003 Message=Object reference not set to an instance of an object. Source=SharpClipboard StackTrace: at WK.Libraries.SharpClipboardNS.Views.ClipboardHandle.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Willy-Kimura commented 5 years ago

Is this happening after updating to the new release v3.1.0? Works well on my end... You can test with the previous release v3.0.0 to confirm.

satyris commented 5 years ago

This error occurs with both version 3.0.0 and version 3.1.0. But only occasionally. On some PCs more often than on others. In the Visual Studio debugger it occurs less often than with a built version that is started outside the development environment. I have to copy something from the navigation bar several times in a row. With other programs I could not cause the error so far.

Willy-Kimura commented 5 years ago

Currently working on it... Will do more tests on this.

Willy-Kimura commented 5 years ago

I've fixed this issue. Will be publishing the next update ASAP.

Willy-Kimura commented 5 years ago

Published v3.3.0 with fix.

stevenengland commented 5 years ago

Hi, I still experience this error when working with Chrome (it happens very rare but it does). Win 7 64 Bit. / Net 461

Exception Text: System.NullReferenceException: Object reference not set to an instance of an object. at WK.Libraries.SharpClipboardNS.Views.ClipboardHandle.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

-> package id="SharpClipboard" version="3.3.0" targetFramework="net461" -> Assembly Version: 3.0.0.0 -> Win32 Version: 3.0.0.0

Willy-Kimura commented 5 years ago

You can post the exact steps you take that lead to this exception. Seems it's a rare case.

stevenengland commented 5 years ago

As soon as the error occurs again, I write down the steps I remember (since it occurs so rarely, you just don't pay attention...). My attempts to reproduce it have failed so far :( Thank you for having a look!

Willy-Kimura commented 5 years ago

Great. That's okay. Will also try on my end to reproduce it. I may have a clue on where it arises.

satyris commented 5 years ago

I also experience this error when working with Chrome. Sometimes it just happens directly after I start chrome and copy some text from the navigation bar. However, it often takes a lot of copying processes until the error occurs.

dgl commented 5 years ago

I'm also seeing this, it reproduces fairly easily for me if I select some text in the Chrome address bar and just hold down control-C, after a few seconds I get a crash. Unfortunately it doesn't seem to happen under a debugger...

Willy-Kimura commented 5 years ago

@dgl Try posting the exception details. I'm really curious to know where it falls at.